From f70f0324e3af372e762cba662e1b29e421956359 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 20 Sep 2022 14:36:02 +0000 Subject: [PATCH 1/2] feat: Add client library support for AssetService v1 SavedQuery APIs Committer: jeffreyai@ PiperOrigin-RevId: 475366952 Source-Link: https://github.com/googleapis/googleapis/commit/7428dad9f642a1b74fe4c4a23efe2d84234ac27f Source-Link: https://github.com/googleapis/googleapis-gen/commit/5629e2ab728443a1a6abb03f34f925d5cd4e0c47 Copy-Tag: eyJwIjoiamF2YS1hc3NldC8uT3dsQm90LnlhbWwiLCJoIjoiNTYyOWUyYWI3Mjg0NDNhMWE2YWJiMDNmMzRmOTI1ZDVjZDRlMGM0NyJ9 --- .../cloud/asset/v1/AssetServiceClient.java | 3059 +++++ .../cloud/asset/v1/AssetServiceSettings.java | 468 + .../google/cloud/asset/v1/gapic_metadata.json | 78 + .../google/cloud/asset/v1/package-info.java | 48 + .../cloud/asset/v1/stub/AssetServiceStub.java | 208 + .../v1/stub/AssetServiceStubSettings.java | 1293 +++ .../stub/GrpcAssetServiceCallableFactory.java | 113 + .../asset/v1/stub/GrpcAssetServiceStub.java | 870 ++ .../HttpJsonAssetServiceCallableFactory.java | 105 + .../v1/stub/HttpJsonAssetServiceStub.java | 1359 +++ .../v1/AssetServiceClientHttpJsonTest.java | 1769 +++ .../asset/v1/AssetServiceClientTest.java | 1551 +++ .../cloud/asset/v1/MockAssetService.java | 59 + .../cloud/asset/v1/MockAssetServiceImpl.java | 482 + .../cloud/asset/v1/AssetServiceGrpc.java | 2129 ++++ .../AnalyzeIamPolicyLongrunningMetadata.java | 667 ++ ...IamPolicyLongrunningMetadataOrBuilder.java | 36 + .../AnalyzeIamPolicyLongrunningRequest.java | 1165 ++ ...eIamPolicyLongrunningRequestOrBuilder.java | 110 + .../AnalyzeIamPolicyLongrunningResponse.java | 431 + ...IamPolicyLongrunningResponseOrBuilder.java | 9 + .../asset/v1/AnalyzeIamPolicyRequest.java | 1249 +++ .../v1/AnalyzeIamPolicyRequestOrBuilder.java | 131 + .../asset/v1/AnalyzeIamPolicyResponse.java | 3072 +++++ .../v1/AnalyzeIamPolicyResponseOrBuilder.java | 104 + .../cloud/asset/v1/AnalyzeMoveRequest.java | 1092 ++ .../asset/v1/AnalyzeMoveRequestOrBuilder.java | 84 + .../cloud/asset/v1/AnalyzeMoveResponse.java | 895 ++ .../v1/AnalyzeMoveResponseOrBuilder.java | 58 + .../java/com/google/cloud/asset/v1/Asset.java | 4158 +++++++ .../google/cloud/asset/v1/AssetOrBuilder.java | 490 + .../com/google/cloud/asset/v1/AssetProto.java | 502 + .../cloud/asset/v1/AssetServiceProto.java | 1149 ++ .../cloud/asset/v1/AttachedResource.java | 1114 ++ .../asset/v1/AttachedResourceOrBuilder.java | 91 + .../v1/BatchGetAssetsHistoryRequest.java | 1780 +++ ...BatchGetAssetsHistoryRequestOrBuilder.java | 256 + .../v1/BatchGetAssetsHistoryResponse.java | 872 ++ ...atchGetAssetsHistoryResponseOrBuilder.java | 53 + .../BatchGetEffectiveIamPoliciesRequest.java | 945 ++ ...tEffectiveIamPoliciesRequestOrBuilder.java | 100 + .../BatchGetEffectiveIamPoliciesResponse.java | 3530 ++++++ ...EffectiveIamPoliciesResponseOrBuilder.java | 78 + .../cloud/asset/v1/BigQueryDestination.java | 1494 +++ .../v1/BigQueryDestinationOrBuilder.java | 182 + .../cloud/asset/v1/ConditionEvaluation.java | 719 ++ .../v1/ConditionEvaluationOrBuilder.java | 28 + .../google/cloud/asset/v1/ContentType.java | 218 + .../cloud/asset/v1/CreateFeedRequest.java | 1068 ++ .../asset/v1/CreateFeedRequestOrBuilder.java | 95 + .../asset/v1/CreateSavedQueryRequest.java | 1079 ++ .../v1/CreateSavedQueryRequestOrBuilder.java | 99 + .../cloud/asset/v1/DeleteFeedRequest.java | 608 + .../asset/v1/DeleteFeedRequestOrBuilder.java | 35 + .../asset/v1/DeleteSavedQueryRequest.java | 623 ++ .../v1/DeleteSavedQueryRequestOrBuilder.java | 37 + .../cloud/asset/v1/ExportAssetsRequest.java | 2121 ++++ .../v1/ExportAssetsRequestOrBuilder.java | 315 + .../cloud/asset/v1/ExportAssetsResponse.java | 1193 ++ .../v1/ExportAssetsResponseOrBuilder.java | 102 + .../java/com/google/cloud/asset/v1/Feed.java | 2446 ++++ .../com/google/cloud/asset/v1/FeedName.java | 368 + .../google/cloud/asset/v1/FeedOrBuilder.java | 374 + .../cloud/asset/v1/FeedOutputConfig.java | 761 ++ .../asset/v1/FeedOutputConfigOrBuilder.java | 38 + .../com/google/cloud/asset/v1/FolderName.java | 168 + .../google/cloud/asset/v1/GcsDestination.java | 1065 ++ .../asset/v1/GcsDestinationOrBuilder.java | 114 + .../cloud/asset/v1/GcsOutputResult.java | 689 ++ .../asset/v1/GcsOutputResultOrBuilder.java | 54 + .../google/cloud/asset/v1/GetFeedRequest.java | 616 ++ .../asset/v1/GetFeedRequestOrBuilder.java | 35 + .../cloud/asset/v1/GetSavedQueryRequest.java | 616 ++ .../v1/GetSavedQueryRequestOrBuilder.java | 35 + .../v1/IamPolicyAnalysisOutputConfig.java | 3147 ++++++ ...amPolicyAnalysisOutputConfigOrBuilder.java | 65 + .../asset/v1/IamPolicyAnalysisQuery.java | 6302 +++++++++++ .../v1/IamPolicyAnalysisQueryOrBuilder.java | 180 + .../asset/v1/IamPolicyAnalysisResult.java | 9843 +++++++++++++++++ .../v1/IamPolicyAnalysisResultOrBuilder.java | 168 + .../asset/v1/IamPolicyAnalysisState.java | 756 ++ .../v1/IamPolicyAnalysisStateOrBuilder.java | 58 + .../cloud/asset/v1/IamPolicySearchResult.java | 3817 +++++++ .../v1/IamPolicySearchResultOrBuilder.java | 288 + .../cloud/asset/v1/ListAssetsRequest.java | 2144 ++++ .../asset/v1/ListAssetsRequestOrBuilder.java | 322 + .../cloud/asset/v1/ListAssetsResponse.java | 1288 +++ .../asset/v1/ListAssetsResponseOrBuilder.java | 104 + .../cloud/asset/v1/ListFeedsRequest.java | 609 + .../asset/v1/ListFeedsRequestOrBuilder.java | 33 + .../cloud/asset/v1/ListFeedsResponse.java | 864 ++ .../asset/v1/ListFeedsResponseOrBuilder.java | 53 + .../asset/v1/ListSavedQueriesRequest.java | 1089 ++ .../v1/ListSavedQueriesRequestOrBuilder.java | 102 + .../asset/v1/ListSavedQueriesResponse.java | 1045 ++ .../v1/ListSavedQueriesResponseOrBuilder.java | 75 + .../google/cloud/asset/v1/MoveAnalysis.java | 1197 ++ .../cloud/asset/v1/MoveAnalysisOrBuilder.java | 87 + .../cloud/asset/v1/MoveAnalysisResult.java | 1381 +++ .../asset/v1/MoveAnalysisResultOrBuilder.java | 112 + .../com/google/cloud/asset/v1/MoveImpact.java | 595 + .../cloud/asset/v1/MoveImpactOrBuilder.java | 29 + .../cloud/asset/v1/OrganizationName.java | 168 + .../google/cloud/asset/v1/OutputConfig.java | 1036 ++ .../cloud/asset/v1/OutputConfigOrBuilder.java | 68 + .../google/cloud/asset/v1/OutputResult.java | 761 ++ .../cloud/asset/v1/OutputResultOrBuilder.java | 38 + .../google/cloud/asset/v1/PartitionSpec.java | 716 ++ .../asset/v1/PartitionSpecOrBuilder.java | 28 + .../google/cloud/asset/v1/ProjectName.java | 168 + .../cloud/asset/v1/PubsubDestination.java | 602 + .../asset/v1/PubsubDestinationOrBuilder.java | 31 + .../asset/v1/QueryAssetsOutputConfig.java | 1741 +++ .../v1/QueryAssetsOutputConfigOrBuilder.java | 36 + .../cloud/asset/v1/QueryAssetsRequest.java | 2706 +++++ .../asset/v1/QueryAssetsRequestOrBuilder.java | 306 + .../cloud/asset/v1/QueryAssetsResponse.java | 1562 +++ .../v1/QueryAssetsResponseOrBuilder.java | 129 + .../google/cloud/asset/v1/QueryResult.java | 1361 +++ .../cloud/asset/v1/QueryResultOrBuilder.java | 110 + .../google/cloud/asset/v1/RelatedAsset.java | 1296 +++ .../cloud/asset/v1/RelatedAssetOrBuilder.java | 142 + .../google/cloud/asset/v1/RelatedAssets.java | 1114 ++ .../asset/v1/RelatedAssetsOrBuilder.java | 80 + .../cloud/asset/v1/RelatedResource.java | 768 ++ .../asset/v1/RelatedResourceOrBuilder.java | 51 + .../cloud/asset/v1/RelatedResources.java | 872 ++ .../asset/v1/RelatedResourcesOrBuilder.java | 53 + .../asset/v1/RelationshipAttributes.java | 1108 ++ .../v1/RelationshipAttributesOrBuilder.java | 91 + .../com/google/cloud/asset/v1/Resource.java | 1813 +++ .../cloud/asset/v1/ResourceOrBuilder.java | 199 + .../cloud/asset/v1/ResourceSearchResult.java | 7406 +++++++++++++ .../v1/ResourceSearchResultOrBuilder.java | 1209 ++ .../com/google/cloud/asset/v1/SavedQuery.java | 3055 +++++ .../google/cloud/asset/v1/SavedQueryName.java | 378 + .../cloud/asset/v1/SavedQueryOrBuilder.java | 246 + .../asset/v1/SearchAllIamPoliciesRequest.java | 2025 ++++ .../SearchAllIamPoliciesRequestOrBuilder.java | 316 + .../v1/SearchAllIamPoliciesResponse.java | 1075 ++ ...SearchAllIamPoliciesResponseOrBuilder.java | 82 + .../asset/v1/SearchAllResourcesRequest.java | 2658 +++++ .../SearchAllResourcesRequestOrBuilder.java | 444 + .../asset/v1/SearchAllResourcesResponse.java | 1075 ++ .../SearchAllResourcesResponseOrBuilder.java | 82 + .../cloud/asset/v1/TableFieldSchema.java | 1512 +++ .../asset/v1/TableFieldSchemaOrBuilder.java | 152 + .../google/cloud/asset/v1/TableSchema.java | 872 ++ .../cloud/asset/v1/TableSchemaOrBuilder.java | 53 + .../google/cloud/asset/v1/TemporalAsset.java | 1535 +++ .../asset/v1/TemporalAssetOrBuilder.java | 122 + .../com/google/cloud/asset/v1/TimeWindow.java | 913 ++ .../cloud/asset/v1/TimeWindowOrBuilder.java | 66 + .../cloud/asset/v1/UpdateFeedRequest.java | 973 ++ .../asset/v1/UpdateFeedRequestOrBuilder.java | 81 + .../asset/v1/UpdateSavedQueryRequest.java | 961 ++ .../v1/UpdateSavedQueryRequestOrBuilder.java | 78 + .../cloud/asset/v1/VersionedResource.java | 969 ++ .../asset/v1/VersionedResourceOrBuilder.java | 91 + .../google/cloud/asset/v1/asset_service.proto | 2072 ++++ .../proto/google/cloud/asset/v1/assets.proto | 919 ++ .../AsyncAnalyzeIamPolicy.java | 53 + .../SyncAnalyzeIamPolicy.java | 49 + .../AsyncAnalyzeIamPolicyLongrunning.java | 53 + .../AsyncAnalyzeIamPolicyLongrunningLRO.java | 55 + .../SyncAnalyzeIamPolicyLongrunning.java | 50 + .../analyzemove/AsyncAnalyzeMove.java | 50 + .../analyzemove/SyncAnalyzeMove.java | 46 + .../AsyncBatchGetAssetsHistory.java | 57 + .../SyncBatchGetAssetsHistory.java | 53 + .../AsyncBatchGetEffectiveIamPolicies.java | 52 + .../SyncBatchGetEffectiveIamPolicies.java | 49 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../createfeed/AsyncCreateFeed.java | 50 + .../createfeed/SyncCreateFeed.java | 47 + .../createfeed/SyncCreateFeedString.java | 41 + .../AsyncCreateSavedQuery.java | 52 + .../SyncCreateSavedQuery.java | 48 + ...eSavedQueryFoldernameSavedqueryString.java | 44 + ...QueryOrganizationnameSavedqueryString.java | 44 + ...SavedQueryProjectnameSavedqueryString.java | 44 + ...reateSavedQueryStringSavedqueryString.java | 44 + .../deletefeed/AsyncDeleteFeed.java | 49 + .../deletefeed/SyncDeleteFeed.java | 46 + .../deletefeed/SyncDeleteFeedFeedname.java | 42 + .../deletefeed/SyncDeleteFeedString.java | 42 + .../AsyncDeleteSavedQuery.java | 50 + .../SyncDeleteSavedQuery.java | 47 + .../SyncDeleteSavedQuerySavedqueryname.java | 42 + .../SyncDeleteSavedQueryString.java | 42 + .../exportassets/AsyncExportAssets.java | 58 + .../exportassets/AsyncExportAssetsLRO.java | 59 + .../exportassets/SyncExportAssets.java | 55 + .../getfeed/AsyncGetFeed.java | 49 + .../getfeed/SyncGetFeed.java | 46 + .../getfeed/SyncGetFeedFeedname.java | 42 + .../getfeed/SyncGetFeedString.java | 42 + .../getsavedquery/AsyncGetSavedQuery.java | 50 + .../getsavedquery/SyncGetSavedQuery.java | 47 + .../SyncGetSavedQuerySavedqueryname.java | 42 + .../SyncGetSavedQueryString.java | 42 + .../listassets/AsyncListAssets.java | 60 + .../listassets/AsyncListAssetsPaged.java | 68 + .../listassets/SyncListAssets.java | 57 + .../SyncListAssetsResourcename.java | 45 + .../listassets/SyncListAssetsString.java | 44 + .../listfeeds/AsyncListFeeds.java | 47 + .../listfeeds/SyncListFeeds.java | 43 + .../listfeeds/SyncListFeedsString.java | 41 + .../AsyncListSavedQueries.java | 55 + .../AsyncListSavedQueriesPaged.java | 63 + .../SyncListSavedQueries.java | 51 + .../SyncListSavedQueriesFoldername.java | 44 + .../SyncListSavedQueriesOrganizationname.java | 44 + .../SyncListSavedQueriesProjectname.java | 44 + .../SyncListSavedQueriesString.java | 44 + .../queryassets/AsyncQueryAssets.java | 56 + .../queryassets/SyncQueryAssets.java | 52 + .../AsyncSearchAllIamPolicies.java | 57 + .../AsyncSearchAllIamPoliciesPaged.java | 65 + .../SyncSearchAllIamPolicies.java | 54 + .../SyncSearchAllIamPoliciesStringString.java | 45 + .../AsyncSearchAllResources.java | 59 + .../AsyncSearchAllResourcesPaged.java | 67 + .../SyncSearchAllResources.java | 56 + ...rchAllResourcesStringStringListstring.java | 48 + .../updatefeed/AsyncUpdateFeed.java | 50 + .../updatefeed/SyncUpdateFeed.java | 47 + .../updatefeed/SyncUpdateFeedFeed.java | 41 + .../AsyncUpdateSavedQuery.java | 51 + .../SyncUpdateSavedQuery.java | 47 + ...ncUpdateSavedQuerySavedqueryFieldmask.java | 43 + .../SyncBatchGetAssetsHistory.java | 48 + .../SyncBatchGetAssetsHistory.java | 49 + .../asset/v1p1beta1/AssetServiceClient.java | 735 ++ .../asset/v1p1beta1/AssetServiceSettings.java | 229 + .../cloud/asset/v1p1beta1/gapic_metadata.json | 24 + .../cloud/asset/v1p1beta1/package-info.java | 46 + .../v1p1beta1/stub/AssetServiceStub.java | 63 + .../stub/AssetServiceStubSettings.java | 518 + .../stub/GrpcAssetServiceCallableFactory.java | 115 + .../v1p1beta1/stub/GrpcAssetServiceStub.java | 235 + .../HttpJsonAssetServiceCallableFactory.java | 105 + .../stub/HttpJsonAssetServiceStub.java | 292 + .../AssetServiceClientHttpJsonTest.java | 186 + .../v1p1beta1/AssetServiceClientTest.java | 181 + .../asset/v1p1beta1/MockAssetService.java | 59 + .../asset/v1p1beta1/MockAssetServiceImpl.java | 104 + .../asset/v1p1beta1/AssetServiceGrpc.java | 429 + .../cloud/asset/v1p1beta1/AssetProto.java | 129 + .../asset/v1p1beta1/AssetServiceProto.java | 132 + .../v1p1beta1/IamPolicySearchResult.java | 2204 ++++ .../IamPolicySearchResultOrBuilder.java | 127 + .../cloud/asset/v1p1beta1/Permissions.java | 676 ++ .../asset/v1p1beta1/PermissionsOrBuilder.java | 50 + .../SearchAllIamPoliciesRequest.java | 1096 ++ .../SearchAllIamPoliciesRequestOrBuilder.java | 104 + .../SearchAllIamPoliciesResponse.java | 1075 ++ ...SearchAllIamPoliciesResponseOrBuilder.java | 82 + .../v1p1beta1/SearchAllResourcesRequest.java | 1522 +++ .../SearchAllResourcesRequestOrBuilder.java | 169 + .../v1p1beta1/SearchAllResourcesResponse.java | 1052 ++ .../SearchAllResourcesResponseOrBuilder.java | 77 + .../v1p1beta1/StandardResourceMetadata.java | 2389 ++++ .../StandardResourceMetadataOrBuilder.java | 313 + .../cloud/asset/v1p1beta1/asset_service.proto | 149 + .../google/cloud/asset/v1p1beta1/assets.proto | 113 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../AsyncSearchAllIamPolicies.java | 54 + .../AsyncSearchAllIamPoliciesPaged.java | 62 + .../SyncSearchAllIamPolicies.java | 51 + .../SyncSearchAllIamPoliciesStringString.java | 45 + .../AsyncSearchAllResources.java | 57 + .../AsyncSearchAllResourcesPaged.java | 65 + .../SyncSearchAllResources.java | 54 + ...rchAllResourcesStringStringListstring.java | 48 + .../SyncSearchAllResources.java | 45 + .../SyncSearchAllResources.java | 46 + .../asset/v1p2beta1/AssetServiceClient.java | 677 ++ .../asset/v1p2beta1/AssetServiceSettings.java | 244 + .../cloud/asset/v1p2beta1/gapic_metadata.json | 33 + .../cloud/asset/v1p2beta1/package-info.java | 41 + .../v1p2beta1/stub/AssetServiceStub.java | 64 + .../stub/AssetServiceStubSettings.java | 431 + .../stub/GrpcAssetServiceCallableFactory.java | 115 + .../v1p2beta1/stub/GrpcAssetServiceStub.java | 276 + .../HttpJsonAssetServiceCallableFactory.java | 105 + .../stub/HttpJsonAssetServiceStub.java | 391 + .../AssetServiceClientHttpJsonTest.java | 403 + .../v1p2beta1/AssetServiceClientTest.java | 351 + .../asset/v1p2beta1/MockAssetService.java | 59 + .../asset/v1p2beta1/MockAssetServiceImpl.java | 162 + .../asset/v1p2beta1/AssetServiceGrpc.java | 651 ++ .../google/cloud/asset/v1p2beta1/Asset.java | 1574 +++ .../cloud/asset/v1p2beta1/AssetOrBuilder.java | 171 + .../cloud/asset/v1p2beta1/AssetProto.java | 108 + .../asset/v1p2beta1/AssetServiceProto.java | 245 + .../cloud/asset/v1p2beta1/ContentType.java | 150 + .../asset/v1p2beta1/CreateFeedRequest.java | 1080 ++ .../v1p2beta1/CreateFeedRequestOrBuilder.java | 98 + .../asset/v1p2beta1/DeleteFeedRequest.java | 608 + .../v1p2beta1/DeleteFeedRequestOrBuilder.java | 35 + .../google/cloud/asset/v1p2beta1/Feed.java | 1677 +++ .../cloud/asset/v1p2beta1/FeedName.java | 368 + .../cloud/asset/v1p2beta1/FeedOrBuilder.java | 224 + .../asset/v1p2beta1/FeedOutputConfig.java | 761 ++ .../v1p2beta1/FeedOutputConfigOrBuilder.java | 38 + .../cloud/asset/v1p2beta1/GcsDestination.java | 750 ++ .../v1p2beta1/GcsDestinationOrBuilder.java | 52 + .../cloud/asset/v1p2beta1/GetFeedRequest.java | 616 ++ .../v1p2beta1/GetFeedRequestOrBuilder.java | 35 + .../asset/v1p2beta1/ListFeedsRequest.java | 609 + .../v1p2beta1/ListFeedsRequestOrBuilder.java | 33 + .../asset/v1p2beta1/ListFeedsResponse.java | 864 ++ .../v1p2beta1/ListFeedsResponseOrBuilder.java | 53 + .../cloud/asset/v1p2beta1/OutputConfig.java | 761 ++ .../v1p2beta1/OutputConfigOrBuilder.java | 38 + .../asset/v1p2beta1/PubsubDestination.java | 602 + .../v1p2beta1/PubsubDestinationOrBuilder.java | 31 + .../cloud/asset/v1p2beta1/Resource.java | 1633 +++ .../asset/v1p2beta1/ResourceOrBuilder.java | 175 + .../cloud/asset/v1p2beta1/TemporalAsset.java | 984 ++ .../v1p2beta1/TemporalAssetOrBuilder.java | 73 + .../cloud/asset/v1p2beta1/TimeWindow.java | 913 ++ .../asset/v1p2beta1/TimeWindowOrBuilder.java | 66 + .../asset/v1p2beta1/UpdateFeedRequest.java | 973 ++ .../v1p2beta1/UpdateFeedRequestOrBuilder.java | 81 + .../cloud/asset/v1p2beta1/asset_service.proto | 259 + .../google/cloud/asset/v1p2beta1/assets.proto | 124 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../createfeed/AsyncCreateFeed.java | 50 + .../createfeed/SyncCreateFeed.java | 47 + .../createfeed/SyncCreateFeedString.java | 41 + .../deletefeed/AsyncDeleteFeed.java | 49 + .../deletefeed/SyncDeleteFeed.java | 46 + .../deletefeed/SyncDeleteFeedFeedname.java | 42 + .../deletefeed/SyncDeleteFeedString.java | 42 + .../getfeed/AsyncGetFeed.java | 49 + .../getfeed/SyncGetFeed.java | 46 + .../getfeed/SyncGetFeedFeedname.java | 42 + .../getfeed/SyncGetFeedString.java | 42 + .../listfeeds/AsyncListFeeds.java | 47 + .../listfeeds/SyncListFeeds.java | 43 + .../listfeeds/SyncListFeedsString.java | 41 + .../updatefeed/AsyncUpdateFeed.java | 50 + .../updatefeed/SyncUpdateFeed.java | 47 + .../updatefeed/SyncUpdateFeedFeed.java | 41 + .../createfeed/SyncCreateFeed.java | 45 + .../createfeed/SyncCreateFeed.java | 46 + .../asset/v1p5beta1/AssetServiceClient.java | 400 + .../asset/v1p5beta1/AssetServiceSettings.java | 208 + .../cloud/asset/v1p5beta1/gapic_metadata.json | 21 + .../cloud/asset/v1p5beta1/package-info.java | 51 + .../v1p5beta1/stub/AssetServiceStub.java | 48 + .../stub/AssetServiceStubSettings.java | 393 + .../stub/GrpcAssetServiceCallableFactory.java | 115 + .../v1p5beta1/stub/GrpcAssetServiceStub.java | 173 + .../HttpJsonAssetServiceCallableFactory.java | 105 + .../stub/HttpJsonAssetServiceStub.java | 209 + .../AssetServiceClientHttpJsonTest.java | 145 + .../v1p5beta1/AssetServiceClientTest.java | 147 + .../asset/v1p5beta1/MockAssetService.java | 59 + .../asset/v1p5beta1/MockAssetServiceImpl.java | 81 + .../asset/v1p5beta1/AssetServiceGrpc.java | 307 + .../google/cloud/asset/v1p5beta1/Asset.java | 2774 +++++ .../cloud/asset/v1p5beta1/AssetOrBuilder.java | 272 + .../cloud/asset/v1p5beta1/AssetProto.java | 107 + .../asset/v1p5beta1/AssetServiceProto.java | 104 + .../cloud/asset/v1p5beta1/ContentType.java | 184 + .../asset/v1p5beta1/ListAssetsRequest.java | 1594 +++ .../v1p5beta1/ListAssetsRequestOrBuilder.java | 187 + .../asset/v1p5beta1/ListAssetsResponse.java | 1281 +++ .../ListAssetsResponseOrBuilder.java | 102 + .../cloud/asset/v1p5beta1/Resource.java | 1633 +++ .../asset/v1p5beta1/ResourceOrBuilder.java | 175 + .../cloud/asset/v1p5beta1/asset_service.proto | 112 + .../google/cloud/asset/v1p5beta1/assets.proto | 124 + .../SyncCreateSetCredentialsProvider.java | 44 + .../SyncCreateSetCredentialsProvider1.java | 43 + .../create/SyncCreateSetEndpoint.java | 41 + .../listassets/AsyncListAssets.java | 58 + .../listassets/AsyncListAssetsPaged.java | 66 + .../listassets/SyncListAssets.java | 55 + .../listassets/SyncListAssets.java | 45 + .../listassets/SyncListAssets.java | 46 + .../asset/v1p7beta1/AssetServiceClient.java | 329 + .../asset/v1p7beta1/AssetServiceSettings.java | 199 + .../cloud/asset/v1p7beta1/gapic_metadata.json | 21 + .../cloud/asset/v1p7beta1/package-info.java | 49 + .../v1p7beta1/stub/AssetServiceStub.java | 54 + .../stub/AssetServiceStubSettings.java | 331 + .../stub/GrpcAssetServiceCallableFactory.java | 115 + .../v1p7beta1/stub/GrpcAssetServiceStub.java | 178 + .../v1p7beta1/AssetServiceClientTest.java | 153 + .../asset/v1p7beta1/MockAssetService.java | 59 + .../asset/v1p7beta1/MockAssetServiceImpl.java | 82 + .../asset/v1p7beta1/AssetServiceGrpc.java | 343 + .../google/cloud/asset/v1p7beta1/Asset.java | 3616 ++++++ .../cloud/asset/v1p7beta1/AssetOrBuilder.java | 417 + .../cloud/asset/v1p7beta1/AssetProto.java | 160 + .../asset/v1p7beta1/AssetServiceProto.java | 203 + .../asset/v1p7beta1/BigQueryDestination.java | 1466 +++ .../BigQueryDestinationOrBuilder.java | 174 + .../cloud/asset/v1p7beta1/ContentType.java | 201 + .../asset/v1p7beta1/ExportAssetsRequest.java | 2056 ++++ .../ExportAssetsRequestOrBuilder.java | 295 + .../asset/v1p7beta1/ExportAssetsResponse.java | 1193 ++ .../ExportAssetsResponseOrBuilder.java | 102 + .../cloud/asset/v1p7beta1/GcsDestination.java | 1038 ++ .../v1p7beta1/GcsDestinationOrBuilder.java | 105 + .../asset/v1p7beta1/GcsOutputResult.java | 689 ++ .../v1p7beta1/GcsOutputResultOrBuilder.java | 54 + .../cloud/asset/v1p7beta1/OutputConfig.java | 1036 ++ .../v1p7beta1/OutputConfigOrBuilder.java | 68 + .../cloud/asset/v1p7beta1/OutputResult.java | 761 ++ .../v1p7beta1/OutputResultOrBuilder.java | 38 + .../cloud/asset/v1p7beta1/PartitionSpec.java | 716 ++ .../v1p7beta1/PartitionSpecOrBuilder.java | 28 + .../cloud/asset/v1p7beta1/RelatedAsset.java | 1123 ++ .../v1p7beta1/RelatedAssetOrBuilder.java | 120 + .../cloud/asset/v1p7beta1/RelatedAssets.java | 1108 ++ .../v1p7beta1/RelatedAssetsOrBuilder.java | 80 + .../v1p7beta1/RelationshipAttributes.java | 1102 ++ .../RelationshipAttributesOrBuilder.java | 91 + .../cloud/asset/v1p7beta1/Resource.java | 1813 +++ .../asset/v1p7beta1/ResourceOrBuilder.java | 199 + .../cloud/asset/v1p7beta1/asset_service.proto | 313 + .../google/cloud/asset/v1p7beta1/assets.proto | 233 + 434 files changed, 216524 insertions(+) create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java create mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java create mode 100644 owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto create mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java create mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto create mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java create mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto create mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java create mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto create mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java create mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto create mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java new file mode 100644 index 000000000000..8ce05d3ed7e7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java @@ -0,0 +1,3059 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.asset.v1.stub.AssetServiceStub; +import com.google.cloud.asset.v1.stub.AssetServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Asset service definition. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   BatchGetAssetsHistoryRequest request =
+ *       BatchGetAssetsHistoryRequest.newBuilder()
+ *           .setParent(FolderName.of("[FOLDER]").toString())
+ *           .addAllAssetNames(new ArrayList())
+ *           .setContentType(ContentType.forNumber(0))
+ *           .setReadTimeWindow(TimeWindow.newBuilder().build())
+ *           .addAllRelationshipTypes(new ArrayList())
+ *           .build();
+ *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AssetServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AssetServiceClient implements BackgroundResource { + private final AssetServiceSettings settings; + private final AssetServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of AssetServiceClient with default settings. */ + public static final AssetServiceClient create() throws IOException { + return create(AssetServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { + return new AssetServiceClient(settings); + } + + /** + * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AssetServiceSettings). + */ + public static final AssetServiceClient create(AssetServiceStub stub) { + return new AssetServiceClient(stub); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected AssetServiceClient(AssetServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected AssetServiceClient(AssetServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final AssetServiceSettings getSettings() { + return settings; + } + + public AssetServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ExportAssetsRequest request =
+   *       ExportAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture exportAssetsAsync( + ExportAssetsRequest request) { + return exportAssetsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ExportAssetsRequest request =
+   *       ExportAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       assetServiceClient.exportAssetsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportAssetsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportAssetsOperationCallable() { + return stub.exportAssetsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ExportAssetsRequest request =
+   *       ExportAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.exportAssetsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportAssetsCallable() { + return stub.exportAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ResourceName parent = FolderName.of("[FOLDER]");
+   *   for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the organization, folder, or project the assets belong to. + * Format: "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" + * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(ResourceName parent) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
+   *   for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the organization, folder, or project the assets belong to. + * Format: "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" + * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(String parent) { + ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { + return listAssetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Asset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsPagedCallable() { + return stub.listAssetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   while (true) {
+   *     ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request);
+   *     for (Asset element : response.getAssetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsCallable() { + return stub.listAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   BatchGetAssetsHistoryRequest request =
+   *       BatchGetAssetsHistoryRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .addAllAssetNames(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setReadTimeWindow(TimeWindow.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( + BatchGetAssetsHistoryRequest request) { + return batchGetAssetsHistoryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   BatchGetAssetsHistoryRequest request =
+   *       BatchGetAssetsHistoryRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .addAllAssetNames(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setReadTimeWindow(TimeWindow.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request);
+   *   // Do something.
+   *   BatchGetAssetsHistoryResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchGetAssetsHistoryCallable() { + return stub.batchGetAssetsHistoryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a feed in a parent project/folder/organization to listen to its asset updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Feed response = assetServiceClient.createFeed(parent);
+   * }
+   * }
+ * + * @param parent Required. The name of the project/folder/organization where this feed should be + * created in. It can only be an organization number (such as "organizations/123"), a folder + * number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a + * project number (such as "projects/12345"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed createFeed(String parent) { + CreateFeedRequest request = CreateFeedRequest.newBuilder().setParent(parent).build(); + return createFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a feed in a parent project/folder/organization to listen to its asset updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   CreateFeedRequest request =
+   *       CreateFeedRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFeedId("feedId-1278410919")
+   *           .setFeed(Feed.newBuilder().build())
+   *           .build();
+   *   Feed response = assetServiceClient.createFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed createFeed(CreateFeedRequest request) { + return createFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a feed in a parent project/folder/organization to listen to its asset updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   CreateFeedRequest request =
+   *       CreateFeedRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFeedId("feedId-1278410919")
+   *           .setFeed(Feed.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request);
+   *   // Do something.
+   *   Feed response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFeedCallable() { + return stub.createFeedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   Feed response = assetServiceClient.getFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed getFeed(FeedName name) { + GetFeedRequest request = + GetFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
+   *   Feed response = assetServiceClient.getFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed getFeed(String name) { + GetFeedRequest request = GetFeedRequest.newBuilder().setName(name).build(); + return getFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   GetFeedRequest request =
+   *       GetFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   Feed response = assetServiceClient.getFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed getFeed(GetFeedRequest request) { + return getFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   GetFeedRequest request =
+   *       GetFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request);
+   *   // Do something.
+   *   Feed response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFeedCallable() { + return stub.getFeedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all asset feeds in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   ListFeedsResponse response = assetServiceClient.listFeeds(parent);
+   * }
+   * }
+ * + * @param parent Required. The parent project/folder/organization whose feeds are to be listed. It + * can only be using project/folder/organization number (such as "folders/12345")", or a + * project ID (such as "projects/my-project-id"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeedsResponse listFeeds(String parent) { + ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent(parent).build(); + return listFeeds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all asset feeds in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListFeedsRequest request =
+   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
+   *   ListFeedsResponse response = assetServiceClient.listFeeds(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeedsResponse listFeeds(ListFeedsRequest request) { + return listFeedsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all asset feeds in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListFeedsRequest request =
+   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
+   *   ApiFuture future =
+   *       assetServiceClient.listFeedsCallable().futureCall(request);
+   *   // Do something.
+   *   ListFeedsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable listFeedsCallable() { + return stub.listFeedsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset feed configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   Feed feed = Feed.newBuilder().build();
+   *   Feed response = assetServiceClient.updateFeed(feed);
+   * }
+   * }
+ * + * @param feed Required. The new values of feed details. It must match an existing feed and the + * field `name` must be in the format of: projects/project_number/feeds/feed_id or + * folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed updateFeed(Feed feed) { + UpdateFeedRequest request = UpdateFeedRequest.newBuilder().setFeed(feed).build(); + return updateFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset feed configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   UpdateFeedRequest request =
+   *       UpdateFeedRequest.newBuilder()
+   *           .setFeed(Feed.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Feed response = assetServiceClient.updateFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed updateFeed(UpdateFeedRequest request) { + return updateFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset feed configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   UpdateFeedRequest request =
+   *       UpdateFeedRequest.newBuilder()
+   *           .setFeed(Feed.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request);
+   *   // Do something.
+   *   Feed response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateFeedCallable() { + return stub.updateFeedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   assetServiceClient.deleteFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(FeedName name) { + DeleteFeedRequest request = + DeleteFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
+   *   assetServiceClient.deleteFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(String name) { + DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); + deleteFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   DeleteFeedRequest request =
+   *       DeleteFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   assetServiceClient.deleteFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(DeleteFeedRequest request) { + deleteFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   DeleteFeedRequest request =
+   *       DeleteFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFeedCallable() { + return stub.deleteFeedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String scope = "scope109264468";
+   *   String query = "query107944136";
+   *   List assetTypes = new ArrayList<>();
+   *   for (ResourceSearchResult element :
+   *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param scope Required. A scope can be a project, a folder, or an organization. The search is + * limited to the resources within the `scope`. The caller must be granted the + * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * permission on the desired scope. + *

The allowed values are: + *

    + *
  • projects/{PROJECT_ID} (e.g., "projects/foo-bar") + *
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678") + *
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567") + *
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + *
+ * + * @param query Optional. The query statement. See [how to construct a + * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + * for more information. If not specified or empty, it will search all the resources within + * the specified `scope`. + *

Examples: + *

    + *
  • `name:Important` to find Cloud resources whose name contains "Important" as a word. + *
  • `name=Important` to find the Cloud resource whose name is exactly "Important". + *
  • `displayName:Impor*` to find Cloud resources whose display name contains "Impor" + * as a prefix of any word in the field. + *
  • `location:us-west*` to find Cloud resources whose location contains both "us" and + * "west" as prefixes. + *
  • `labels:prod` to find Cloud resources whose labels contain "prod" as a key or value. + *
  • `labels.env:prod` to find Cloud resources that have a label "env" and its value is + * "prod". + *
  • `labels.env:*` to find Cloud resources that have a label "env". + *
  • `kmsKey:key` to find Cloud resources encrypted with a customer-managed encryption key + * whose name contains the word "key". + *
  • `relationships:instance-group-1` to find Cloud resources that have relationships with + * "instance-group-1" in the related resource name. + *
  • `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that have + * relationships of type "INSTANCE_TO_INSTANCEGROUP". + *
  • `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find compute instances + * that have relationships with "instance-group-1" in the compute instance group + * resource name, for relationship type "INSTANCE_TO_INSTANCEGROUP". + *
  • `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a word. + *
  • `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain "ACTIVE" as a + * word. + *
  • `createTime<1609459200` to find Cloud resources that were created before + * "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 + * UTC" in seconds. + *
  • `updateTime>1609459200` to find Cloud resources that were updated after + * "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 + * UTC" in seconds. + *
  • `Important` to find Cloud resources that contain "Important" as a word in any of the + * searchable fields. + *
  • `Impor*` to find Cloud resources that contain "Impor" as a prefix of any word in + * any of the searchable fields. + *
  • `Important location:(us-west1 OR global)` to find Cloud resources that contain + * "Important" as a word in any of the searchable fields and are also located in the + * "us-west1" region or the "global" location. + *
+ * + * @param assetTypes Optional. A list of asset types that this request searches for. If empty, it + * will search all the [searchable asset + * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + *

Regular expressions are also supported. For example: + *

    + *
  • "compute.googleapis.com.*" snapshots resources whose asset type starts with + * "compute.googleapis.com". + *
  • ".*Instance" snapshots resources whose asset type ends with "Instance". + *
  • ".*Instance.*" snapshots resources whose asset type contains "Instance". + *
+ *

See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular + * expression syntax. If the regular expression does not match any supported asset type, an + * INVALID_ARGUMENT error will be returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllResourcesPagedResponse searchAllResources( + String scope, String query, List assetTypes) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope(scope) + .setQuery(query) + .addAllAssetTypes(assetTypes) + .build(); + return searchAllResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllResourcesRequest request =
+   *       SearchAllResourcesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   for (ResourceSearchResult element :
+   *       assetServiceClient.searchAllResources(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllResourcesPagedResponse searchAllResources( + SearchAllResourcesRequest request) { + return searchAllResourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllResourcesRequest request =
+   *       SearchAllResourcesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.searchAllResourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ResourceSearchResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllResourcesPagedCallable() { + return stub.searchAllResourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllResourcesRequest request =
+   *       SearchAllResourcesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     SearchAllResourcesResponse response =
+   *         assetServiceClient.searchAllResourcesCallable().call(request);
+   *     for (ResourceSearchResult element : response.getResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllResourcesCallable() { + return stub.searchAllResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String scope = "scope109264468";
+   *   String query = "query107944136";
+   *   for (IamPolicySearchResult element :
+   *       assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param scope Required. A scope can be a project, a folder, or an organization. The search is + * limited to the IAM policies within the `scope`. The caller must be granted the + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * permission on the desired scope. + *

The allowed values are: + *

    + *
  • projects/{PROJECT_ID} (e.g., "projects/foo-bar") + *
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678") + *
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567") + *
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + *
+ * + * @param query Optional. The query statement. See [how to construct a + * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + * for more information. If not specified or empty, it will search all the IAM policies within + * the specified `scope`. Note that the query string is compared against each Cloud IAM policy + * binding, including its principals, roles, and Cloud IAM conditions. The returned Cloud IAM + * policies will only contain the bindings that match your query. To learn more about the IAM + * policy structure, see the [IAM policy + * documentation](https://cloud.google.com/iam/help/allow-policies/structure). + *

Examples: + *

    + *
  • `policy:amy{@literal @}gmail.com` to find IAM policy bindings that specify user + * "amy{@literal @}gmail.com". + *
  • `policy:roles/compute.admin` to find IAM policy bindings that specify the Compute + * Admin role. + *
  • `policy:comp*` to find IAM policy bindings that contain "comp" as a prefix of any + * word in the binding. + *
  • `policy.role.permissions:storage.buckets.update` to find IAM policy bindings that + * specify a role containing "storage.buckets.update" permission. Note that if callers + * don't have `iam.roles.get` access to a role's included permissions, policy bindings + * that specify this role will be dropped from the search results. + *
  • `policy.role.permissions:upd*` to find IAM policy bindings that specify a role + * containing "upd" as a prefix of any word in the role permission. Note that if callers + * don't have `iam.roles.get` access to a role's included permissions, policy bindings + * that specify this role will be dropped from the search results. + *
  • `resource:organizations/123456` to find IAM policy bindings that are set on + * "organizations/123456". + *
  • `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to find IAM + * policy bindings that are set on the project named "myproject". + *
  • `Important` to find IAM policy bindings that contain "Important" as a word in any of + * the searchable fields (except for the included permissions). + *
  • `resource:(instance1 OR instance2) policy:amy` to find IAM policy bindings that are + * set on resources "instance1" or "instance2" and also specify user "amy". + *
  • `roles:roles/compute.admin` to find IAM policy bindings that specify the Compute + * Admin role. + *
  • `memberTypes:user` to find IAM policy bindings that contain the principal type + * "user". + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder().setScope(scope).setQuery(query).build(); + return searchAllIamPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllIamPoliciesRequest request =
+   *       SearchAllIamPoliciesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (IamPolicySearchResult element :
+   *       assetServiceClient.searchAllIamPolicies(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( + SearchAllIamPoliciesRequest request) { + return searchAllIamPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllIamPoliciesRequest request =
+   *       SearchAllIamPoliciesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (IamPolicySearchResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllIamPoliciesPagedCallable() { + return stub.searchAllIamPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllIamPoliciesRequest request =
+   *       SearchAllIamPoliciesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     SearchAllIamPoliciesResponse response =
+   *         assetServiceClient.searchAllIamPoliciesCallable().call(request);
+   *     for (IamPolicySearchResult element : response.getResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllIamPoliciesCallable() { + return stub.searchAllIamPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyzes IAM policies to answer which identities have what accesses on which resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   AnalyzeIamPolicyRequest request =
+   *       AnalyzeIamPolicyRequest.newBuilder()
+   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
+   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
+   *           .setExecutionTimeout(Duration.newBuilder().build())
+   *           .build();
+   *   AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest request) { + return analyzeIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Analyzes IAM policies to answer which identities have what accesses on which resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   AnalyzeIamPolicyRequest request =
+   *       AnalyzeIamPolicyRequest.newBuilder()
+   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
+   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
+   *           .setExecutionTimeout(Duration.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.analyzeIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   AnalyzeIamPolicyResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + analyzeIamPolicyCallable() { + return stub.analyzeIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   AnalyzeIamPolicyLongrunningRequest request =
+   *       AnalyzeIamPolicyLongrunningRequest.newBuilder()
+   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
+   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
+   *           .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build())
+   *           .build();
+   *   AnalyzeIamPolicyLongrunningResponse response =
+   *       assetServiceClient.analyzeIamPolicyLongrunningAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest request) { + return analyzeIamPolicyLongrunningOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   AnalyzeIamPolicyLongrunningRequest request =
+   *       AnalyzeIamPolicyLongrunningRequest.newBuilder()
+   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
+   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
+   *           .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build())
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AnalyzeIamPolicyLongrunningResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationCallable() { + return stub.analyzeIamPolicyLongrunningOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   AnalyzeIamPolicyLongrunningRequest request =
+   *       AnalyzeIamPolicyLongrunningRequest.newBuilder()
+   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
+   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
+   *           .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.analyzeIamPolicyLongrunningCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + analyzeIamPolicyLongrunningCallable() { + return stub.analyzeIamPolicyLongrunningCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   AnalyzeMoveRequest request =
+   *       AnalyzeMoveRequest.newBuilder()
+   *           .setResource("resource-341064690")
+   *           .setDestinationParent("destinationParent-1733659048")
+   *           .build();
+   *   AnalyzeMoveResponse response = assetServiceClient.analyzeMove(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnalyzeMoveResponse analyzeMove(AnalyzeMoveRequest request) { + return analyzeMoveCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   AnalyzeMoveRequest request =
+   *       AnalyzeMoveRequest.newBuilder()
+   *           .setResource("resource-341064690")
+   *           .setDestinationParent("destinationParent-1733659048")
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.analyzeMoveCallable().futureCall(request);
+   *   // Do something.
+   *   AnalyzeMoveResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable analyzeMoveCallable() { + return stub.analyzeMoveCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Issue a job that queries assets using a SQL statement compatible with [BigQuery Standard + * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   QueryAssetsRequest request =
+   *       QueryAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setTimeout(Duration.newBuilder().build())
+   *           .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build())
+   *           .build();
+   *   QueryAssetsResponse response = assetServiceClient.queryAssets(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueryAssetsResponse queryAssets(QueryAssetsRequest request) { + return queryAssetsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Issue a job that queries assets using a SQL statement compatible with [BigQuery Standard + * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   QueryAssetsRequest request =
+   *       QueryAssetsRequest.newBuilder()
+   *           .setParent(FolderName.of("[FOLDER]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setTimeout(Duration.newBuilder().build())
+   *           .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.queryAssetsCallable().futureCall(request);
+   *   // Do something.
+   *   QueryAssetsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable queryAssetsCallable() { + return stub.queryAssetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a saved query in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
+   *   String savedQueryId = "savedQueryId378086268";
+   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
+   * }
+   * }
+ * + * @param parent Required. The name of the project/folder/organization where this saved_query + * should be created in. It can only be an organization number (such as "organizations/123"), + * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", + * or a project number (such as "projects/12345"). + * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will + * be generated based on the parent and saved_query_id. + * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the + * specified parent. It will become the final component of the saved query's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Notice that this field is required in the saved query creation, and the `name` field of + * the `saved_query` will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery createSavedQuery( + FolderName parent, SavedQuery savedQuery, String savedQueryId) { + CreateSavedQueryRequest request = + CreateSavedQueryRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSavedQuery(savedQuery) + .setSavedQueryId(savedQueryId) + .build(); + return createSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a saved query in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
+   *   String savedQueryId = "savedQueryId378086268";
+   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
+   * }
+   * }
+ * + * @param parent Required. The name of the project/folder/organization where this saved_query + * should be created in. It can only be an organization number (such as "organizations/123"), + * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", + * or a project number (such as "projects/12345"). + * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will + * be generated based on the parent and saved_query_id. + * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the + * specified parent. It will become the final component of the saved query's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Notice that this field is required in the saved query creation, and the `name` field of + * the `saved_query` will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery createSavedQuery( + OrganizationName parent, SavedQuery savedQuery, String savedQueryId) { + CreateSavedQueryRequest request = + CreateSavedQueryRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSavedQuery(savedQuery) + .setSavedQueryId(savedQueryId) + .build(); + return createSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a saved query in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
+   *   String savedQueryId = "savedQueryId378086268";
+   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
+   * }
+   * }
+ * + * @param parent Required. The name of the project/folder/organization where this saved_query + * should be created in. It can only be an organization number (such as "organizations/123"), + * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", + * or a project number (such as "projects/12345"). + * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will + * be generated based on the parent and saved_query_id. + * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the + * specified parent. It will become the final component of the saved query's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Notice that this field is required in the saved query creation, and the `name` field of + * the `saved_query` will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery createSavedQuery( + ProjectName parent, SavedQuery savedQuery, String savedQueryId) { + CreateSavedQueryRequest request = + CreateSavedQueryRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSavedQuery(savedQuery) + .setSavedQueryId(savedQueryId) + .build(); + return createSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a saved query in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
+   *   String savedQueryId = "savedQueryId378086268";
+   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
+   * }
+   * }
+ * + * @param parent Required. The name of the project/folder/organization where this saved_query + * should be created in. It can only be an organization number (such as "organizations/123"), + * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", + * or a project number (such as "projects/12345"). + * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will + * be generated based on the parent and saved_query_id. + * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the + * specified parent. It will become the final component of the saved query's resource name. + *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. + *

Notice that this field is required in the saved query creation, and the `name` field of + * the `saved_query` will be ignored. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery createSavedQuery( + String parent, SavedQuery savedQuery, String savedQueryId) { + CreateSavedQueryRequest request = + CreateSavedQueryRequest.newBuilder() + .setParent(parent) + .setSavedQuery(savedQuery) + .setSavedQueryId(savedQueryId) + .build(); + return createSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a saved query in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   CreateSavedQueryRequest request =
+   *       CreateSavedQueryRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setSavedQuery(SavedQuery.newBuilder().build())
+   *           .setSavedQueryId("savedQueryId378086268")
+   *           .build();
+   *   SavedQuery response = assetServiceClient.createSavedQuery(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery createSavedQuery(CreateSavedQueryRequest request) { + return createSavedQueryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a saved query in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   CreateSavedQueryRequest request =
+   *       CreateSavedQueryRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setSavedQuery(SavedQuery.newBuilder().build())
+   *           .setSavedQueryId("savedQueryId378086268")
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.createSavedQueryCallable().futureCall(request);
+   *   // Do something.
+   *   SavedQuery response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createSavedQueryCallable() { + return stub.createSavedQueryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]");
+   *   SavedQuery response = assetServiceClient.getSavedQuery(name);
+   * }
+   * }
+ * + * @param name Required. The name of the saved query and it must be in the format of: + *
    + *
  • projects/project_number/savedQueries/saved_query_id + *
  • folders/folder_number/savedQueries/saved_query_id + *
  • organizations/organization_number/savedQueries/saved_query_id + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery getSavedQuery(SavedQueryName name) { + GetSavedQueryRequest request = + GetSavedQueryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString();
+   *   SavedQuery response = assetServiceClient.getSavedQuery(name);
+   * }
+   * }
+ * + * @param name Required. The name of the saved query and it must be in the format of: + *
    + *
  • projects/project_number/savedQueries/saved_query_id + *
  • folders/folder_number/savedQueries/saved_query_id + *
  • organizations/organization_number/savedQueries/saved_query_id + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery getSavedQuery(String name) { + GetSavedQueryRequest request = GetSavedQueryRequest.newBuilder().setName(name).build(); + return getSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   GetSavedQueryRequest request =
+   *       GetSavedQueryRequest.newBuilder()
+   *           .setName(
+   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
+   *           .build();
+   *   SavedQuery response = assetServiceClient.getSavedQuery(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery getSavedQuery(GetSavedQueryRequest request) { + return getSavedQueryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   GetSavedQueryRequest request =
+   *       GetSavedQueryRequest.newBuilder()
+   *           .setName(
+   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.getSavedQueryCallable().futureCall(request);
+   *   // Do something.
+   *   SavedQuery response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSavedQueryCallable() { + return stub.getSavedQueryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all saved queries in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FolderName parent = FolderName.of("[FOLDER]");
+   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent project/folder/organization whose savedQueries are to be + * listed. It can only be using project/folder/organization number (such as "folders/12345")", + * or a project ID (such as "projects/my-project-id"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSavedQueriesPagedResponse listSavedQueries(FolderName parent) { + ListSavedQueriesRequest request = + ListSavedQueriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSavedQueries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all saved queries in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent project/folder/organization whose savedQueries are to be + * listed. It can only be using project/folder/organization number (such as "folders/12345")", + * or a project ID (such as "projects/my-project-id"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSavedQueriesPagedResponse listSavedQueries(OrganizationName parent) { + ListSavedQueriesRequest request = + ListSavedQueriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSavedQueries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all saved queries in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent project/folder/organization whose savedQueries are to be + * listed. It can only be using project/folder/organization number (such as "folders/12345")", + * or a project ID (such as "projects/my-project-id"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSavedQueriesPagedResponse listSavedQueries(ProjectName parent) { + ListSavedQueriesRequest request = + ListSavedQueriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSavedQueries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all saved queries in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent project/folder/organization whose savedQueries are to be + * listed. It can only be using project/folder/organization number (such as "folders/12345")", + * or a project ID (such as "projects/my-project-id"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSavedQueriesPagedResponse listSavedQueries(String parent) { + ListSavedQueriesRequest request = + ListSavedQueriesRequest.newBuilder().setParent(parent).build(); + return listSavedQueries(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all saved queries in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListSavedQueriesRequest request =
+   *       ListSavedQueriesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SavedQuery element : assetServiceClient.listSavedQueries(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSavedQueriesPagedResponse listSavedQueries(ListSavedQueriesRequest request) { + return listSavedQueriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all saved queries in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListSavedQueriesRequest request =
+   *       ListSavedQueriesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.listSavedQueriesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SavedQuery element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSavedQueriesPagedCallable() { + return stub.listSavedQueriesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all saved queries in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListSavedQueriesRequest request =
+   *       ListSavedQueriesRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListSavedQueriesResponse response =
+   *         assetServiceClient.listSavedQueriesCallable().call(request);
+   *     for (SavedQuery element : response.getSavedQueriesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSavedQueriesCallable() { + return stub.listSavedQueriesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SavedQuery response = assetServiceClient.updateSavedQuery(savedQuery, updateMask);
+   * }
+   * }
+ * + * @param savedQuery Required. The saved query to update. + *

The saved query's `name` field is used to identify the one to update, which has format + * as below: + *

    + *
  • projects/project_number/savedQueries/saved_query_id + *
  • folders/folder_number/savedQueries/saved_query_id + *
  • organizations/organization_number/savedQueries/saved_query_id + *
+ * + * @param updateMask Required. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery updateSavedQuery(SavedQuery savedQuery, FieldMask updateMask) { + UpdateSavedQueryRequest request = + UpdateSavedQueryRequest.newBuilder() + .setSavedQuery(savedQuery) + .setUpdateMask(updateMask) + .build(); + return updateSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   UpdateSavedQueryRequest request =
+   *       UpdateSavedQueryRequest.newBuilder()
+   *           .setSavedQuery(SavedQuery.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   SavedQuery response = assetServiceClient.updateSavedQuery(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SavedQuery updateSavedQuery(UpdateSavedQueryRequest request) { + return updateSavedQueryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   UpdateSavedQueryRequest request =
+   *       UpdateSavedQueryRequest.newBuilder()
+   *           .setSavedQuery(SavedQuery.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.updateSavedQueryCallable().futureCall(request);
+   *   // Do something.
+   *   SavedQuery response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSavedQueryCallable() { + return stub.updateSavedQueryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]");
+   *   assetServiceClient.deleteSavedQuery(name);
+   * }
+   * }
+ * + * @param name Required. The name of the saved query to delete. It must be in the format of: + *
    + *
  • projects/project_number/savedQueries/saved_query_id + *
  • folders/folder_number/savedQueries/saved_query_id + *
  • organizations/organization_number/savedQueries/saved_query_id + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSavedQuery(SavedQueryName name) { + DeleteSavedQueryRequest request = + DeleteSavedQueryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString();
+   *   assetServiceClient.deleteSavedQuery(name);
+   * }
+   * }
+ * + * @param name Required. The name of the saved query to delete. It must be in the format of: + *
    + *
  • projects/project_number/savedQueries/saved_query_id + *
  • folders/folder_number/savedQueries/saved_query_id + *
  • organizations/organization_number/savedQueries/saved_query_id + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSavedQuery(String name) { + DeleteSavedQueryRequest request = DeleteSavedQueryRequest.newBuilder().setName(name).build(); + deleteSavedQuery(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   DeleteSavedQueryRequest request =
+   *       DeleteSavedQueryRequest.newBuilder()
+   *           .setName(
+   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
+   *           .build();
+   *   assetServiceClient.deleteSavedQuery(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSavedQuery(DeleteSavedQueryRequest request) { + deleteSavedQueryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a saved query. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   DeleteSavedQueryRequest request =
+   *       DeleteSavedQueryRequest.newBuilder()
+   *           .setName(
+   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.deleteSavedQueryCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSavedQueryCallable() { + return stub.deleteSavedQueryCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets effective IAM policies for a batch of resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   BatchGetEffectiveIamPoliciesRequest request =
+   *       BatchGetEffectiveIamPoliciesRequest.newBuilder()
+   *           .setScope(FolderName.of("[FOLDER]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchGetEffectiveIamPoliciesResponse response =
+   *       assetServiceClient.batchGetEffectiveIamPolicies(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchGetEffectiveIamPoliciesResponse batchGetEffectiveIamPolicies( + BatchGetEffectiveIamPoliciesRequest request) { + return batchGetEffectiveIamPoliciesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets effective IAM policies for a batch of resources. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   BatchGetEffectiveIamPoliciesRequest request =
+   *       BatchGetEffectiveIamPoliciesRequest.newBuilder()
+   *           .setScope(FolderName.of("[FOLDER]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.batchGetEffectiveIamPoliciesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchGetEffectiveIamPoliciesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesCallable() { + return stub.batchGetEffectiveIamPoliciesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAssetsPagedResponse + extends AbstractPagedListResponse< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListAssetsPagedResponse(ListAssetsPage page) { + super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAssetsPage + extends AbstractPage { + + private ListAssetsPage( + PageContext context, + ListAssetsResponse response) { + super(context, response); + } + + private static ListAssetsPage createEmptyPage() { + return new ListAssetsPage(null, null); + } + + @Override + protected ListAssetsPage createPage( + PageContext context, + ListAssetsResponse response) { + return new ListAssetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAssetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + private ListAssetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAssetsFixedSizeCollection createEmptyCollection() { + return new ListAssetsFixedSizeCollection(null, 0); + } + + @Override + protected ListAssetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAssetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchAllResourcesPagedResponse + extends AbstractPagedListResponse< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + ResourceSearchResult, + SearchAllResourcesPage, + SearchAllResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchAllResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchAllResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchAllResourcesPagedResponse(SearchAllResourcesPage page) { + super(page, SearchAllResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchAllResourcesPage + extends AbstractPage< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + ResourceSearchResult, + SearchAllResourcesPage> { + + private SearchAllResourcesPage( + PageContext + context, + SearchAllResourcesResponse response) { + super(context, response); + } + + private static SearchAllResourcesPage createEmptyPage() { + return new SearchAllResourcesPage(null, null); + } + + @Override + protected SearchAllResourcesPage createPage( + PageContext + context, + SearchAllResourcesResponse response) { + return new SearchAllResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchAllResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + ResourceSearchResult, + SearchAllResourcesPage, + SearchAllResourcesFixedSizeCollection> { + + private SearchAllResourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchAllResourcesFixedSizeCollection createEmptyCollection() { + return new SearchAllResourcesFixedSizeCollection(null, 0); + } + + @Override + protected SearchAllResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchAllResourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchAllIamPoliciesPagedResponse + extends AbstractPagedListResponse< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult, + SearchAllIamPoliciesPage, + SearchAllIamPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchAllIamPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchAllIamPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchAllIamPoliciesPagedResponse(SearchAllIamPoliciesPage page) { + super(page, SearchAllIamPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchAllIamPoliciesPage + extends AbstractPage< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult, + SearchAllIamPoliciesPage> { + + private SearchAllIamPoliciesPage( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + SearchAllIamPoliciesResponse response) { + super(context, response); + } + + private static SearchAllIamPoliciesPage createEmptyPage() { + return new SearchAllIamPoliciesPage(null, null); + } + + @Override + protected SearchAllIamPoliciesPage createPage( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + SearchAllIamPoliciesResponse response) { + return new SearchAllIamPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchAllIamPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult, + SearchAllIamPoliciesPage, + SearchAllIamPoliciesFixedSizeCollection> { + + private SearchAllIamPoliciesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchAllIamPoliciesFixedSizeCollection createEmptyCollection() { + return new SearchAllIamPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected SearchAllIamPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchAllIamPoliciesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSavedQueriesPagedResponse + extends AbstractPagedListResponse< + ListSavedQueriesRequest, + ListSavedQueriesResponse, + SavedQuery, + ListSavedQueriesPage, + ListSavedQueriesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSavedQueriesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSavedQueriesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSavedQueriesPagedResponse(ListSavedQueriesPage page) { + super(page, ListSavedQueriesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSavedQueriesPage + extends AbstractPage< + ListSavedQueriesRequest, ListSavedQueriesResponse, SavedQuery, ListSavedQueriesPage> { + + private ListSavedQueriesPage( + PageContext context, + ListSavedQueriesResponse response) { + super(context, response); + } + + private static ListSavedQueriesPage createEmptyPage() { + return new ListSavedQueriesPage(null, null); + } + + @Override + protected ListSavedQueriesPage createPage( + PageContext context, + ListSavedQueriesResponse response) { + return new ListSavedQueriesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSavedQueriesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSavedQueriesRequest, + ListSavedQueriesResponse, + SavedQuery, + ListSavedQueriesPage, + ListSavedQueriesFixedSizeCollection> { + + private ListSavedQueriesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSavedQueriesFixedSizeCollection createEmptyCollection() { + return new ListSavedQueriesFixedSizeCollection(null, 0); + } + + @Override + protected ListSavedQueriesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSavedQueriesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java new file mode 100644 index 000000000000..40c2557ae991 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java @@ -0,0 +1,468 @@ +/* + * Copyright 2022 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.v1; + +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1.stub.AssetServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchGetAssetsHistory to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .batchGetAssetsHistorySettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder
+ *             .batchGetAssetsHistorySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AssetServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to exportAssets. */ + public UnaryCallSettings exportAssetsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).exportAssetsSettings(); + } + + /** Returns the object with the settings used for calls to exportAssets. */ + public OperationCallSettings + exportAssetsOperationSettings() { + return ((AssetServiceStubSettings) getStubSettings()).exportAssetsOperationSettings(); + } + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).listAssetsSettings(); + } + + /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ + public UnaryCallSettings + batchGetAssetsHistorySettings() { + return ((AssetServiceStubSettings) getStubSettings()).batchGetAssetsHistorySettings(); + } + + /** Returns the object with the settings used for calls to createFeed. */ + public UnaryCallSettings createFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).createFeedSettings(); + } + + /** Returns the object with the settings used for calls to getFeed. */ + public UnaryCallSettings getFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).getFeedSettings(); + } + + /** Returns the object with the settings used for calls to listFeeds. */ + public UnaryCallSettings listFeedsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).listFeedsSettings(); + } + + /** Returns the object with the settings used for calls to updateFeed. */ + public UnaryCallSettings updateFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).updateFeedSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeed. */ + public UnaryCallSettings deleteFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).deleteFeedSettings(); + } + + /** Returns the object with the settings used for calls to searchAllResources. */ + public PagedCallSettings< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return ((AssetServiceStubSettings) getStubSettings()).searchAllResourcesSettings(); + } + + /** Returns the object with the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return ((AssetServiceStubSettings) getStubSettings()).searchAllIamPoliciesSettings(); + } + + /** Returns the object with the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings + analyzeIamPolicySettings() { + return ((AssetServiceStubSettings) getStubSettings()).analyzeIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ + public UnaryCallSettings + analyzeIamPolicyLongrunningSettings() { + return ((AssetServiceStubSettings) getStubSettings()).analyzeIamPolicyLongrunningSettings(); + } + + /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ + public OperationCallSettings< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationSettings() { + return ((AssetServiceStubSettings) getStubSettings()) + .analyzeIamPolicyLongrunningOperationSettings(); + } + + /** Returns the object with the settings used for calls to analyzeMove. */ + public UnaryCallSettings analyzeMoveSettings() { + return ((AssetServiceStubSettings) getStubSettings()).analyzeMoveSettings(); + } + + /** Returns the object with the settings used for calls to queryAssets. */ + public UnaryCallSettings queryAssetsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).queryAssetsSettings(); + } + + /** Returns the object with the settings used for calls to createSavedQuery. */ + public UnaryCallSettings createSavedQuerySettings() { + return ((AssetServiceStubSettings) getStubSettings()).createSavedQuerySettings(); + } + + /** Returns the object with the settings used for calls to getSavedQuery. */ + public UnaryCallSettings getSavedQuerySettings() { + return ((AssetServiceStubSettings) getStubSettings()).getSavedQuerySettings(); + } + + /** Returns the object with the settings used for calls to listSavedQueries. */ + public PagedCallSettings< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> + listSavedQueriesSettings() { + return ((AssetServiceStubSettings) getStubSettings()).listSavedQueriesSettings(); + } + + /** Returns the object with the settings used for calls to updateSavedQuery. */ + public UnaryCallSettings updateSavedQuerySettings() { + return ((AssetServiceStubSettings) getStubSettings()).updateSavedQuerySettings(); + } + + /** Returns the object with the settings used for calls to deleteSavedQuery. */ + public UnaryCallSettings deleteSavedQuerySettings() { + return ((AssetServiceStubSettings) getStubSettings()).deleteSavedQuerySettings(); + } + + /** Returns the object with the settings used for calls to batchGetEffectiveIamPolicies. */ + public UnaryCallSettings< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesSettings() { + return ((AssetServiceStubSettings) getStubSettings()).batchGetEffectiveIamPoliciesSettings(); + } + + public static final AssetServiceSettings create(AssetServiceStubSettings stub) + throws IOException { + return new AssetServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AssetServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AssetServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AssetServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AssetServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AssetServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AssetServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AssetServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AssetServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AssetServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); + } + + public AssetServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AssetServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + public UnaryCallSettings.Builder exportAssetsSettings() { + return getStubSettingsBuilder().exportAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + public OperationCallSettings.Builder< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings() { + return getStubSettingsBuilder().exportAssetsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return getStubSettingsBuilder().listAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ + public UnaryCallSettings.Builder + batchGetAssetsHistorySettings() { + return getStubSettingsBuilder().batchGetAssetsHistorySettings(); + } + + /** Returns the builder for the settings used for calls to createFeed. */ + public UnaryCallSettings.Builder createFeedSettings() { + return getStubSettingsBuilder().createFeedSettings(); + } + + /** Returns the builder for the settings used for calls to getFeed. */ + public UnaryCallSettings.Builder getFeedSettings() { + return getStubSettingsBuilder().getFeedSettings(); + } + + /** Returns the builder for the settings used for calls to listFeeds. */ + public UnaryCallSettings.Builder listFeedsSettings() { + return getStubSettingsBuilder().listFeedsSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeed. */ + public UnaryCallSettings.Builder updateFeedSettings() { + return getStubSettingsBuilder().updateFeedSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeed. */ + public UnaryCallSettings.Builder deleteFeedSettings() { + return getStubSettingsBuilder().deleteFeedSettings(); + } + + /** Returns the builder for the settings used for calls to searchAllResources. */ + public PagedCallSettings.Builder< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return getStubSettingsBuilder().searchAllResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings.Builder< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return getStubSettingsBuilder().searchAllIamPoliciesSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings.Builder + analyzeIamPolicySettings() { + return getStubSettingsBuilder().analyzeIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ + public UnaryCallSettings.Builder + analyzeIamPolicyLongrunningSettings() { + return getStubSettingsBuilder().analyzeIamPolicyLongrunningSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ + public OperationCallSettings.Builder< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationSettings() { + return getStubSettingsBuilder().analyzeIamPolicyLongrunningOperationSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeMove. */ + public UnaryCallSettings.Builder + analyzeMoveSettings() { + return getStubSettingsBuilder().analyzeMoveSettings(); + } + + /** Returns the builder for the settings used for calls to queryAssets. */ + public UnaryCallSettings.Builder + queryAssetsSettings() { + return getStubSettingsBuilder().queryAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to createSavedQuery. */ + public UnaryCallSettings.Builder + createSavedQuerySettings() { + return getStubSettingsBuilder().createSavedQuerySettings(); + } + + /** Returns the builder for the settings used for calls to getSavedQuery. */ + public UnaryCallSettings.Builder getSavedQuerySettings() { + return getStubSettingsBuilder().getSavedQuerySettings(); + } + + /** Returns the builder for the settings used for calls to listSavedQueries. */ + public PagedCallSettings.Builder< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> + listSavedQueriesSettings() { + return getStubSettingsBuilder().listSavedQueriesSettings(); + } + + /** Returns the builder for the settings used for calls to updateSavedQuery. */ + public UnaryCallSettings.Builder + updateSavedQuerySettings() { + return getStubSettingsBuilder().updateSavedQuerySettings(); + } + + /** Returns the builder for the settings used for calls to deleteSavedQuery. */ + public UnaryCallSettings.Builder deleteSavedQuerySettings() { + return getStubSettingsBuilder().deleteSavedQuerySettings(); + } + + /** Returns the builder for the settings used for calls to batchGetEffectiveIamPolicies. */ + public UnaryCallSettings.Builder< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesSettings() { + return getStubSettingsBuilder().batchGetEffectiveIamPoliciesSettings(); + } + + @Override + public AssetServiceSettings build() throws IOException { + return new AssetServiceSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json new file mode 100644 index 000000000000..b3f61cf6ee32 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json @@ -0,0 +1,78 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.asset.v1", + "libraryPackage": "com.google.cloud.asset.v1", + "services": { + "AssetService": { + "clients": { + "grpc": { + "libraryClient": "AssetServiceClient", + "rpcs": { + "AnalyzeIamPolicy": { + "methods": ["analyzeIamPolicy", "analyzeIamPolicyCallable"] + }, + "AnalyzeIamPolicyLongrunning": { + "methods": ["analyzeIamPolicyLongrunningAsync", "analyzeIamPolicyLongrunningOperationCallable", "analyzeIamPolicyLongrunningCallable"] + }, + "AnalyzeMove": { + "methods": ["analyzeMove", "analyzeMoveCallable"] + }, + "BatchGetAssetsHistory": { + "methods": ["batchGetAssetsHistory", "batchGetAssetsHistoryCallable"] + }, + "BatchGetEffectiveIamPolicies": { + "methods": ["batchGetEffectiveIamPolicies", "batchGetEffectiveIamPoliciesCallable"] + }, + "CreateFeed": { + "methods": ["createFeed", "createFeed", "createFeedCallable"] + }, + "CreateSavedQuery": { + "methods": ["createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQueryCallable"] + }, + "DeleteFeed": { + "methods": ["deleteFeed", "deleteFeed", "deleteFeed", "deleteFeedCallable"] + }, + "DeleteSavedQuery": { + "methods": ["deleteSavedQuery", "deleteSavedQuery", "deleteSavedQuery", "deleteSavedQueryCallable"] + }, + "ExportAssets": { + "methods": ["exportAssetsAsync", "exportAssetsOperationCallable", "exportAssetsCallable"] + }, + "GetFeed": { + "methods": ["getFeed", "getFeed", "getFeed", "getFeedCallable"] + }, + "GetSavedQuery": { + "methods": ["getSavedQuery", "getSavedQuery", "getSavedQuery", "getSavedQueryCallable"] + }, + "ListAssets": { + "methods": ["listAssets", "listAssets", "listAssets", "listAssetsPagedCallable", "listAssetsCallable"] + }, + "ListFeeds": { + "methods": ["listFeeds", "listFeeds", "listFeedsCallable"] + }, + "ListSavedQueries": { + "methods": ["listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueriesPagedCallable", "listSavedQueriesCallable"] + }, + "QueryAssets": { + "methods": ["queryAssets", "queryAssetsCallable"] + }, + "SearchAllIamPolicies": { + "methods": ["searchAllIamPolicies", "searchAllIamPolicies", "searchAllIamPoliciesPagedCallable", "searchAllIamPoliciesCallable"] + }, + "SearchAllResources": { + "methods": ["searchAllResources", "searchAllResources", "searchAllResourcesPagedCallable", "searchAllResourcesCallable"] + }, + "UpdateFeed": { + "methods": ["updateFeed", "updateFeed", "updateFeedCallable"] + }, + "UpdateSavedQuery": { + "methods": ["updateSavedQuery", "updateSavedQuery", "updateSavedQueryCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java new file mode 100644 index 000000000000..7ac072c15639 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= AssetServiceClient ======================= + * + *

Service Description: Asset service definition. + * + *

Sample for AssetServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   BatchGetAssetsHistoryRequest request =
+ *       BatchGetAssetsHistoryRequest.newBuilder()
+ *           .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString())
+ *           .addAllAssetNames(new ArrayList())
+ *           .setContentType(ContentType.forNumber(0))
+ *           .setReadTimeWindow(TimeWindow.newBuilder().build())
+ *           .addAllRelationshipTypes(new ArrayList())
+ *           .build();
+ *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.asset.v1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java new file mode 100644 index 000000000000..a8d06aa074ba --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java @@ -0,0 +1,208 @@ +/* + * Copyright 2022 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.v1.stub; + +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1.AnalyzeMoveRequest; +import com.google.cloud.asset.v1.AnalyzeMoveResponse; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; +import com.google.cloud.asset.v1.CreateFeedRequest; +import com.google.cloud.asset.v1.CreateSavedQueryRequest; +import com.google.cloud.asset.v1.DeleteFeedRequest; +import com.google.cloud.asset.v1.DeleteSavedQueryRequest; +import com.google.cloud.asset.v1.ExportAssetsRequest; +import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.GetFeedRequest; +import com.google.cloud.asset.v1.GetSavedQueryRequest; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; +import com.google.cloud.asset.v1.ListFeedsRequest; +import com.google.cloud.asset.v1.ListFeedsResponse; +import com.google.cloud.asset.v1.ListSavedQueriesRequest; +import com.google.cloud.asset.v1.ListSavedQueriesResponse; +import com.google.cloud.asset.v1.QueryAssetsRequest; +import com.google.cloud.asset.v1.QueryAssetsResponse; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1.SearchAllResourcesResponse; +import com.google.cloud.asset.v1.UpdateFeedRequest; +import com.google.cloud.asset.v1.UpdateSavedQueryRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class AssetServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + exportAssetsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportAssetsOperationCallable()"); + } + + public UnaryCallable exportAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: exportAssetsCallable()"); + } + + public UnaryCallable listAssetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); + } + + public UnaryCallable listAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); + } + + public UnaryCallable + batchGetAssetsHistoryCallable() { + throw new UnsupportedOperationException("Not implemented: batchGetAssetsHistoryCallable()"); + } + + public UnaryCallable createFeedCallable() { + throw new UnsupportedOperationException("Not implemented: createFeedCallable()"); + } + + public UnaryCallable getFeedCallable() { + throw new UnsupportedOperationException("Not implemented: getFeedCallable()"); + } + + public UnaryCallable listFeedsCallable() { + throw new UnsupportedOperationException("Not implemented: listFeedsCallable()"); + } + + public UnaryCallable updateFeedCallable() { + throw new UnsupportedOperationException("Not implemented: updateFeedCallable()"); + } + + public UnaryCallable deleteFeedCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeedCallable()"); + } + + public UnaryCallable + searchAllResourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllResourcesPagedCallable()"); + } + + public UnaryCallable + searchAllResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllResourcesCallable()"); + } + + public UnaryCallable + searchAllIamPoliciesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesPagedCallable()"); + } + + public UnaryCallable + searchAllIamPoliciesCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesCallable()"); + } + + public UnaryCallable + analyzeIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeIamPolicyCallable()"); + } + + public OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: analyzeIamPolicyLongrunningOperationCallable()"); + } + + public UnaryCallable + analyzeIamPolicyLongrunningCallable() { + throw new UnsupportedOperationException( + "Not implemented: analyzeIamPolicyLongrunningCallable()"); + } + + public UnaryCallable analyzeMoveCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeMoveCallable()"); + } + + public UnaryCallable queryAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: queryAssetsCallable()"); + } + + public UnaryCallable createSavedQueryCallable() { + throw new UnsupportedOperationException("Not implemented: createSavedQueryCallable()"); + } + + public UnaryCallable getSavedQueryCallable() { + throw new UnsupportedOperationException("Not implemented: getSavedQueryCallable()"); + } + + public UnaryCallable + listSavedQueriesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSavedQueriesPagedCallable()"); + } + + public UnaryCallable + listSavedQueriesCallable() { + throw new UnsupportedOperationException("Not implemented: listSavedQueriesCallable()"); + } + + public UnaryCallable updateSavedQueryCallable() { + throw new UnsupportedOperationException("Not implemented: updateSavedQueryCallable()"); + } + + public UnaryCallable deleteSavedQueryCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSavedQueryCallable()"); + } + + public UnaryCallable + batchGetEffectiveIamPoliciesCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchGetEffectiveIamPoliciesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java new file mode 100644 index 000000000000..c0a4ba15d1ef --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -0,0 +1,1293 @@ +/* + * Copyright 2022 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.v1.stub; + +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1.AnalyzeMoveRequest; +import com.google.cloud.asset.v1.AnalyzeMoveResponse; +import com.google.cloud.asset.v1.Asset; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; +import com.google.cloud.asset.v1.CreateFeedRequest; +import com.google.cloud.asset.v1.CreateSavedQueryRequest; +import com.google.cloud.asset.v1.DeleteFeedRequest; +import com.google.cloud.asset.v1.DeleteSavedQueryRequest; +import com.google.cloud.asset.v1.ExportAssetsRequest; +import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.GetFeedRequest; +import com.google.cloud.asset.v1.GetSavedQueryRequest; +import com.google.cloud.asset.v1.IamPolicySearchResult; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; +import com.google.cloud.asset.v1.ListFeedsRequest; +import com.google.cloud.asset.v1.ListFeedsResponse; +import com.google.cloud.asset.v1.ListSavedQueriesRequest; +import com.google.cloud.asset.v1.ListSavedQueriesResponse; +import com.google.cloud.asset.v1.QueryAssetsRequest; +import com.google.cloud.asset.v1.QueryAssetsResponse; +import com.google.cloud.asset.v1.ResourceSearchResult; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1.SearchAllResourcesResponse; +import com.google.cloud.asset.v1.UpdateFeedRequest; +import com.google.cloud.asset.v1.UpdateSavedQueryRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of batchGetAssetsHistory to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ *     AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .batchGetAssetsHistorySettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder
+ *             .batchGetAssetsHistorySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class AssetServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings exportAssetsSettings; + private final OperationCallSettings< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings; + private final PagedCallSettings + listAssetsSettings; + private final UnaryCallSettings + batchGetAssetsHistorySettings; + private final UnaryCallSettings createFeedSettings; + private final UnaryCallSettings getFeedSettings; + private final UnaryCallSettings listFeedsSettings; + private final UnaryCallSettings updateFeedSettings; + private final UnaryCallSettings deleteFeedSettings; + private final PagedCallSettings< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings; + private final PagedCallSettings< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings; + private final UnaryCallSettings + analyzeIamPolicySettings; + private final UnaryCallSettings + analyzeIamPolicyLongrunningSettings; + private final OperationCallSettings< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationSettings; + private final UnaryCallSettings analyzeMoveSettings; + private final UnaryCallSettings queryAssetsSettings; + private final UnaryCallSettings createSavedQuerySettings; + private final UnaryCallSettings getSavedQuerySettings; + private final PagedCallSettings< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> + listSavedQueriesSettings; + private final UnaryCallSettings updateSavedQuerySettings; + private final UnaryCallSettings deleteSavedQuerySettings; + private final UnaryCallSettings< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesSettings; + + private static final PagedListDescriptor + LIST_ASSETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { + return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { + return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAssetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAssetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAssetsResponse payload) { + return payload.getAssetsList() == null + ? ImmutableList.of() + : payload.getAssetsList(); + } + }; + + private static final PagedListDescriptor< + SearchAllResourcesRequest, SearchAllResourcesResponse, ResourceSearchResult> + SEARCH_ALL_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor< + SearchAllResourcesRequest, SearchAllResourcesResponse, ResourceSearchResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchAllResourcesRequest injectToken( + SearchAllResourcesRequest payload, String token) { + return SearchAllResourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchAllResourcesRequest injectPageSize( + SearchAllResourcesRequest payload, int pageSize) { + return SearchAllResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchAllResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchAllResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchAllResourcesResponse payload) { + return payload.getResultsList() == null + ? ImmutableList.of() + : payload.getResultsList(); + } + }; + + private static final PagedListDescriptor< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchAllIamPoliciesRequest injectToken( + SearchAllIamPoliciesRequest payload, String token) { + return SearchAllIamPoliciesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchAllIamPoliciesRequest injectPageSize( + SearchAllIamPoliciesRequest payload, int pageSize) { + return SearchAllIamPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchAllIamPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchAllIamPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchAllIamPoliciesResponse payload) { + return payload.getResultsList() == null + ? ImmutableList.of() + : payload.getResultsList(); + } + }; + + private static final PagedListDescriptor< + ListSavedQueriesRequest, ListSavedQueriesResponse, SavedQuery> + LIST_SAVED_QUERIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSavedQueriesRequest injectToken( + ListSavedQueriesRequest payload, String token) { + return ListSavedQueriesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSavedQueriesRequest injectPageSize( + ListSavedQueriesRequest payload, int pageSize) { + return ListSavedQueriesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSavedQueriesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSavedQueriesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSavedQueriesResponse payload) { + return payload.getSavedQueriesList() == null + ? ImmutableList.of() + : payload.getSavedQueriesList(); + } + }; + + private static final PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + LIST_ASSETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAssetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); + return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + SEARCH_ALL_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + SearchAllResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchAllResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchAllResourcesRequest, SearchAllResourcesResponse, ResourceSearchResult> + pageContext = + PageContext.create( + callable, SEARCH_ALL_RESOURCES_PAGE_STR_DESC, request, context); + return SearchAllResourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchAllIamPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult> + pageContext = + PageContext.create( + callable, SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC, request, context); + return SearchAllIamPoliciesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> + LIST_SAVED_QUERIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSavedQueriesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SAVED_QUERIES_PAGE_STR_DESC, request, context); + return ListSavedQueriesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to exportAssets. */ + public UnaryCallSettings exportAssetsSettings() { + return exportAssetsSettings; + } + + /** Returns the object with the settings used for calls to exportAssets. */ + public OperationCallSettings + exportAssetsOperationSettings() { + return exportAssetsOperationSettings; + } + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return listAssetsSettings; + } + + /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ + public UnaryCallSettings + batchGetAssetsHistorySettings() { + return batchGetAssetsHistorySettings; + } + + /** Returns the object with the settings used for calls to createFeed. */ + public UnaryCallSettings createFeedSettings() { + return createFeedSettings; + } + + /** Returns the object with the settings used for calls to getFeed. */ + public UnaryCallSettings getFeedSettings() { + return getFeedSettings; + } + + /** Returns the object with the settings used for calls to listFeeds. */ + public UnaryCallSettings listFeedsSettings() { + return listFeedsSettings; + } + + /** Returns the object with the settings used for calls to updateFeed. */ + public UnaryCallSettings updateFeedSettings() { + return updateFeedSettings; + } + + /** Returns the object with the settings used for calls to deleteFeed. */ + public UnaryCallSettings deleteFeedSettings() { + return deleteFeedSettings; + } + + /** Returns the object with the settings used for calls to searchAllResources. */ + public PagedCallSettings< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return searchAllResourcesSettings; + } + + /** Returns the object with the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return searchAllIamPoliciesSettings; + } + + /** Returns the object with the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings + analyzeIamPolicySettings() { + return analyzeIamPolicySettings; + } + + /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ + public UnaryCallSettings + analyzeIamPolicyLongrunningSettings() { + return analyzeIamPolicyLongrunningSettings; + } + + /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ + public OperationCallSettings< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationSettings() { + return analyzeIamPolicyLongrunningOperationSettings; + } + + /** Returns the object with the settings used for calls to analyzeMove. */ + public UnaryCallSettings analyzeMoveSettings() { + return analyzeMoveSettings; + } + + /** Returns the object with the settings used for calls to queryAssets. */ + public UnaryCallSettings queryAssetsSettings() { + return queryAssetsSettings; + } + + /** Returns the object with the settings used for calls to createSavedQuery. */ + public UnaryCallSettings createSavedQuerySettings() { + return createSavedQuerySettings; + } + + /** Returns the object with the settings used for calls to getSavedQuery. */ + public UnaryCallSettings getSavedQuerySettings() { + return getSavedQuerySettings; + } + + /** Returns the object with the settings used for calls to listSavedQueries. */ + public PagedCallSettings< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> + listSavedQueriesSettings() { + return listSavedQueriesSettings; + } + + /** Returns the object with the settings used for calls to updateSavedQuery. */ + public UnaryCallSettings updateSavedQuerySettings() { + return updateSavedQuerySettings; + } + + /** Returns the object with the settings used for calls to deleteSavedQuery. */ + public UnaryCallSettings deleteSavedQuerySettings() { + return deleteSavedQuerySettings; + } + + /** Returns the object with the settings used for calls to batchGetEffectiveIamPolicies. */ + public UnaryCallSettings< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesSettings() { + return batchGetEffectiveIamPoliciesSettings; + } + + public AssetServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAssetServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAssetServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "cloudasset.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudasset.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + exportAssetsSettings = settingsBuilder.exportAssetsSettings().build(); + exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build(); + listAssetsSettings = settingsBuilder.listAssetsSettings().build(); + batchGetAssetsHistorySettings = settingsBuilder.batchGetAssetsHistorySettings().build(); + createFeedSettings = settingsBuilder.createFeedSettings().build(); + getFeedSettings = settingsBuilder.getFeedSettings().build(); + listFeedsSettings = settingsBuilder.listFeedsSettings().build(); + updateFeedSettings = settingsBuilder.updateFeedSettings().build(); + deleteFeedSettings = settingsBuilder.deleteFeedSettings().build(); + searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build(); + searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build(); + analyzeIamPolicySettings = settingsBuilder.analyzeIamPolicySettings().build(); + analyzeIamPolicyLongrunningSettings = + settingsBuilder.analyzeIamPolicyLongrunningSettings().build(); + analyzeIamPolicyLongrunningOperationSettings = + settingsBuilder.analyzeIamPolicyLongrunningOperationSettings().build(); + analyzeMoveSettings = settingsBuilder.analyzeMoveSettings().build(); + queryAssetsSettings = settingsBuilder.queryAssetsSettings().build(); + createSavedQuerySettings = settingsBuilder.createSavedQuerySettings().build(); + getSavedQuerySettings = settingsBuilder.getSavedQuerySettings().build(); + listSavedQueriesSettings = settingsBuilder.listSavedQueriesSettings().build(); + updateSavedQuerySettings = settingsBuilder.updateSavedQuerySettings().build(); + deleteSavedQuerySettings = settingsBuilder.deleteSavedQuerySettings().build(); + batchGetEffectiveIamPoliciesSettings = + settingsBuilder.batchGetEffectiveIamPoliciesSettings().build(); + } + + /** Builder for AssetServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder exportAssetsSettings; + private final OperationCallSettings.Builder< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings; + private final PagedCallSettings.Builder< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + listAssetsSettings; + private final UnaryCallSettings.Builder< + BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> + batchGetAssetsHistorySettings; + private final UnaryCallSettings.Builder createFeedSettings; + private final UnaryCallSettings.Builder getFeedSettings; + private final UnaryCallSettings.Builder listFeedsSettings; + private final UnaryCallSettings.Builder updateFeedSettings; + private final UnaryCallSettings.Builder deleteFeedSettings; + private final PagedCallSettings.Builder< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings; + private final PagedCallSettings.Builder< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings; + private final UnaryCallSettings.Builder + analyzeIamPolicySettings; + private final UnaryCallSettings.Builder + analyzeIamPolicyLongrunningSettings; + private final OperationCallSettings.Builder< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationSettings; + private final UnaryCallSettings.Builder + analyzeMoveSettings; + private final UnaryCallSettings.Builder + queryAssetsSettings; + private final UnaryCallSettings.Builder + createSavedQuerySettings; + private final UnaryCallSettings.Builder getSavedQuerySettings; + private final PagedCallSettings.Builder< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> + listSavedQueriesSettings; + private final UnaryCallSettings.Builder + updateSavedQuerySettings; + private final UnaryCallSettings.Builder + deleteSavedQuerySettings; + private final UnaryCallSettings.Builder< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_2_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "retry_policy_6_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(30000L)) + .setTotalTimeout(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("retry_policy_3_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(200000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(200000L)) + .setTotalTimeout(Duration.ofMillis(200000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(300000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("retry_policy_6_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + exportAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportAssetsOperationSettings = OperationCallSettings.newBuilder(); + listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); + batchGetAssetsHistorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFeedsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + searchAllResourcesSettings = PagedCallSettings.newBuilder(SEARCH_ALL_RESOURCES_PAGE_STR_FACT); + searchAllIamPoliciesSettings = + PagedCallSettings.newBuilder(SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT); + analyzeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + analyzeIamPolicyLongrunningSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + analyzeIamPolicyLongrunningOperationSettings = OperationCallSettings.newBuilder(); + analyzeMoveSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + queryAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSavedQueriesSettings = PagedCallSettings.newBuilder(LIST_SAVED_QUERIES_PAGE_STR_FACT); + updateSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchGetEffectiveIamPoliciesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + exportAssetsSettings, + listAssetsSettings, + batchGetAssetsHistorySettings, + createFeedSettings, + getFeedSettings, + listFeedsSettings, + updateFeedSettings, + deleteFeedSettings, + searchAllResourcesSettings, + searchAllIamPoliciesSettings, + analyzeIamPolicySettings, + analyzeIamPolicyLongrunningSettings, + analyzeMoveSettings, + queryAssetsSettings, + createSavedQuerySettings, + getSavedQuerySettings, + listSavedQueriesSettings, + updateSavedQuerySettings, + deleteSavedQuerySettings, + batchGetEffectiveIamPoliciesSettings); + initDefaults(this); + } + + protected Builder(AssetServiceStubSettings settings) { + super(settings); + + exportAssetsSettings = settings.exportAssetsSettings.toBuilder(); + exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder(); + listAssetsSettings = settings.listAssetsSettings.toBuilder(); + batchGetAssetsHistorySettings = settings.batchGetAssetsHistorySettings.toBuilder(); + createFeedSettings = settings.createFeedSettings.toBuilder(); + getFeedSettings = settings.getFeedSettings.toBuilder(); + listFeedsSettings = settings.listFeedsSettings.toBuilder(); + updateFeedSettings = settings.updateFeedSettings.toBuilder(); + deleteFeedSettings = settings.deleteFeedSettings.toBuilder(); + searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder(); + searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder(); + analyzeIamPolicySettings = settings.analyzeIamPolicySettings.toBuilder(); + analyzeIamPolicyLongrunningSettings = + settings.analyzeIamPolicyLongrunningSettings.toBuilder(); + analyzeIamPolicyLongrunningOperationSettings = + settings.analyzeIamPolicyLongrunningOperationSettings.toBuilder(); + analyzeMoveSettings = settings.analyzeMoveSettings.toBuilder(); + queryAssetsSettings = settings.queryAssetsSettings.toBuilder(); + createSavedQuerySettings = settings.createSavedQuerySettings.toBuilder(); + getSavedQuerySettings = settings.getSavedQuerySettings.toBuilder(); + listSavedQueriesSettings = settings.listSavedQueriesSettings.toBuilder(); + updateSavedQuerySettings = settings.updateSavedQuerySettings.toBuilder(); + deleteSavedQuerySettings = settings.deleteSavedQuerySettings.toBuilder(); + batchGetEffectiveIamPoliciesSettings = + settings.batchGetEffectiveIamPoliciesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + exportAssetsSettings, + listAssetsSettings, + batchGetAssetsHistorySettings, + createFeedSettings, + getFeedSettings, + listFeedsSettings, + updateFeedSettings, + deleteFeedSettings, + searchAllResourcesSettings, + searchAllIamPoliciesSettings, + analyzeIamPolicySettings, + analyzeIamPolicyLongrunningSettings, + analyzeMoveSettings, + queryAssetsSettings, + createSavedQuerySettings, + getSavedQuerySettings, + listSavedQueriesSettings, + updateSavedQuerySettings, + deleteSavedQuerySettings, + batchGetEffectiveIamPoliciesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .exportAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .batchGetAssetsHistorySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .createFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listFeedsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .searchAllResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .searchAllIamPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .analyzeIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .analyzeIamPolicyLongrunningSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .analyzeMoveSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .queryAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); + + builder + .createSavedQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getSavedQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listSavedQueriesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateSavedQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteSavedQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .batchGetEffectiveIamPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); + + builder + .exportAssetsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportAssetsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ExportAssetsRequest.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .analyzeIamPolicyLongrunningOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AnalyzeIamPolicyLongrunningResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + AnalyzeIamPolicyLongrunningMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + public UnaryCallSettings.Builder exportAssetsSettings() { + return exportAssetsSettings; + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings() { + return exportAssetsOperationSettings; + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return listAssetsSettings; + } + + /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ + public UnaryCallSettings.Builder + batchGetAssetsHistorySettings() { + return batchGetAssetsHistorySettings; + } + + /** Returns the builder for the settings used for calls to createFeed. */ + public UnaryCallSettings.Builder createFeedSettings() { + return createFeedSettings; + } + + /** Returns the builder for the settings used for calls to getFeed. */ + public UnaryCallSettings.Builder getFeedSettings() { + return getFeedSettings; + } + + /** Returns the builder for the settings used for calls to listFeeds. */ + public UnaryCallSettings.Builder listFeedsSettings() { + return listFeedsSettings; + } + + /** Returns the builder for the settings used for calls to updateFeed. */ + public UnaryCallSettings.Builder updateFeedSettings() { + return updateFeedSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeed. */ + public UnaryCallSettings.Builder deleteFeedSettings() { + return deleteFeedSettings; + } + + /** Returns the builder for the settings used for calls to searchAllResources. */ + public PagedCallSettings.Builder< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return searchAllResourcesSettings; + } + + /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings.Builder< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return searchAllIamPoliciesSettings; + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings.Builder + analyzeIamPolicySettings() { + return analyzeIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ + public UnaryCallSettings.Builder + analyzeIamPolicyLongrunningSettings() { + return analyzeIamPolicyLongrunningSettings; + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationSettings() { + return analyzeIamPolicyLongrunningOperationSettings; + } + + /** Returns the builder for the settings used for calls to analyzeMove. */ + public UnaryCallSettings.Builder + analyzeMoveSettings() { + return analyzeMoveSettings; + } + + /** Returns the builder for the settings used for calls to queryAssets. */ + public UnaryCallSettings.Builder + queryAssetsSettings() { + return queryAssetsSettings; + } + + /** Returns the builder for the settings used for calls to createSavedQuery. */ + public UnaryCallSettings.Builder + createSavedQuerySettings() { + return createSavedQuerySettings; + } + + /** Returns the builder for the settings used for calls to getSavedQuery. */ + public UnaryCallSettings.Builder getSavedQuerySettings() { + return getSavedQuerySettings; + } + + /** Returns the builder for the settings used for calls to listSavedQueries. */ + public PagedCallSettings.Builder< + ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> + listSavedQueriesSettings() { + return listSavedQueriesSettings; + } + + /** Returns the builder for the settings used for calls to updateSavedQuery. */ + public UnaryCallSettings.Builder + updateSavedQuerySettings() { + return updateSavedQuerySettings; + } + + /** Returns the builder for the settings used for calls to deleteSavedQuery. */ + public UnaryCallSettings.Builder deleteSavedQuerySettings() { + return deleteSavedQuerySettings; + } + + /** Returns the builder for the settings used for calls to batchGetEffectiveIamPolicies. */ + public UnaryCallSettings.Builder< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesSettings() { + return batchGetEffectiveIamPoliciesSettings; + } + + @Override + public AssetServiceStubSettings build() throws IOException { + return new AssetServiceStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java new file mode 100644 index 000000000000..bdd77c3c5e1f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2022 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.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java new file mode 100644 index 000000000000..808791245058 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java @@ -0,0 +1,870 @@ +/* + * Copyright 2022 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.v1.stub; + +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1.AnalyzeMoveRequest; +import com.google.cloud.asset.v1.AnalyzeMoveResponse; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; +import com.google.cloud.asset.v1.CreateFeedRequest; +import com.google.cloud.asset.v1.CreateSavedQueryRequest; +import com.google.cloud.asset.v1.DeleteFeedRequest; +import com.google.cloud.asset.v1.DeleteSavedQueryRequest; +import com.google.cloud.asset.v1.ExportAssetsRequest; +import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.GetFeedRequest; +import com.google.cloud.asset.v1.GetSavedQueryRequest; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; +import com.google.cloud.asset.v1.ListFeedsRequest; +import com.google.cloud.asset.v1.ListFeedsResponse; +import com.google.cloud.asset.v1.ListSavedQueriesRequest; +import com.google.cloud.asset.v1.ListSavedQueriesResponse; +import com.google.cloud.asset.v1.QueryAssetsRequest; +import com.google.cloud.asset.v1.QueryAssetsResponse; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1.SearchAllResourcesResponse; +import com.google.cloud.asset.v1.UpdateFeedRequest; +import com.google.cloud.asset.v1.UpdateSavedQueryRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcAssetServiceStub extends AssetServiceStub { + private static final MethodDescriptor + exportAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/ExportAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ExportAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/ListAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchGetAssetsHistoryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetAssetsHistory") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchGetAssetsHistoryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchGetAssetsHistoryResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor createFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/CreateFeed") + .setRequestMarshaller(ProtoUtils.marshaller(CreateFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/GetFeed") + .setRequestMarshaller(ProtoUtils.marshaller(GetFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFeedsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/ListFeeds") + .setRequestMarshaller(ProtoUtils.marshaller(ListFeedsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListFeedsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateFeed") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchAllResourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllResources") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchAllResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchAllResourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchAllIamPoliciesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllIamPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchAllIamPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchAllIamPoliciesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + analyzeIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + analyzeIamPolicyLongrunningMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicyLongrunning") + .setRequestMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyLongrunningRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + analyzeMoveMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeMove") + .setRequestMarshaller(ProtoUtils.marshaller(AnalyzeMoveRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AnalyzeMoveResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + queryAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/QueryAssets") + .setRequestMarshaller(ProtoUtils.marshaller(QueryAssetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(QueryAssetsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createSavedQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/CreateSavedQuery") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getSavedQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/GetSavedQuery") + .setRequestMarshaller( + ProtoUtils.marshaller(GetSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSavedQueriesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/ListSavedQueries") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSavedQueriesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSavedQueriesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateSavedQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateSavedQuery") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteSavedQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteSavedQuery") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetEffectiveIamPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable exportAssetsCallable; + private final OperationCallable + exportAssetsOperationCallable; + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + private final UnaryCallable + batchGetAssetsHistoryCallable; + private final UnaryCallable createFeedCallable; + private final UnaryCallable getFeedCallable; + private final UnaryCallable listFeedsCallable; + private final UnaryCallable updateFeedCallable; + private final UnaryCallable deleteFeedCallable; + private final UnaryCallable + searchAllResourcesCallable; + private final UnaryCallable + searchAllResourcesPagedCallable; + private final UnaryCallable + searchAllIamPoliciesCallable; + private final UnaryCallable + searchAllIamPoliciesPagedCallable; + private final UnaryCallable + analyzeIamPolicyCallable; + private final UnaryCallable + analyzeIamPolicyLongrunningCallable; + private final OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationCallable; + private final UnaryCallable analyzeMoveCallable; + private final UnaryCallable queryAssetsCallable; + private final UnaryCallable createSavedQueryCallable; + private final UnaryCallable getSavedQueryCallable; + private final UnaryCallable + listSavedQueriesCallable; + private final UnaryCallable + listSavedQueriesPagedCallable; + private final UnaryCallable updateSavedQueryCallable; + private final UnaryCallable deleteSavedQueryCallable; + private final UnaryCallable< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAssetServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAssetServiceStub( + AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings exportAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings listAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchGetAssetsHistoryTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(batchGetAssetsHistoryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings createFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listFeedsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFeedsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("feed.name", String.valueOf(request.getFeed().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + searchAllResourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchAllResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("scope", String.valueOf(request.getScope())); + return params.build(); + }) + .build(); + GrpcCallSettings + searchAllIamPoliciesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("scope", String.valueOf(request.getScope())); + return params.build(); + }) + .build(); + GrpcCallSettings + analyzeIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "analysis_query.scope", + String.valueOf(request.getAnalysisQuery().getScope())); + return params.build(); + }) + .build(); + GrpcCallSettings + analyzeIamPolicyLongrunningTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeIamPolicyLongrunningMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "analysis_query.scope", + String.valueOf(request.getAnalysisQuery().getScope())); + return params.build(); + }) + .build(); + GrpcCallSettings analyzeMoveTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeMoveMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings queryAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(queryAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings createSavedQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSavedQueryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getSavedQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSavedQueryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listSavedQueriesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSavedQueriesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateSavedQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSavedQueryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("saved_query.name", String.valueOf(request.getSavedQuery().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteSavedQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSavedQueryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + batchGetEffectiveIamPoliciesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(batchGetEffectiveIamPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("scope", String.valueOf(request.getScope())); + return params.build(); + }) + .build(); + + this.exportAssetsCallable = + callableFactory.createUnaryCallable( + exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); + this.exportAssetsOperationCallable = + callableFactory.createOperationCallable( + exportAssetsTransportSettings, + settings.exportAssetsOperationSettings(), + clientContext, + operationsStub); + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.batchGetAssetsHistoryCallable = + callableFactory.createUnaryCallable( + batchGetAssetsHistoryTransportSettings, + settings.batchGetAssetsHistorySettings(), + clientContext); + this.createFeedCallable = + callableFactory.createUnaryCallable( + createFeedTransportSettings, settings.createFeedSettings(), clientContext); + this.getFeedCallable = + callableFactory.createUnaryCallable( + getFeedTransportSettings, settings.getFeedSettings(), clientContext); + this.listFeedsCallable = + callableFactory.createUnaryCallable( + listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); + this.updateFeedCallable = + callableFactory.createUnaryCallable( + updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); + this.deleteFeedCallable = + callableFactory.createUnaryCallable( + deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); + this.searchAllResourcesCallable = + callableFactory.createUnaryCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllResourcesPagedCallable = + callableFactory.createPagedCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllIamPoliciesCallable = + callableFactory.createUnaryCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + this.searchAllIamPoliciesPagedCallable = + callableFactory.createPagedCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + this.analyzeIamPolicyCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); + this.analyzeIamPolicyLongrunningCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyLongrunningTransportSettings, + settings.analyzeIamPolicyLongrunningSettings(), + clientContext); + this.analyzeIamPolicyLongrunningOperationCallable = + callableFactory.createOperationCallable( + analyzeIamPolicyLongrunningTransportSettings, + settings.analyzeIamPolicyLongrunningOperationSettings(), + clientContext, + operationsStub); + this.analyzeMoveCallable = + callableFactory.createUnaryCallable( + analyzeMoveTransportSettings, settings.analyzeMoveSettings(), clientContext); + this.queryAssetsCallable = + callableFactory.createUnaryCallable( + queryAssetsTransportSettings, settings.queryAssetsSettings(), clientContext); + this.createSavedQueryCallable = + callableFactory.createUnaryCallable( + createSavedQueryTransportSettings, settings.createSavedQuerySettings(), clientContext); + this.getSavedQueryCallable = + callableFactory.createUnaryCallable( + getSavedQueryTransportSettings, settings.getSavedQuerySettings(), clientContext); + this.listSavedQueriesCallable = + callableFactory.createUnaryCallable( + listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); + this.listSavedQueriesPagedCallable = + callableFactory.createPagedCallable( + listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); + this.updateSavedQueryCallable = + callableFactory.createUnaryCallable( + updateSavedQueryTransportSettings, settings.updateSavedQuerySettings(), clientContext); + this.deleteSavedQueryCallable = + callableFactory.createUnaryCallable( + deleteSavedQueryTransportSettings, settings.deleteSavedQuerySettings(), clientContext); + this.batchGetEffectiveIamPoliciesCallable = + callableFactory.createUnaryCallable( + batchGetEffectiveIamPoliciesTransportSettings, + settings.batchGetEffectiveIamPoliciesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable exportAssetsCallable() { + return exportAssetsCallable; + } + + @Override + public OperationCallable + exportAssetsOperationCallable() { + return exportAssetsOperationCallable; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public UnaryCallable + batchGetAssetsHistoryCallable() { + return batchGetAssetsHistoryCallable; + } + + @Override + public UnaryCallable createFeedCallable() { + return createFeedCallable; + } + + @Override + public UnaryCallable getFeedCallable() { + return getFeedCallable; + } + + @Override + public UnaryCallable listFeedsCallable() { + return listFeedsCallable; + } + + @Override + public UnaryCallable updateFeedCallable() { + return updateFeedCallable; + } + + @Override + public UnaryCallable deleteFeedCallable() { + return deleteFeedCallable; + } + + @Override + public UnaryCallable + searchAllResourcesCallable() { + return searchAllResourcesCallable; + } + + @Override + public UnaryCallable + searchAllResourcesPagedCallable() { + return searchAllResourcesPagedCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesCallable() { + return searchAllIamPoliciesCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesPagedCallable() { + return searchAllIamPoliciesPagedCallable; + } + + @Override + public UnaryCallable + analyzeIamPolicyCallable() { + return analyzeIamPolicyCallable; + } + + @Override + public UnaryCallable + analyzeIamPolicyLongrunningCallable() { + return analyzeIamPolicyLongrunningCallable; + } + + @Override + public OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationCallable() { + return analyzeIamPolicyLongrunningOperationCallable; + } + + @Override + public UnaryCallable analyzeMoveCallable() { + return analyzeMoveCallable; + } + + @Override + public UnaryCallable queryAssetsCallable() { + return queryAssetsCallable; + } + + @Override + public UnaryCallable createSavedQueryCallable() { + return createSavedQueryCallable; + } + + @Override + public UnaryCallable getSavedQueryCallable() { + return getSavedQueryCallable; + } + + @Override + public UnaryCallable + listSavedQueriesCallable() { + return listSavedQueriesCallable; + } + + @Override + public UnaryCallable + listSavedQueriesPagedCallable() { + return listSavedQueriesPagedCallable; + } + + @Override + public UnaryCallable updateSavedQueryCallable() { + return updateSavedQueryCallable; + } + + @Override + public UnaryCallable deleteSavedQueryCallable() { + return deleteSavedQueryCallable; + } + + @Override + public UnaryCallable + batchGetEffectiveIamPoliciesCallable() { + return batchGetEffectiveIamPoliciesCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java new file mode 100644 index 000000000000..08af9f93427f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 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.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonAssetServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java new file mode 100644 index 000000000000..a646b0278b52 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java @@ -0,0 +1,1359 @@ +/* + * Copyright 2022 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.v1.stub; + +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1.AnalyzeMoveRequest; +import com.google.cloud.asset.v1.AnalyzeMoveResponse; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; +import com.google.cloud.asset.v1.CreateFeedRequest; +import com.google.cloud.asset.v1.CreateSavedQueryRequest; +import com.google.cloud.asset.v1.DeleteFeedRequest; +import com.google.cloud.asset.v1.DeleteSavedQueryRequest; +import com.google.cloud.asset.v1.ExportAssetsRequest; +import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.GetFeedRequest; +import com.google.cloud.asset.v1.GetSavedQueryRequest; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; +import com.google.cloud.asset.v1.ListFeedsRequest; +import com.google.cloud.asset.v1.ListFeedsResponse; +import com.google.cloud.asset.v1.ListSavedQueriesRequest; +import com.google.cloud.asset.v1.ListSavedQueriesResponse; +import com.google.cloud.asset.v1.QueryAssetsRequest; +import com.google.cloud.asset.v1.QueryAssetsResponse; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1.SearchAllResourcesResponse; +import com.google.cloud.asset.v1.UpdateFeedRequest; +import com.google.cloud.asset.v1.UpdateSavedQueryRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonAssetServiceStub extends AssetServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(AnalyzeIamPolicyLongrunningMetadata.getDescriptor()) + .add(ExportAssetsResponse.getDescriptor()) + .add(AnalyzeIamPolicyLongrunningResponse.getDescriptor()) + .add(ExportAssetsRequest.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + exportAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/ExportAssets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}:exportAssets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportAssetsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/ListAssets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}/assets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "assetTypes", request.getAssetTypesList()); + serializer.putQueryParam( + fields, "contentType", request.getContentType()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "readTime", request.getReadTime()); + serializer.putQueryParam( + fields, "relationshipTypes", request.getRelationshipTypesList()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> + batchGetAssetsHistoryMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetAssetsHistory") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}:batchGetAssetsHistory", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "assetNames", request.getAssetNamesList()); + serializer.putQueryParam( + fields, "contentType", request.getContentType()); + serializer.putQueryParam( + fields, "readTimeWindow", request.getReadTimeWindow()); + serializer.putQueryParam( + fields, "relationshipTypes", request.getRelationshipTypesList()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchGetAssetsHistoryResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor createFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/CreateFeed") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}/feeds", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Feed.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/GetFeed") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=*/*/feeds/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Feed.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listFeedsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/ListFeeds") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}/feeds", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFeedsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateFeed") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{feed.name=*/*/feeds/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "feed.name", request.getFeed().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Feed.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=*/*/feeds/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + searchAllResourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllResources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{scope=*/*}:searchAllResources", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "scope", request.getScope()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "assetTypes", request.getAssetTypesList()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "query", request.getQuery()); + serializer.putQueryParam(fields, "readMask", request.getReadMask()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAllResourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> + searchAllIamPoliciesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllIamPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{scope=*/*}:searchAllIamPolicies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "scope", request.getScope()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "assetTypes", request.getAssetTypesList()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "query", request.getQuery()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAllIamPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + analyzeIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{analysisQuery.scope=*/*}:analyzeIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "analysisQuery.scope", + request.getAnalysisQuery().getScope()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "analysisQuery", request.getAnalysisQuery()); + serializer.putQueryParam( + fields, "executionTimeout", request.getExecutionTimeout()); + serializer.putQueryParam( + fields, "savedAnalysisQuery", request.getSavedAnalysisQuery()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AnalyzeIamPolicyResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + analyzeIamPolicyLongrunningMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicyLongrunning") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{analysisQuery.scope=*/*}:analyzeIamPolicyLongrunning", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "analysisQuery.scope", + request.getAnalysisQuery().getScope()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (AnalyzeIamPolicyLongrunningRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + analyzeMoveMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeMove") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=*/*}:analyzeMove", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "destinationParent", request.getDestinationParent()); + serializer.putQueryParam(fields, "view", request.getView()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AnalyzeMoveResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + queryAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/QueryAssets") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}:queryAssets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(QueryAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createSavedQueryMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/CreateSavedQuery") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}/savedQueries", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "savedQueryId", request.getSavedQueryId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("savedQuery", request.getSavedQuery(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SavedQuery.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getSavedQueryMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/GetSavedQuery") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=*/*/savedQueries/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SavedQuery.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listSavedQueriesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/ListSavedQueries") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=*/*}/savedQueries", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSavedQueriesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSavedQueryMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateSavedQuery") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{savedQuery.name=*/*/savedQueries/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "savedQuery.name", request.getSavedQuery().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("savedQuery", request.getSavedQuery(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SavedQuery.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteSavedQueryMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteSavedQuery") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=*/*/savedQueries/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetEffectiveIamPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{scope=*/*}/effectiveIamPolicies:batchGet", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "scope", request.getScope()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "names", request.getNamesList()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchGetEffectiveIamPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable exportAssetsCallable; + private final OperationCallable + exportAssetsOperationCallable; + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + private final UnaryCallable + batchGetAssetsHistoryCallable; + private final UnaryCallable createFeedCallable; + private final UnaryCallable getFeedCallable; + private final UnaryCallable listFeedsCallable; + private final UnaryCallable updateFeedCallable; + private final UnaryCallable deleteFeedCallable; + private final UnaryCallable + searchAllResourcesCallable; + private final UnaryCallable + searchAllResourcesPagedCallable; + private final UnaryCallable + searchAllIamPoliciesCallable; + private final UnaryCallable + searchAllIamPoliciesPagedCallable; + private final UnaryCallable + analyzeIamPolicyCallable; + private final UnaryCallable + analyzeIamPolicyLongrunningCallable; + private final OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationCallable; + private final UnaryCallable analyzeMoveCallable; + private final UnaryCallable queryAssetsCallable; + private final UnaryCallable createSavedQueryCallable; + private final UnaryCallable getSavedQueryCallable; + private final UnaryCallable + listSavedQueriesCallable; + private final UnaryCallable + listSavedQueriesPagedCallable; + private final UnaryCallable updateSavedQueryCallable; + private final UnaryCallable deleteSavedQueryCallable; + private final UnaryCallable< + BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> + batchGetEffectiveIamPoliciesCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAssetServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAssetServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings exportAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + batchGetAssetsHistoryTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchGetAssetsHistoryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listFeedsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listFeedsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + searchAllResourcesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchAllResourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + searchAllIamPoliciesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + analyzeIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(analyzeIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + analyzeIamPolicyLongrunningTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(analyzeIamPolicyLongrunningMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings analyzeMoveTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(analyzeMoveMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings queryAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(queryAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createSavedQueryTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createSavedQueryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getSavedQueryTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSavedQueryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listSavedQueriesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSavedQueriesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateSavedQueryTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSavedQueryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteSavedQueryTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSavedQueryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + batchGetEffectiveIamPoliciesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(batchGetEffectiveIamPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.exportAssetsCallable = + callableFactory.createUnaryCallable( + exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); + this.exportAssetsOperationCallable = + callableFactory.createOperationCallable( + exportAssetsTransportSettings, + settings.exportAssetsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.batchGetAssetsHistoryCallable = + callableFactory.createUnaryCallable( + batchGetAssetsHistoryTransportSettings, + settings.batchGetAssetsHistorySettings(), + clientContext); + this.createFeedCallable = + callableFactory.createUnaryCallable( + createFeedTransportSettings, settings.createFeedSettings(), clientContext); + this.getFeedCallable = + callableFactory.createUnaryCallable( + getFeedTransportSettings, settings.getFeedSettings(), clientContext); + this.listFeedsCallable = + callableFactory.createUnaryCallable( + listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); + this.updateFeedCallable = + callableFactory.createUnaryCallable( + updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); + this.deleteFeedCallable = + callableFactory.createUnaryCallable( + deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); + this.searchAllResourcesCallable = + callableFactory.createUnaryCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllResourcesPagedCallable = + callableFactory.createPagedCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllIamPoliciesCallable = + callableFactory.createUnaryCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + this.searchAllIamPoliciesPagedCallable = + callableFactory.createPagedCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + this.analyzeIamPolicyCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); + this.analyzeIamPolicyLongrunningCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyLongrunningTransportSettings, + settings.analyzeIamPolicyLongrunningSettings(), + clientContext); + this.analyzeIamPolicyLongrunningOperationCallable = + callableFactory.createOperationCallable( + analyzeIamPolicyLongrunningTransportSettings, + settings.analyzeIamPolicyLongrunningOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.analyzeMoveCallable = + callableFactory.createUnaryCallable( + analyzeMoveTransportSettings, settings.analyzeMoveSettings(), clientContext); + this.queryAssetsCallable = + callableFactory.createUnaryCallable( + queryAssetsTransportSettings, settings.queryAssetsSettings(), clientContext); + this.createSavedQueryCallable = + callableFactory.createUnaryCallable( + createSavedQueryTransportSettings, settings.createSavedQuerySettings(), clientContext); + this.getSavedQueryCallable = + callableFactory.createUnaryCallable( + getSavedQueryTransportSettings, settings.getSavedQuerySettings(), clientContext); + this.listSavedQueriesCallable = + callableFactory.createUnaryCallable( + listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); + this.listSavedQueriesPagedCallable = + callableFactory.createPagedCallable( + listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); + this.updateSavedQueryCallable = + callableFactory.createUnaryCallable( + updateSavedQueryTransportSettings, settings.updateSavedQuerySettings(), clientContext); + this.deleteSavedQueryCallable = + callableFactory.createUnaryCallable( + deleteSavedQueryTransportSettings, settings.deleteSavedQuerySettings(), clientContext); + this.batchGetEffectiveIamPoliciesCallable = + callableFactory.createUnaryCallable( + batchGetEffectiveIamPoliciesTransportSettings, + settings.batchGetEffectiveIamPoliciesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(exportAssetsMethodDescriptor); + methodDescriptors.add(listAssetsMethodDescriptor); + methodDescriptors.add(batchGetAssetsHistoryMethodDescriptor); + methodDescriptors.add(createFeedMethodDescriptor); + methodDescriptors.add(getFeedMethodDescriptor); + methodDescriptors.add(listFeedsMethodDescriptor); + methodDescriptors.add(updateFeedMethodDescriptor); + methodDescriptors.add(deleteFeedMethodDescriptor); + methodDescriptors.add(searchAllResourcesMethodDescriptor); + methodDescriptors.add(searchAllIamPoliciesMethodDescriptor); + methodDescriptors.add(analyzeIamPolicyMethodDescriptor); + methodDescriptors.add(analyzeIamPolicyLongrunningMethodDescriptor); + methodDescriptors.add(analyzeMoveMethodDescriptor); + methodDescriptors.add(queryAssetsMethodDescriptor); + methodDescriptors.add(createSavedQueryMethodDescriptor); + methodDescriptors.add(getSavedQueryMethodDescriptor); + methodDescriptors.add(listSavedQueriesMethodDescriptor); + methodDescriptors.add(updateSavedQueryMethodDescriptor); + methodDescriptors.add(deleteSavedQueryMethodDescriptor); + methodDescriptors.add(batchGetEffectiveIamPoliciesMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable exportAssetsCallable() { + return exportAssetsCallable; + } + + @Override + public OperationCallable + exportAssetsOperationCallable() { + return exportAssetsOperationCallable; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public UnaryCallable + batchGetAssetsHistoryCallable() { + return batchGetAssetsHistoryCallable; + } + + @Override + public UnaryCallable createFeedCallable() { + return createFeedCallable; + } + + @Override + public UnaryCallable getFeedCallable() { + return getFeedCallable; + } + + @Override + public UnaryCallable listFeedsCallable() { + return listFeedsCallable; + } + + @Override + public UnaryCallable updateFeedCallable() { + return updateFeedCallable; + } + + @Override + public UnaryCallable deleteFeedCallable() { + return deleteFeedCallable; + } + + @Override + public UnaryCallable + searchAllResourcesCallable() { + return searchAllResourcesCallable; + } + + @Override + public UnaryCallable + searchAllResourcesPagedCallable() { + return searchAllResourcesPagedCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesCallable() { + return searchAllIamPoliciesCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesPagedCallable() { + return searchAllIamPoliciesPagedCallable; + } + + @Override + public UnaryCallable + analyzeIamPolicyCallable() { + return analyzeIamPolicyCallable; + } + + @Override + public UnaryCallable + analyzeIamPolicyLongrunningCallable() { + return analyzeIamPolicyLongrunningCallable; + } + + @Override + public OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningMetadata> + analyzeIamPolicyLongrunningOperationCallable() { + return analyzeIamPolicyLongrunningOperationCallable; + } + + @Override + public UnaryCallable analyzeMoveCallable() { + return analyzeMoveCallable; + } + + @Override + public UnaryCallable queryAssetsCallable() { + return queryAssetsCallable; + } + + @Override + public UnaryCallable createSavedQueryCallable() { + return createSavedQueryCallable; + } + + @Override + public UnaryCallable getSavedQueryCallable() { + return getSavedQueryCallable; + } + + @Override + public UnaryCallable + listSavedQueriesCallable() { + return listSavedQueriesCallable; + } + + @Override + public UnaryCallable + listSavedQueriesPagedCallable() { + return listSavedQueriesPagedCallable; + } + + @Override + public UnaryCallable updateSavedQueryCallable() { + return updateSavedQueryCallable; + } + + @Override + public UnaryCallable deleteSavedQueryCallable() { + return deleteSavedQueryCallable; + } + + @Override + public UnaryCallable + batchGetEffectiveIamPoliciesCallable() { + return batchGetEffectiveIamPoliciesCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..54b289b05399 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java @@ -0,0 +1,1769 @@ +/* + * Copyright 2022 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.v1; + +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.asset.v1.stub.HttpJsonAssetServiceStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.type.Expr; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAssetServiceStub.getMethodDescriptors(), + AssetServiceSettings.getDefaultEndpoint()); + AssetServiceSettings settings = + AssetServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void exportAssetsTest() throws Exception { + ExportAssetsResponse expectedResponse = + ExportAssetsResponse.newBuilder() + .setReadTime(Timestamp.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setOutputResult(OutputResult.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportAssetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + + ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + client.exportAssetsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName parent = FolderName.of("[FOLDER]"); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName parent = FolderName.of("[FOLDER]"); + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest2() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-4715/parent-4715"; + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssetsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-4715/parent-4715"; + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchGetAssetsHistoryTest() throws Exception { + BatchGetAssetsHistoryResponse expectedResponse = + BatchGetAssetsHistoryResponse.newBuilder() + .addAllAssets(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .addAllAssetNames(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + + BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchGetAssetsHistoryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .addAllAssetNames(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + client.batchGetAssetsHistory(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-4715/parent-4715"; + + Feed actualResponse = client.createFeed(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-4715/parent-4715"; + client.createFeed(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest2() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "name-2459/name-2459/feeds/feed-2459"; + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFeedExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name-2459/name-2459/feeds/feed-2459"; + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeedsTest() throws Exception { + ListFeedsResponse expectedResponse = + ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-4715/parent-4715"; + + ListFeedsResponse actualResponse = client.listFeeds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFeedsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-4715/parent-4715"; + client.listFeeds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Feed feed = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + + Feed actualResponse = client.updateFeed(feed); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Feed feed = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + client.updateFeed(feed); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + client.deleteFeed(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "name-2459/name-2459/feeds/feed-2459"; + + client.deleteFeed(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFeedExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name-2459/name-2459/feeds/feed-2459"; + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAllResourcesTest() throws Exception { + ResourceSearchResult responsesElement = ResourceSearchResult.newBuilder().build(); + SearchAllResourcesResponse expectedResponse = + SearchAllResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + + SearchAllResourcesPagedResponse pagedListResponse = + client.searchAllResources(scope, query, assetTypes); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchAllResourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + client.searchAllResources(scope, query, assetTypes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAllIamPoliciesTest() throws Exception { + IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); + SearchAllIamPoliciesResponse expectedResponse = + SearchAllIamPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + + SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchAllIamPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + client.searchAllIamPolicies(scope, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeIamPolicyTest() throws Exception { + AnalyzeIamPolicyResponse expectedResponse = + AnalyzeIamPolicyResponse.newBuilder() + .setMainAnalysis(AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder().build()) + .addAllServiceAccountImpersonationAnalysis( + new ArrayList()) + .setFullyExplored(true) + .build(); + mockService.addResponse(expectedResponse); + + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder() + .setAnalysisQuery( + IamPolicyAnalysisQuery.newBuilder() + .setScope("scope-2319/scope-2319") + .setResourceSelector( + IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) + .setIdentitySelector( + IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) + .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) + .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) + .setConditionContext( + IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) + .build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setExecutionTimeout(Duration.newBuilder().build()) + .build(); + + AnalyzeIamPolicyResponse actualResponse = client.analyzeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void analyzeIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder() + .setAnalysisQuery( + IamPolicyAnalysisQuery.newBuilder() + .setScope("scope-2319/scope-2319") + .setResourceSelector( + IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) + .setIdentitySelector( + IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) + .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) + .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) + .setConditionContext( + IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) + .build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setExecutionTimeout(Duration.newBuilder().build()) + .build(); + client.analyzeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeIamPolicyLongrunningTest() throws Exception { + AnalyzeIamPolicyLongrunningResponse expectedResponse = + AnalyzeIamPolicyLongrunningResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("analyzeIamPolicyLongrunningTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery( + IamPolicyAnalysisQuery.newBuilder() + .setScope("scope-2319/scope-2319") + .setResourceSelector( + IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) + .setIdentitySelector( + IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) + .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) + .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) + .setConditionContext( + IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) + .build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) + .build(); + + AnalyzeIamPolicyLongrunningResponse actualResponse = + client.analyzeIamPolicyLongrunningAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void analyzeIamPolicyLongrunningExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery( + IamPolicyAnalysisQuery.newBuilder() + .setScope("scope-2319/scope-2319") + .setResourceSelector( + IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) + .setIdentitySelector( + IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) + .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) + .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) + .setConditionContext( + IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) + .build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) + .build(); + client.analyzeIamPolicyLongrunningAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void analyzeMoveTest() throws Exception { + AnalyzeMoveResponse expectedResponse = + AnalyzeMoveResponse.newBuilder().addAllMoveAnalysis(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + AnalyzeMoveRequest request = + AnalyzeMoveRequest.newBuilder() + .setResource("resource-4407/resource-4407") + .setDestinationParent("destinationParent-1733659048") + .build(); + + AnalyzeMoveResponse actualResponse = client.analyzeMove(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void analyzeMoveExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AnalyzeMoveRequest request = + AnalyzeMoveRequest.newBuilder() + .setResource("resource-4407/resource-4407") + .setDestinationParent("destinationParent-1733659048") + .build(); + client.analyzeMove(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryAssetsTest() throws Exception { + QueryAssetsResponse expectedResponse = + QueryAssetsResponse.newBuilder() + .setJobReference("jobReference-2094880754") + .setDone(true) + .build(); + mockService.addResponse(expectedResponse); + + QueryAssetsRequest request = + QueryAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setTimeout(Duration.newBuilder().build()) + .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) + .build(); + + QueryAssetsResponse actualResponse = client.queryAssets(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void queryAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + QueryAssetsRequest request = + QueryAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setTimeout(Duration.newBuilder().build()) + .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) + .build(); + client.queryAssets(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + FolderName parent = FolderName.of("[FOLDER]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSavedQueryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderName parent = FolderName.of("[FOLDER]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest2() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSavedQueryExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest3() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSavedQueryExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest4() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-4715/parent-4715"; + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createSavedQueryExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-4715/parent-4715"; + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSavedQueryTest() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + + SavedQuery actualResponse = client.getSavedQuery(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSavedQueryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + client.getSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSavedQueryTest2() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; + + SavedQuery actualResponse = client.getSavedQuery(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSavedQueryExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; + client.getSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + FolderName parent = FolderName.of("[FOLDER]"); + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSavedQueriesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FolderName parent = FolderName.of("[FOLDER]"); + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest2() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSavedQueriesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest3() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSavedQueriesExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest4() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-4715/parent-4715"; + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSavedQueriesExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-4715/parent-4715"; + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSavedQueryTest() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + SavedQuery savedQuery = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SavedQuery actualResponse = client.updateSavedQuery(savedQuery, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSavedQueryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SavedQuery savedQuery = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSavedQuery(savedQuery, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSavedQueryTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + + client.deleteSavedQuery(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSavedQueryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + client.deleteSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSavedQueryTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; + + client.deleteSavedQuery(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteSavedQueryExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; + client.deleteSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchGetEffectiveIamPoliciesTest() throws Exception { + BatchGetEffectiveIamPoliciesResponse expectedResponse = + BatchGetEffectiveIamPoliciesResponse.newBuilder() + .addAllPolicyResults( + new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + BatchGetEffectiveIamPoliciesRequest request = + BatchGetEffectiveIamPoliciesRequest.newBuilder() + .setScope(FolderName.of("[FOLDER]").toString()) + .addAllNames(new ArrayList()) + .build(); + + BatchGetEffectiveIamPoliciesResponse actualResponse = + client.batchGetEffectiveIamPolicies(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchGetEffectiveIamPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchGetEffectiveIamPoliciesRequest request = + BatchGetEffectiveIamPoliciesRequest.newBuilder() + .setScope(FolderName.of("[FOLDER]").toString()) + .addAllNames(new ArrayList()) + .build(); + client.batchGetEffectiveIamPolicies(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java new file mode 100644 index 000000000000..bf670f43abf7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java @@ -0,0 +1,1551 @@ +/* + * Copyright 2022 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.v1; + +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.resourcenames.ResourceName; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.type.Expr; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientTest { + private static MockAssetService mockAssetService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAssetService = new MockAssetService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AssetServiceSettings settings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void exportAssetsTest() throws Exception { + ExportAssetsResponse expectedResponse = + ExportAssetsResponse.newBuilder() + .setReadTime(Timestamp.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setOutputResult(OutputResult.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportAssetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + + ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportAssetsRequest actualRequest = ((ExportAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); + Assert.assertEquals(request.getAssetTypesList(), actualRequest.getAssetTypesList()); + Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); + Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); + Assert.assertEquals( + request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + client.exportAssetsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + ResourceName parent = FolderName.of("[FOLDER]"); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ResourceName parent = FolderName.of("[FOLDER]"); + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest2() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchGetAssetsHistoryTest() throws Exception { + BatchGetAssetsHistoryResponse expectedResponse = + BatchGetAssetsHistoryResponse.newBuilder() + .addAllAssets(new ArrayList()) + .build(); + mockAssetService.addResponse(expectedResponse); + + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .addAllAssetNames(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + + BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchGetAssetsHistoryRequest actualRequest = + ((BatchGetAssetsHistoryRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getAssetNamesList(), actualRequest.getAssetNamesList()); + Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); + Assert.assertEquals(request.getReadTimeWindow(), actualRequest.getReadTimeWindow()); + Assert.assertEquals( + request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchGetAssetsHistoryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .addAllAssetNames(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + client.batchGetAssetsHistory(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + Feed actualResponse = client.createFeed(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeedRequest actualRequest = ((CreateFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + client.createFeed(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockAssetService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest2() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockAssetService.addResponse(expectedResponse); + + String name = "name3373707"; + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeedExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String name = "name3373707"; + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeedsTest() throws Exception { + ListFeedsResponse expectedResponse = + ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFeedsResponse actualResponse = client.listFeeds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeedsRequest actualRequest = ((ListFeedsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeedsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFeeds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .setCondition(Expr.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + mockAssetService.addResponse(expectedResponse); + + Feed feed = Feed.newBuilder().build(); + + Feed actualResponse = client.updateFeed(feed); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFeedRequest actualRequest = ((UpdateFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(feed, actualRequest.getFeed()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + Feed feed = Feed.newBuilder().build(); + client.updateFeed(feed); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + client.deleteFeed(name); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteFeed(name); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeedExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String name = "name3373707"; + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAllResourcesTest() throws Exception { + ResourceSearchResult responsesElement = ResourceSearchResult.newBuilder().build(); + SearchAllResourcesResponse expectedResponse = + SearchAllResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + String scope = "scope109264468"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + + SearchAllResourcesPagedResponse pagedListResponse = + client.searchAllResources(scope, query, assetTypes); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchAllResourcesRequest actualRequest = ((SearchAllResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(scope, actualRequest.getScope()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertEquals(assetTypes, actualRequest.getAssetTypesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchAllResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String scope = "scope109264468"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + client.searchAllResources(scope, query, assetTypes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAllIamPoliciesTest() throws Exception { + IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); + SearchAllIamPoliciesResponse expectedResponse = + SearchAllIamPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + String scope = "scope109264468"; + String query = "query107944136"; + + SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchAllIamPoliciesRequest actualRequest = + ((SearchAllIamPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(scope, actualRequest.getScope()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchAllIamPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String scope = "scope109264468"; + String query = "query107944136"; + client.searchAllIamPolicies(scope, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeIamPolicyTest() throws Exception { + AnalyzeIamPolicyResponse expectedResponse = + AnalyzeIamPolicyResponse.newBuilder() + .setMainAnalysis(AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder().build()) + .addAllServiceAccountImpersonationAnalysis( + new ArrayList()) + .setFullyExplored(true) + .build(); + mockAssetService.addResponse(expectedResponse); + + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setExecutionTimeout(Duration.newBuilder().build()) + .build(); + + AnalyzeIamPolicyResponse actualResponse = client.analyzeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeIamPolicyRequest actualRequest = ((AnalyzeIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAnalysisQuery(), actualRequest.getAnalysisQuery()); + Assert.assertEquals(request.getSavedAnalysisQuery(), actualRequest.getSavedAnalysisQuery()); + Assert.assertEquals(request.getExecutionTimeout(), actualRequest.getExecutionTimeout()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void analyzeIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setExecutionTimeout(Duration.newBuilder().build()) + .build(); + client.analyzeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void analyzeIamPolicyLongrunningTest() throws Exception { + AnalyzeIamPolicyLongrunningResponse expectedResponse = + AnalyzeIamPolicyLongrunningResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("analyzeIamPolicyLongrunningTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) + .build(); + + AnalyzeIamPolicyLongrunningResponse actualResponse = + client.analyzeIamPolicyLongrunningAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeIamPolicyLongrunningRequest actualRequest = + ((AnalyzeIamPolicyLongrunningRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAnalysisQuery(), actualRequest.getAnalysisQuery()); + Assert.assertEquals(request.getSavedAnalysisQuery(), actualRequest.getSavedAnalysisQuery()); + Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void analyzeIamPolicyLongrunningExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) + .build(); + client.analyzeIamPolicyLongrunningAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void analyzeMoveTest() throws Exception { + AnalyzeMoveResponse expectedResponse = + AnalyzeMoveResponse.newBuilder().addAllMoveAnalysis(new ArrayList()).build(); + mockAssetService.addResponse(expectedResponse); + + AnalyzeMoveRequest request = + AnalyzeMoveRequest.newBuilder() + .setResource("resource-341064690") + .setDestinationParent("destinationParent-1733659048") + .build(); + + AnalyzeMoveResponse actualResponse = client.analyzeMove(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeMoveRequest actualRequest = ((AnalyzeMoveRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getDestinationParent(), actualRequest.getDestinationParent()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void analyzeMoveExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + AnalyzeMoveRequest request = + AnalyzeMoveRequest.newBuilder() + .setResource("resource-341064690") + .setDestinationParent("destinationParent-1733659048") + .build(); + client.analyzeMove(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryAssetsTest() throws Exception { + QueryAssetsResponse expectedResponse = + QueryAssetsResponse.newBuilder() + .setJobReference("jobReference-2094880754") + .setDone(true) + .build(); + mockAssetService.addResponse(expectedResponse); + + QueryAssetsRequest request = + QueryAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setTimeout(Duration.newBuilder().build()) + .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) + .build(); + + QueryAssetsResponse actualResponse = client.queryAssets(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryAssetsRequest actualRequest = ((QueryAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getStatement(), actualRequest.getStatement()); + Assert.assertEquals(request.getJobReference(), actualRequest.getJobReference()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getTimeout(), actualRequest.getTimeout()); + Assert.assertEquals(request.getReadTimeWindow(), actualRequest.getReadTimeWindow()); + Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); + Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + QueryAssetsRequest request = + QueryAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setTimeout(Duration.newBuilder().build()) + .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) + .build(); + client.queryAssets(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + FolderName parent = FolderName.of("[FOLDER]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); + Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSavedQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + FolderName parent = FolderName.of("[FOLDER]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest2() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); + Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSavedQueryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest3() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); + Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSavedQueryExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSavedQueryTest4() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + + SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); + Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSavedQueryExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + client.createSavedQuery(parent, savedQuery, savedQueryId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSavedQueryTest() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + + SavedQuery actualResponse = client.getSavedQuery(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSavedQueryRequest actualRequest = ((GetSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSavedQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + client.getSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSavedQueryTest2() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + String name = "name3373707"; + + SavedQuery actualResponse = client.getSavedQuery(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSavedQueryRequest actualRequest = ((GetSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSavedQueryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String name = "name3373707"; + client.getSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + FolderName parent = FolderName.of("[FOLDER]"); + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSavedQueriesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + FolderName parent = FolderName.of("[FOLDER]"); + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest2() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSavedQueriesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest3() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSavedQueriesExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSavedQueriesTest4() throws Exception { + SavedQuery responsesElement = SavedQuery.newBuilder().build(); + ListSavedQueriesResponse expectedResponse = + ListSavedQueriesResponse.newBuilder() + .setNextPageToken("") + .addAllSavedQueries(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSavedQueriesExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSavedQueries(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSavedQueryTest() throws Exception { + SavedQuery expectedResponse = + SavedQuery.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreator("creator1028554796") + .setLastUpdateTime(Timestamp.newBuilder().build()) + .setLastUpdater("lastUpdater1649733971") + .putAllLabels(new HashMap()) + .setContent(SavedQuery.QueryContent.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + SavedQuery actualResponse = client.updateSavedQuery(savedQuery, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSavedQueryRequest actualRequest = ((UpdateSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSavedQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSavedQuery(savedQuery, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSavedQueryTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + + client.deleteSavedQuery(name); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSavedQueryRequest actualRequest = ((DeleteSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSavedQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + client.deleteSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSavedQueryTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteSavedQuery(name); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSavedQueryRequest actualRequest = ((DeleteSavedQueryRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSavedQueryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String name = "name3373707"; + client.deleteSavedQuery(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchGetEffectiveIamPoliciesTest() throws Exception { + BatchGetEffectiveIamPoliciesResponse expectedResponse = + BatchGetEffectiveIamPoliciesResponse.newBuilder() + .addAllPolicyResults( + new ArrayList()) + .build(); + mockAssetService.addResponse(expectedResponse); + + BatchGetEffectiveIamPoliciesRequest request = + BatchGetEffectiveIamPoliciesRequest.newBuilder() + .setScope(FolderName.of("[FOLDER]").toString()) + .addAllNames(new ArrayList()) + .build(); + + BatchGetEffectiveIamPoliciesResponse actualResponse = + client.batchGetEffectiveIamPolicies(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchGetEffectiveIamPoliciesRequest actualRequest = + ((BatchGetEffectiveIamPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getScope(), actualRequest.getScope()); + Assert.assertEquals(request.getNamesList(), actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchGetEffectiveIamPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + BatchGetEffectiveIamPoliciesRequest request = + BatchGetEffectiveIamPoliciesRequest.newBuilder() + .setScope(FolderName.of("[FOLDER]").toString()) + .addAllNames(new ArrayList()) + .build(); + client.batchGetEffectiveIamPolicies(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java new file mode 100644 index 000000000000..304f002778bc --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetService implements MockGrpcService { + private final MockAssetServiceImpl serviceImpl; + + public MockAssetService() { + serviceImpl = new MockAssetServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java new file mode 100644 index 000000000000..b4107bb0f09b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java @@ -0,0 +1,482 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.asset.v1.AssetServiceGrpc.AssetServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetServiceImpl extends AssetServiceImplBase { + private List requests; + private Queue responses; + + public MockAssetServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void exportAssets( + ExportAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAssets( + ListAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAssetsResponse) { + requests.add(request); + responseObserver.onNext(((ListAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchGetAssetsHistory( + BatchGetAssetsHistoryRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchGetAssetsHistoryResponse) { + requests.add(request); + responseObserver.onNext(((BatchGetAssetsHistoryResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchGetAssetsHistory, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchGetAssetsHistoryResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createFeed(CreateFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Feed) { + requests.add(request); + responseObserver.onNext(((Feed) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Feed.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFeed(GetFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Feed) { + requests.add(request); + responseObserver.onNext(((Feed) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Feed.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFeeds( + ListFeedsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFeedsResponse) { + requests.add(request); + responseObserver.onNext(((ListFeedsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListFeeds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFeedsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFeed(UpdateFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Feed) { + requests.add(request); + responseObserver.onNext(((Feed) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Feed.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFeed(DeleteFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchAllResources( + SearchAllResourcesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchAllResourcesResponse) { + requests.add(request); + responseObserver.onNext(((SearchAllResourcesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchAllResources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchAllResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchAllIamPolicies( + SearchAllIamPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchAllIamPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((SearchAllIamPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchAllIamPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchAllIamPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void analyzeIamPolicy( + AnalyzeIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnalyzeIamPolicyResponse) { + requests.add(request); + responseObserver.onNext(((AnalyzeIamPolicyResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AnalyzeIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnalyzeIamPolicyResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void analyzeIamPolicyLongrunning( + AnalyzeIamPolicyLongrunningRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AnalyzeIamPolicyLongrunning, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void analyzeMove( + AnalyzeMoveRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnalyzeMoveResponse) { + requests.add(request); + responseObserver.onNext(((AnalyzeMoveResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AnalyzeMove, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnalyzeMoveResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void queryAssets( + QueryAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof QueryAssetsResponse) { + requests.add(request); + responseObserver.onNext(((QueryAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method QueryAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + QueryAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSavedQuery( + CreateSavedQueryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SavedQuery) { + requests.add(request); + responseObserver.onNext(((SavedQuery) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateSavedQuery, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SavedQuery.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSavedQuery( + GetSavedQueryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SavedQuery) { + requests.add(request); + responseObserver.onNext(((SavedQuery) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSavedQuery, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SavedQuery.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSavedQueries( + ListSavedQueriesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSavedQueriesResponse) { + requests.add(request); + responseObserver.onNext(((ListSavedQueriesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSavedQueries, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSavedQueriesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSavedQuery( + UpdateSavedQueryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SavedQuery) { + requests.add(request); + responseObserver.onNext(((SavedQuery) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSavedQuery, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SavedQuery.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSavedQuery( + DeleteSavedQueryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSavedQuery, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchGetEffectiveIamPolicies( + BatchGetEffectiveIamPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchGetEffectiveIamPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((BatchGetEffectiveIamPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchGetEffectiveIamPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchGetEffectiveIamPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java b/owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java new file mode 100644 index 000000000000..635b5e007454 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java @@ -0,0 +1,2129 @@ +package com.google.cloud.asset.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * 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 String SERVICE_NAME = "google.cloud.asset.v1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor 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 getExportAssetsMethod() { + io.grpc.MethodDescriptor 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.v1.ExportAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ExportAssets")) + .build(); + } + } + } + return getExportAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getListAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAssets", + requestType = com.google.cloud.asset.v1.ListAssetsRequest.class, + responseType = com.google.cloud.asset.v1.ListAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListAssetsMethod() { + io.grpc.MethodDescriptor 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.v1.ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListAssets")) + .build(); + } + } + } + return getListAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchGetAssetsHistoryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchGetAssetsHistory", + requestType = com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.class, + responseType = com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchGetAssetsHistoryMethod() { + io.grpc.MethodDescriptor getBatchGetAssetsHistoryMethod; + if ((getBatchGetAssetsHistoryMethod = AssetServiceGrpc.getBatchGetAssetsHistoryMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getBatchGetAssetsHistoryMethod = AssetServiceGrpc.getBatchGetAssetsHistoryMethod) == null) { + AssetServiceGrpc.getBatchGetAssetsHistoryMethod = getBatchGetAssetsHistoryMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchGetAssetsHistory")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("BatchGetAssetsHistory")) + .build(); + } + } + } + return getBatchGetAssetsHistoryMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateFeed", + requestType = com.google.cloud.asset.v1.CreateFeedRequest.class, + responseType = com.google.cloud.asset.v1.Feed.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateFeedMethod() { + io.grpc.MethodDescriptor 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.v1.CreateFeedRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.Feed.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("CreateFeed")) + .build(); + } + } + } + return getCreateFeedMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFeed", + requestType = com.google.cloud.asset.v1.GetFeedRequest.class, + responseType = com.google.cloud.asset.v1.Feed.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetFeedMethod() { + io.grpc.MethodDescriptor 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.v1.GetFeedRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.Feed.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("GetFeed")) + .build(); + } + } + } + return getGetFeedMethod; + } + + private static volatile io.grpc.MethodDescriptor getListFeedsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListFeeds", + requestType = com.google.cloud.asset.v1.ListFeedsRequest.class, + responseType = com.google.cloud.asset.v1.ListFeedsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListFeedsMethod() { + io.grpc.MethodDescriptor 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.v1.ListFeedsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.ListFeedsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListFeeds")) + .build(); + } + } + } + return getListFeedsMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFeed", + requestType = com.google.cloud.asset.v1.UpdateFeedRequest.class, + responseType = com.google.cloud.asset.v1.Feed.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateFeedMethod() { + io.grpc.MethodDescriptor 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.v1.UpdateFeedRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.Feed.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("UpdateFeed")) + .build(); + } + } + } + return getUpdateFeedMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteFeedMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteFeed", + requestType = com.google.cloud.asset.v1.DeleteFeedRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteFeedMethod() { + io.grpc.MethodDescriptor 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.v1.DeleteFeedRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("DeleteFeed")) + .build(); + } + } + } + return getDeleteFeedMethod; + } + + private static volatile io.grpc.MethodDescriptor getSearchAllResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchAllResources", + requestType = com.google.cloud.asset.v1.SearchAllResourcesRequest.class, + responseType = com.google.cloud.asset.v1.SearchAllResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSearchAllResourcesMethod() { + io.grpc.MethodDescriptor getSearchAllResourcesMethod; + if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { + AssetServiceGrpc.getSearchAllResourcesMethod = getSearchAllResourcesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.SearchAllResourcesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.SearchAllResourcesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllResources")) + .build(); + } + } + } + return getSearchAllResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchAllIamPolicies", + requestType = com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.class, + responseType = com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod() { + io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; + if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { + AssetServiceGrpc.getSearchAllIamPoliciesMethod = getSearchAllIamPoliciesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllIamPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllIamPolicies")) + .build(); + } + } + } + return getSearchAllIamPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor getAnalyzeIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeIamPolicy", + requestType = com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, + responseType = com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAnalyzeIamPolicyMethod() { + io.grpc.MethodDescriptor getAnalyzeIamPolicyMethod; + if ((getAnalyzeIamPolicyMethod = AssetServiceGrpc.getAnalyzeIamPolicyMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getAnalyzeIamPolicyMethod = AssetServiceGrpc.getAnalyzeIamPolicyMethod) == null) { + AssetServiceGrpc.getAnalyzeIamPolicyMethod = getAnalyzeIamPolicyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("AnalyzeIamPolicy")) + .build(); + } + } + } + return getAnalyzeIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor getAnalyzeIamPolicyLongrunningMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeIamPolicyLongrunning", + requestType = com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAnalyzeIamPolicyLongrunningMethod() { + io.grpc.MethodDescriptor getAnalyzeIamPolicyLongrunningMethod; + if ((getAnalyzeIamPolicyLongrunningMethod = AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getAnalyzeIamPolicyLongrunningMethod = AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod) == null) { + AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod = getAnalyzeIamPolicyLongrunningMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeIamPolicyLongrunning")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("AnalyzeIamPolicyLongrunning")) + .build(); + } + } + } + return getAnalyzeIamPolicyLongrunningMethod; + } + + private static volatile io.grpc.MethodDescriptor getAnalyzeMoveMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeMove", + requestType = com.google.cloud.asset.v1.AnalyzeMoveRequest.class, + responseType = com.google.cloud.asset.v1.AnalyzeMoveResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getAnalyzeMoveMethod() { + io.grpc.MethodDescriptor getAnalyzeMoveMethod; + if ((getAnalyzeMoveMethod = AssetServiceGrpc.getAnalyzeMoveMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getAnalyzeMoveMethod = AssetServiceGrpc.getAnalyzeMoveMethod) == null) { + AssetServiceGrpc.getAnalyzeMoveMethod = getAnalyzeMoveMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeMove")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeMoveRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeMoveResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("AnalyzeMove")) + .build(); + } + } + } + return getAnalyzeMoveMethod; + } + + private static volatile io.grpc.MethodDescriptor getQueryAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "QueryAssets", + requestType = com.google.cloud.asset.v1.QueryAssetsRequest.class, + responseType = com.google.cloud.asset.v1.QueryAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getQueryAssetsMethod() { + io.grpc.MethodDescriptor getQueryAssetsMethod; + if ((getQueryAssetsMethod = AssetServiceGrpc.getQueryAssetsMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getQueryAssetsMethod = AssetServiceGrpc.getQueryAssetsMethod) == null) { + AssetServiceGrpc.getQueryAssetsMethod = getQueryAssetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.QueryAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.QueryAssetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("QueryAssets")) + .build(); + } + } + } + return getQueryAssetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateSavedQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSavedQuery", + requestType = com.google.cloud.asset.v1.CreateSavedQueryRequest.class, + responseType = com.google.cloud.asset.v1.SavedQuery.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateSavedQueryMethod() { + io.grpc.MethodDescriptor getCreateSavedQueryMethod; + if ((getCreateSavedQueryMethod = AssetServiceGrpc.getCreateSavedQueryMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getCreateSavedQueryMethod = AssetServiceGrpc.getCreateSavedQueryMethod) == null) { + AssetServiceGrpc.getCreateSavedQueryMethod = getCreateSavedQueryMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSavedQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.CreateSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.SavedQuery.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("CreateSavedQuery")) + .build(); + } + } + } + return getCreateSavedQueryMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetSavedQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSavedQuery", + requestType = com.google.cloud.asset.v1.GetSavedQueryRequest.class, + responseType = com.google.cloud.asset.v1.SavedQuery.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSavedQueryMethod() { + io.grpc.MethodDescriptor getGetSavedQueryMethod; + if ((getGetSavedQueryMethod = AssetServiceGrpc.getGetSavedQueryMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getGetSavedQueryMethod = AssetServiceGrpc.getGetSavedQueryMethod) == null) { + AssetServiceGrpc.getGetSavedQueryMethod = getGetSavedQueryMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSavedQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.GetSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.SavedQuery.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("GetSavedQuery")) + .build(); + } + } + } + return getGetSavedQueryMethod; + } + + private static volatile io.grpc.MethodDescriptor getListSavedQueriesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSavedQueries", + requestType = com.google.cloud.asset.v1.ListSavedQueriesRequest.class, + responseType = com.google.cloud.asset.v1.ListSavedQueriesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSavedQueriesMethod() { + io.grpc.MethodDescriptor getListSavedQueriesMethod; + if ((getListSavedQueriesMethod = AssetServiceGrpc.getListSavedQueriesMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getListSavedQueriesMethod = AssetServiceGrpc.getListSavedQueriesMethod) == null) { + AssetServiceGrpc.getListSavedQueriesMethod = getListSavedQueriesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSavedQueries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.ListSavedQueriesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.ListSavedQueriesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListSavedQueries")) + .build(); + } + } + } + return getListSavedQueriesMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateSavedQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSavedQuery", + requestType = com.google.cloud.asset.v1.UpdateSavedQueryRequest.class, + responseType = com.google.cloud.asset.v1.SavedQuery.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateSavedQueryMethod() { + io.grpc.MethodDescriptor getUpdateSavedQueryMethod; + if ((getUpdateSavedQueryMethod = AssetServiceGrpc.getUpdateSavedQueryMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getUpdateSavedQueryMethod = AssetServiceGrpc.getUpdateSavedQueryMethod) == null) { + AssetServiceGrpc.getUpdateSavedQueryMethod = getUpdateSavedQueryMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSavedQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.UpdateSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.SavedQuery.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("UpdateSavedQuery")) + .build(); + } + } + } + return getUpdateSavedQueryMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteSavedQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSavedQuery", + requestType = com.google.cloud.asset.v1.DeleteSavedQueryRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSavedQueryMethod() { + io.grpc.MethodDescriptor getDeleteSavedQueryMethod; + if ((getDeleteSavedQueryMethod = AssetServiceGrpc.getDeleteSavedQueryMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getDeleteSavedQueryMethod = AssetServiceGrpc.getDeleteSavedQueryMethod) == null) { + AssetServiceGrpc.getDeleteSavedQueryMethod = getDeleteSavedQueryMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSavedQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.DeleteSavedQueryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("DeleteSavedQuery")) + .build(); + } + } + } + return getDeleteSavedQueryMethod; + } + + private static volatile io.grpc.MethodDescriptor getBatchGetEffectiveIamPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchGetEffectiveIamPolicies", + requestType = com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.class, + responseType = com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBatchGetEffectiveIamPoliciesMethod() { + io.grpc.MethodDescriptor getBatchGetEffectiveIamPoliciesMethod; + if ((getBatchGetEffectiveIamPoliciesMethod = AssetServiceGrpc.getBatchGetEffectiveIamPoliciesMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getBatchGetEffectiveIamPoliciesMethod = AssetServiceGrpc.getBatchGetEffectiveIamPoliciesMethod) == null) { + AssetServiceGrpc.getBatchGetEffectiveIamPoliciesMethod = getBatchGetEffectiveIamPoliciesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchGetEffectiveIamPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("BatchGetEffectiveIamPolicies")) + .build(); + } + } + } + return getBatchGetEffectiveIamPoliciesMethod; + } + + /** + * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportAssetsMethod(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchGetAssetsHistoryMethod(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFeedMethod(), responseObserver); + } + + /** + *
+     * Gets details about an asset feed.
+     * 
+ */ + public void getFeed(com.google.cloud.asset.v1.GetFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFeedMethod(), responseObserver); + } + + /** + *
+     * Lists all asset feeds in a parent project/folder/organization.
+     * 
+ */ + public void listFeeds(com.google.cloud.asset.v1.ListFeedsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFeedsMethod(), responseObserver); + } + + /** + *
+     * Updates an asset feed configuration.
+     * 
+ */ + public void updateFeed(com.google.cloud.asset.v1.UpdateFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFeedMethod(), responseObserver); + } + + /** + *
+     * Deletes an asset feed.
+     * 
+ */ + public void deleteFeed(com.google.cloud.asset.v1.DeleteFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFeedMethod(), responseObserver); + } + + /** + *
+     * Searches all 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllResourcesMethod(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllIamPoliciesMethod(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAnalyzeIamPolicyMethod(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAnalyzeIamPolicyLongrunningMethod(), responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAnalyzeMoveMethod(), responseObserver); + } + + /** + *
+     * Issue a job that queries assets using a SQL statement compatible with
+     * [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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 responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryAssetsMethod(), responseObserver); + } + + /** + *
+     * Creates a saved query in a parent project/folder/organization.
+     * 
+ */ + public void createSavedQuery(com.google.cloud.asset.v1.CreateSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSavedQueryMethod(), responseObserver); + } + + /** + *
+     * Gets details about a saved query.
+     * 
+ */ + public void getSavedQuery(com.google.cloud.asset.v1.GetSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSavedQueryMethod(), responseObserver); + } + + /** + *
+     * Lists all saved queries in a parent project/folder/organization.
+     * 
+ */ + public void listSavedQueries(com.google.cloud.asset.v1.ListSavedQueriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSavedQueriesMethod(), responseObserver); + } + + /** + *
+     * Updates a saved query.
+     * 
+ */ + public void updateSavedQuery(com.google.cloud.asset.v1.UpdateSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSavedQueryMethod(), responseObserver); + } + + /** + *
+     * Deletes a saved query.
+     * 
+ */ + public void deleteSavedQuery(com.google.cloud.asset.v1.DeleteSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSavedQueryMethod(), responseObserver); + } + + /** + *
+     * Gets effective IAM policies for a batch of resources.
+     * 
+ */ + public void batchGetEffectiveIamPolicies(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchGetEffectiveIamPoliciesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getExportAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.ExportAssetsRequest, + com.google.longrunning.Operation>( + this, METHODID_EXPORT_ASSETS))) + .addMethod( + getListAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.ListAssetsRequest, + com.google.cloud.asset.v1.ListAssetsResponse>( + this, METHODID_LIST_ASSETS))) + .addMethod( + getBatchGetAssetsHistoryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest, + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse>( + this, METHODID_BATCH_GET_ASSETS_HISTORY))) + .addMethod( + getCreateFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.CreateFeedRequest, + com.google.cloud.asset.v1.Feed>( + this, METHODID_CREATE_FEED))) + .addMethod( + getGetFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.GetFeedRequest, + com.google.cloud.asset.v1.Feed>( + this, METHODID_GET_FEED))) + .addMethod( + getListFeedsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.ListFeedsRequest, + com.google.cloud.asset.v1.ListFeedsResponse>( + this, METHODID_LIST_FEEDS))) + .addMethod( + getUpdateFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.UpdateFeedRequest, + com.google.cloud.asset.v1.Feed>( + this, METHODID_UPDATE_FEED))) + .addMethod( + getDeleteFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.DeleteFeedRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_FEED))) + .addMethod( + getSearchAllResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.SearchAllResourcesRequest, + com.google.cloud.asset.v1.SearchAllResourcesResponse>( + this, METHODID_SEARCH_ALL_RESOURCES))) + .addMethod( + getSearchAllIamPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest, + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse>( + this, METHODID_SEARCH_ALL_IAM_POLICIES))) + .addMethod( + getAnalyzeIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse>( + this, METHODID_ANALYZE_IAM_POLICY))) + .addMethod( + getAnalyzeIamPolicyLongrunningMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest, + com.google.longrunning.Operation>( + this, METHODID_ANALYZE_IAM_POLICY_LONGRUNNING))) + .addMethod( + getAnalyzeMoveMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.AnalyzeMoveRequest, + com.google.cloud.asset.v1.AnalyzeMoveResponse>( + this, METHODID_ANALYZE_MOVE))) + .addMethod( + getQueryAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.QueryAssetsRequest, + com.google.cloud.asset.v1.QueryAssetsResponse>( + this, METHODID_QUERY_ASSETS))) + .addMethod( + getCreateSavedQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.CreateSavedQueryRequest, + com.google.cloud.asset.v1.SavedQuery>( + this, METHODID_CREATE_SAVED_QUERY))) + .addMethod( + getGetSavedQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.GetSavedQueryRequest, + com.google.cloud.asset.v1.SavedQuery>( + this, METHODID_GET_SAVED_QUERY))) + .addMethod( + getListSavedQueriesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.ListSavedQueriesRequest, + com.google.cloud.asset.v1.ListSavedQueriesResponse>( + this, METHODID_LIST_SAVED_QUERIES))) + .addMethod( + getUpdateSavedQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.UpdateSavedQueryRequest, + com.google.cloud.asset.v1.SavedQuery>( + this, METHODID_UPDATE_SAVED_QUERY))) + .addMethod( + getDeleteSavedQueryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.DeleteSavedQueryRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_SAVED_QUERY))) + .addMethod( + getBatchGetEffectiveIamPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest, + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse>( + this, METHODID_BATCH_GET_EFFECTIVE_IAM_POLICIES))) + .build(); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchGetAssetsHistoryMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details about an asset feed.
+     * 
+ */ + public void getFeed(com.google.cloud.asset.v1.GetFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + 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.v1.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.v1.UpdateFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes an asset feed.
+     * 
+ */ + public void deleteFeed(com.google.cloud.asset.v1.DeleteFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Searches all 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchAllResourcesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyLongrunningMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * 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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAnalyzeMoveMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Issue a job that queries assets using a SQL statement compatible with
+     * [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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 responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getQueryAssetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a saved query in a parent project/folder/organization.
+     * 
+ */ + public void createSavedQuery(com.google.cloud.asset.v1.CreateSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSavedQueryMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets details about a saved query.
+     * 
+ */ + public void getSavedQuery(com.google.cloud.asset.v1.GetSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSavedQueryMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists all saved queries in a parent project/folder/organization.
+     * 
+ */ + public void listSavedQueries(com.google.cloud.asset.v1.ListSavedQueriesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSavedQueriesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates a saved query.
+     * 
+ */ + public void updateSavedQuery(com.google.cloud.asset.v1.UpdateSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSavedQueryMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a saved query.
+     * 
+ */ + public void deleteSavedQuery(com.google.cloud.asset.v1.DeleteSavedQueryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSavedQueryMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets effective IAM policies for a batch of resources.
+     * 
+ */ + public void batchGetEffectiveIamPolicies(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchGetEffectiveIamPoliciesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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 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 Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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 exportAssets( + com.google.cloud.asset.v1.ExportAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists assets with time and resource types and returns paged results in
+     * response.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture 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 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 createFeed( + com.google.cloud.asset.v1.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.v1.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 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 updateFeed( + com.google.cloud.asset.v1.UpdateFeedRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes an asset feed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteFeed( + com.google.cloud.asset.v1.DeleteFeedRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request); + } + + /** + *
+     * Searches all 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 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 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 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 analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(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.common.util.concurrent.ListenableFuture 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 Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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 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 createSavedQuery( + com.google.cloud.asset.v1.CreateSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSavedQueryMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets details about a saved query.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getSavedQuery( + com.google.cloud.asset.v1.GetSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSavedQueryMethod(), getCallOptions()), request); + } + + /** + *
+     * Lists all saved queries in a parent project/folder/organization.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture 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 updateSavedQuery( + com.google.cloud.asset.v1.UpdateSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSavedQueryMethod(), getCallOptions()), request); + } + + /** + *
+     * Deletes a saved query.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteSavedQuery( + com.google.cloud.asset.v1.DeleteSavedQueryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSavedQueryMethod(), getCallOptions()), request); + } + + /** + *
+     * Gets effective IAM policies for a batch of resources.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture batchGetEffectiveIamPolicies( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchGetEffectiveIamPoliciesMethod(), 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 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 AssetServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AssetServiceImplBase 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_EXPORT_ASSETS: + serviceImpl.exportAssets((com.google.cloud.asset.v1.ExportAssetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ASSETS: + serviceImpl.listAssets((com.google.cloud.asset.v1.ListAssetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_GET_ASSETS_HISTORY: + serviceImpl.batchGetAssetsHistory((com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_FEED: + serviceImpl.createFeed((com.google.cloud.asset.v1.CreateFeedRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_FEED: + serviceImpl.getFeed((com.google.cloud.asset.v1.GetFeedRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_FEEDS: + serviceImpl.listFeeds((com.google.cloud.asset.v1.ListFeedsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_FEED: + serviceImpl.updateFeed((com.google.cloud.asset.v1.UpdateFeedRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_FEED: + serviceImpl.deleteFeed((com.google.cloud.asset.v1.DeleteFeedRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SEARCH_ALL_RESOURCES: + serviceImpl.searchAllResources((com.google.cloud.asset.v1.SearchAllResourcesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SEARCH_ALL_IAM_POLICIES: + serviceImpl.searchAllIamPolicies((com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ANALYZE_IAM_POLICY: + serviceImpl.analyzeIamPolicy((com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ANALYZE_IAM_POLICY_LONGRUNNING: + serviceImpl.analyzeIamPolicyLongrunning((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ANALYZE_MOVE: + serviceImpl.analyzeMove((com.google.cloud.asset.v1.AnalyzeMoveRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_QUERY_ASSETS: + serviceImpl.queryAssets((com.google.cloud.asset.v1.QueryAssetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SAVED_QUERY: + serviceImpl.createSavedQuery((com.google.cloud.asset.v1.CreateSavedQueryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SAVED_QUERY: + serviceImpl.getSavedQuery((com.google.cloud.asset.v1.GetSavedQueryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SAVED_QUERIES: + serviceImpl.listSavedQueries((com.google.cloud.asset.v1.ListSavedQueriesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SAVED_QUERY: + serviceImpl.updateSavedQuery((com.google.cloud.asset.v1.UpdateSavedQueryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SAVED_QUERY: + serviceImpl.deleteSavedQuery((com.google.cloud.asset.v1.DeleteSavedQueryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_GET_EFFECTIVE_IAM_POLICIES: + serviceImpl.batchGetEffectiveIamPolicies((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) 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(); + } + } + } + + private static abstract 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.v1.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 String methodName; + + AssetServiceMethodDescriptorSupplier(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(getExportAssetsMethod()) + .addMethod(getListAssetsMethod()) + .addMethod(getBatchGetAssetsHistoryMethod()) + .addMethod(getCreateFeedMethod()) + .addMethod(getGetFeedMethod()) + .addMethod(getListFeedsMethod()) + .addMethod(getUpdateFeedMethod()) + .addMethod(getDeleteFeedMethod()) + .addMethod(getSearchAllResourcesMethod()) + .addMethod(getSearchAllIamPoliciesMethod()) + .addMethod(getAnalyzeIamPolicyMethod()) + .addMethod(getAnalyzeIamPolicyLongrunningMethod()) + .addMethod(getAnalyzeMoveMethod()) + .addMethod(getQueryAssetsMethod()) + .addMethod(getCreateSavedQueryMethod()) + .addMethod(getGetSavedQueryMethod()) + .addMethod(getListSavedQueriesMethod()) + .addMethod(getUpdateSavedQueryMethod()) + .addMethod(getDeleteSavedQueryMethod()) + .addMethod(getBatchGetEffectiveIamPoliciesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java new file mode 100644 index 000000000000..19ad39147e56 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java @@ -0,0 +1,667 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Represents the metadata of the longrunning operation for the
+ * AnalyzeIamPolicyLongrunning rpc.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata} + */ +public final class AnalyzeIamPolicyLongrunningMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) + AnalyzeIamPolicyLongrunningMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyLongrunningMetadata.newBuilder() to construct. + private AnalyzeIamPolicyLongrunningMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeIamPolicyLongrunningMetadata() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyLongrunningMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeIamPolicyLongrunningMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.Builder.class); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (createTime_ != null) { + output.writeMessage(1, getCreateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata other = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the metadata of the longrunning operation for the
+   * AnalyzeIamPolicyLongrunning rpc.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata result = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata(this); + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The time the operation was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyLongrunningMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyLongrunningMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java new file mode 100644 index 000000000000..a603612929d5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeIamPolicyLongrunningMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java new file mode 100644 index 000000000000..6a0c4fa5e2a5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java @@ -0,0 +1,1165 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A request message for
+ * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest} + */ +public final class AnalyzeIamPolicyLongrunningRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + AnalyzeIamPolicyLongrunningRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyLongrunningRequest.newBuilder() to construct. + private AnalyzeIamPolicyLongrunningRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeIamPolicyLongrunningRequest() { + savedAnalysisQuery_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyLongrunningRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeIamPolicyLongrunningRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + savedAnalysisQuery_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.Builder.class); + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the analysisQuery field is set. + */ + @java.lang.Override + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The analysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int SAVED_ANALYSIS_QUERY_FIELD_NUMBER = 3; + private volatile java.lang.Object savedAnalysisQuery_; + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * doc.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The savedAnalysisQuery. + */ + @java.lang.Override + public java.lang.String getSavedAnalysisQuery() { + java.lang.Object ref = savedAnalysisQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + savedAnalysisQuery_ = s; + return s; + } + } + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * doc.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for savedAnalysisQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSavedAnalysisQueryBytes() { + java.lang.Object ref = savedAnalysisQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + savedAnalysisQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig outputConfig_; + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (analysisQuery_ != null) { + output.writeMessage(1, getAnalysisQuery()); + } + if (outputConfig_ != null) { + output.writeMessage(2, getOutputConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedAnalysisQuery_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisQuery_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAnalysisQuery()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOutputConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedAnalysisQuery_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest other = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery() + .equals(other.getAnalysisQuery())) return false; + } + if (!getSavedAnalysisQuery() + .equals(other.getSavedAnalysisQuery())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnalysisQuery()) { + hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisQuery().hashCode(); + } + hash = (37 * hash) + SAVED_ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getSavedAnalysisQuery().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A request message for
+   * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + savedAnalysisQuery_ = ""; + + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest result = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest(this); + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.build(); + } + result.savedAnalysisQuery_ = savedAnalysisQuery_; + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.getDefaultInstance()) return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + if (!other.getSavedAnalysisQuery().isEmpty()) { + savedAnalysisQuery_ = other.savedAnalysisQuery_; + onChanged(); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> analysisQueryBuilder_; + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQueryBuilder_ != null || analysisQuery_ != null; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisQuery_ = value; + onChanged(); + } else { + analysisQueryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_).mergeFrom(value).buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + onChanged(); + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), + getParentForChildren(), + isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private java.lang.Object savedAnalysisQuery_ = ""; + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * doc.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The savedAnalysisQuery. + */ + public java.lang.String getSavedAnalysisQuery() { + java.lang.Object ref = savedAnalysisQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + savedAnalysisQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * doc.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for savedAnalysisQuery. + */ + public com.google.protobuf.ByteString + getSavedAnalysisQueryBytes() { + java.lang.Object ref = savedAnalysisQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + savedAnalysisQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * doc.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The savedAnalysisQuery to set. + * @return This builder for chaining. + */ + public Builder setSavedAnalysisQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + savedAnalysisQuery_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * doc.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearSavedAnalysisQuery() { + + savedAnalysisQuery_ = getDefaultInstance().getSavedAnalysisQuery(); + onChanged(); + return this; + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * doc.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for savedAnalysisQuery to set. + * @return This builder for chaining. + */ + public Builder setSavedAnalysisQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + savedAnalysisQuery_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOutputConfig(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyLongrunningRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyLongrunningRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java new file mode 100644 index 000000000000..06cba9c7f30a --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeIamPolicyLongrunningRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the analysisQuery field is set. + */ + boolean hasAnalysisQuery(); + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The analysisQuery. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * doc.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The savedAnalysisQuery. + */ + java.lang.String getSavedAnalysisQuery(); + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * doc.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for savedAnalysisQuery. + */ + com.google.protobuf.ByteString + getSavedAnalysisQueryBytes(); + + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig(); + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java new file mode 100644 index 000000000000..4c2c429c1b54 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java @@ -0,0 +1,431 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A response message for
+ * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse} + */ +public final class AnalyzeIamPolicyLongrunningResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + AnalyzeIamPolicyLongrunningResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyLongrunningResponse.newBuilder() to construct. + private AnalyzeIamPolicyLongrunningResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeIamPolicyLongrunningResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyLongrunningResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeIamPolicyLongrunningResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse other = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A response message for
+   * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse result = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyLongrunningResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyLongrunningResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java new file mode 100644 index 000000000000..e2d8e4d0037f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeIamPolicyLongrunningResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java new file mode 100644 index 000000000000..f0e5a529ba2d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java @@ -0,0 +1,1249 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A request message for
+ * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyRequest} + */ +public final class AnalyzeIamPolicyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + AnalyzeIamPolicyRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyRequest.newBuilder() to construct. + private AnalyzeIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeIamPolicyRequest() { + savedAnalysisQuery_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeIamPolicyRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (executionTimeout_ != null) { + subBuilder = executionTimeout_.toBuilder(); + } + executionTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(executionTimeout_); + executionTimeout_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + savedAnalysisQuery_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.Builder.class); + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the analysisQuery field is set. + */ + @java.lang.Override + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The analysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int SAVED_ANALYSIS_QUERY_FIELD_NUMBER = 3; + private volatile java.lang.Object savedAnalysisQuery_; + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * page.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The savedAnalysisQuery. + */ + @java.lang.Override + public java.lang.String getSavedAnalysisQuery() { + java.lang.Object ref = savedAnalysisQuery_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + savedAnalysisQuery_ = s; + return s; + } + } + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * page.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for savedAnalysisQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSavedAnalysisQueryBytes() { + java.lang.Object ref = savedAnalysisQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + savedAnalysisQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_TIMEOUT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration executionTimeout_; + /** + *
+   * Optional. Amount of time executable has to complete.  See JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the executionTimeout field is set. + */ + @java.lang.Override + public boolean hasExecutionTimeout() { + return executionTimeout_ != null; + } + /** + *
+   * Optional. Amount of time executable has to complete.  See JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The executionTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getExecutionTimeout() { + return executionTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : executionTimeout_; + } + /** + *
+   * Optional. Amount of time executable has to complete.  See JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { + return getExecutionTimeout(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (analysisQuery_ != null) { + output.writeMessage(1, getAnalysisQuery()); + } + if (executionTimeout_ != null) { + output.writeMessage(2, getExecutionTimeout()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedAnalysisQuery_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisQuery_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAnalysisQuery()); + } + if (executionTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getExecutionTimeout()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedAnalysisQuery_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest other = (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery() + .equals(other.getAnalysisQuery())) return false; + } + if (!getSavedAnalysisQuery() + .equals(other.getSavedAnalysisQuery())) return false; + if (hasExecutionTimeout() != other.hasExecutionTimeout()) return false; + if (hasExecutionTimeout()) { + if (!getExecutionTimeout() + .equals(other.getExecutionTimeout())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnalysisQuery()) { + hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisQuery().hashCode(); + } + hash = (37 * hash) + SAVED_ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getSavedAnalysisQuery().hashCode(); + if (hasExecutionTimeout()) { + hash = (37 * hash) + EXECUTION_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTimeout().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A request message for
+   * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + com.google.cloud.asset.v1.AnalyzeIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + savedAnalysisQuery_ = ""; + + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = null; + } else { + executionTimeout_ = null; + executionTimeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest result = new com.google.cloud.asset.v1.AnalyzeIamPolicyRequest(this); + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.build(); + } + result.savedAnalysisQuery_ = savedAnalysisQuery_; + if (executionTimeoutBuilder_ == null) { + result.executionTimeout_ = executionTimeout_; + } else { + result.executionTimeout_ = executionTimeoutBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance()) return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + if (!other.getSavedAnalysisQuery().isEmpty()) { + savedAnalysisQuery_ = other.savedAnalysisQuery_; + onChanged(); + } + if (other.hasExecutionTimeout()) { + mergeExecutionTimeout(other.getExecutionTimeout()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> analysisQueryBuilder_; + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQueryBuilder_ != null || analysisQuery_ != null; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisQuery_ = value; + onChanged(); + } else { + analysisQueryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_).mergeFrom(value).buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + onChanged(); + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } + } + /** + *
+     * Required. The request query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), + getParentForChildren(), + isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private java.lang.Object savedAnalysisQuery_ = ""; + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * page.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The savedAnalysisQuery. + */ + public java.lang.String getSavedAnalysisQuery() { + java.lang.Object ref = savedAnalysisQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + savedAnalysisQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * page.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for savedAnalysisQuery. + */ + public com.google.protobuf.ByteString + getSavedAnalysisQueryBytes() { + java.lang.Object ref = savedAnalysisQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + savedAnalysisQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * page.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The savedAnalysisQuery to set. + * @return This builder for chaining. + */ + public Builder setSavedAnalysisQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + savedAnalysisQuery_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * page.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearSavedAnalysisQuery() { + + savedAnalysisQuery_ = getDefaultInstance().getSavedAnalysisQuery(); + onChanged(); + return this; + } + /** + *
+     * Optional. The name of a saved query, which must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * If both `analysis_query` and `saved_analysis_query` are provided, they
+     * will be merged together with the `saved_analysis_query` as base and
+     * the `analysis_query` as overrides. For more details of the merge behavior,
+     * please refer to the
+     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+     * page.
+     * Note that you cannot override primitive fields with default value, such as
+     * 0 or empty string, etc., because we use proto3, which doesn't support field
+     * presence yet.
+     * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for savedAnalysisQuery to set. + * @return This builder for chaining. + */ + public Builder setSavedAnalysisQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + savedAnalysisQuery_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration executionTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> executionTimeoutBuilder_; + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the executionTimeout field is set. + */ + public boolean hasExecutionTimeout() { + return executionTimeoutBuilder_ != null || executionTimeout_ != null; + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The executionTimeout. + */ + public com.google.protobuf.Duration getExecutionTimeout() { + if (executionTimeoutBuilder_ == null) { + return executionTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : executionTimeout_; + } else { + return executionTimeoutBuilder_.getMessage(); + } + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setExecutionTimeout(com.google.protobuf.Duration value) { + if (executionTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTimeout_ = value; + onChanged(); + } else { + executionTimeoutBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setExecutionTimeout( + com.google.protobuf.Duration.Builder builderForValue) { + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = builderForValue.build(); + onChanged(); + } else { + executionTimeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeExecutionTimeout(com.google.protobuf.Duration value) { + if (executionTimeoutBuilder_ == null) { + if (executionTimeout_ != null) { + executionTimeout_ = + com.google.protobuf.Duration.newBuilder(executionTimeout_).mergeFrom(value).buildPartial(); + } else { + executionTimeout_ = value; + } + onChanged(); + } else { + executionTimeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearExecutionTimeout() { + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = null; + onChanged(); + } else { + executionTimeout_ = null; + executionTimeoutBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Duration.Builder getExecutionTimeoutBuilder() { + + onChanged(); + return getExecutionTimeoutFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { + if (executionTimeoutBuilder_ != null) { + return executionTimeoutBuilder_.getMessageOrBuilder(); + } else { + return executionTimeout_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : executionTimeout_; + } + } + /** + *
+     * Optional. Amount of time executable has to complete.  See JSON
+     * representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getExecutionTimeoutFieldBuilder() { + if (executionTimeoutBuilder_ == null) { + executionTimeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getExecutionTimeout(), + getParentForChildren(), + isClean()); + executionTimeout_ = null; + } + return executionTimeoutBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyRequest(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..7a590165eced --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeIamPolicyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the analysisQuery field is set. + */ + boolean hasAnalysisQuery(); + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The analysisQuery. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + *
+   * Required. The request query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * page.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The savedAnalysisQuery. + */ + java.lang.String getSavedAnalysisQuery(); + /** + *
+   * Optional. The name of a saved query, which must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * If both `analysis_query` and `saved_analysis_query` are provided, they
+   * will be merged together with the `saved_analysis_query` as base and
+   * the `analysis_query` as overrides. For more details of the merge behavior,
+   * please refer to the
+   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
+   * page.
+   * Note that you cannot override primitive fields with default value, such as
+   * 0 or empty string, etc., because we use proto3, which doesn't support field
+   * presence yet.
+   * 
+ * + * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for savedAnalysisQuery. + */ + com.google.protobuf.ByteString + getSavedAnalysisQueryBytes(); + + /** + *
+   * Optional. Amount of time executable has to complete.  See JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the executionTimeout field is set. + */ + boolean hasExecutionTimeout(); + /** + *
+   * Optional. Amount of time executable has to complete.  See JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The executionTimeout. + */ + com.google.protobuf.Duration getExecutionTimeout(); + /** + *
+   * Optional. Amount of time executable has to complete.  See JSON
+   * representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * 
+ * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java new file mode 100644 index 000000000000..897d314ac833 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java @@ -0,0 +1,3072 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A response message for
+ * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse} + */ +public final class AnalyzeIamPolicyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + AnalyzeIamPolicyResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyResponse.newBuilder() to construct. + private AnalyzeIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeIamPolicyResponse() { + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeIamPolicyResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder subBuilder = null; + if (mainAnalysis_ != null) { + subBuilder = mainAnalysis_.toBuilder(); + } + mainAnalysis_ = input.readMessage(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mainAnalysis_); + mainAnalysis_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + serviceAccountImpersonationAnalysis_.add( + input.readMessage(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), extensionRegistry)); + break; + } + case 24: { + + fullyExplored_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.Builder.class); + } + + public interface IamPolicyAnalysisOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * @return Whether the analysisQuery field is set. + */ + boolean hasAnalysisQuery(); + /** + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * @return The analysisQuery. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + java.util.List + getAnalysisResultsList(); + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index); + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + int getAnalysisResultsCount(); + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + java.util.List + getAnalysisResultsOrBuilderList(); + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( + int index); + + /** + *
+     * Represents whether all entries in the
+     * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
+     * have been fully explored to answer the query.
+     * 
+ * + * bool fully_explored = 3; + * @return The fullyExplored. + */ + boolean getFullyExplored(); + + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + java.util.List + getNonCriticalErrorsList(); + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index); + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + int getNonCriticalErrorsCount(); + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + java.util.List + getNonCriticalErrorsOrBuilderList(); + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( + int index); + } + /** + *
+   * An analysis message to group the query and results.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} + */ + public static final class IamPolicyAnalysis extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + IamPolicyAnalysisOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysis.newBuilder() to construct. + private IamPolicyAnalysis(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IamPolicyAnalysis() { + analysisResults_ = java.util.Collections.emptyList(); + nonCriticalErrors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IamPolicyAnalysis(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IamPolicyAnalysis( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + analysisResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + analysisResults_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.parser(), extensionRegistry)); + break; + } + case 24: { + + fullyExplored_ = input.readBool(); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + nonCriticalErrors_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder.class); + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + /** + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * @return Whether the analysisQuery field is set. + */ + @java.lang.Override + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * @return The analysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } + /** + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int ANALYSIS_RESULTS_FIELD_NUMBER = 2; + private java.util.List analysisResults_; + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public java.util.List getAnalysisResultsList() { + return analysisResults_; + } + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public java.util.List + getAnalysisResultsOrBuilderList() { + return analysisResults_; + } + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public int getAnalysisResultsCount() { + return analysisResults_.size(); + } + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index) { + return analysisResults_.get(index); + } + /** + *
+     * A list of
+     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( + int index) { + return analysisResults_.get(index); + } + + public static final int FULLY_EXPLORED_FIELD_NUMBER = 3; + private boolean fullyExplored_; + /** + *
+     * Represents whether all entries in the
+     * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
+     * have been fully explored to answer the query.
+     * 
+ * + * bool fully_explored = 3; + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + + public static final int NON_CRITICAL_ERRORS_FIELD_NUMBER = 5; + private java.util.List nonCriticalErrors_; + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public java.util.List getNonCriticalErrorsList() { + return nonCriticalErrors_; + } + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public java.util.List + getNonCriticalErrorsOrBuilderList() { + return nonCriticalErrors_; + } + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public int getNonCriticalErrorsCount() { + return nonCriticalErrors_.size(); + } + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index) { + return nonCriticalErrors_.get(index); + } + /** + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( + int index) { + return nonCriticalErrors_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (analysisQuery_ != null) { + output.writeMessage(1, getAnalysisQuery()); + } + for (int i = 0; i < analysisResults_.size(); i++) { + output.writeMessage(2, analysisResults_.get(i)); + } + if (fullyExplored_ != false) { + output.writeBool(3, fullyExplored_); + } + for (int i = 0; i < nonCriticalErrors_.size(); i++) { + output.writeMessage(5, nonCriticalErrors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisQuery_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAnalysisQuery()); + } + for (int i = 0; i < analysisResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, analysisResults_.get(i)); + } + if (fullyExplored_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, fullyExplored_); + } + for (int i = 0; i < nonCriticalErrors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, nonCriticalErrors_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery() + .equals(other.getAnalysisQuery())) return false; + } + if (!getAnalysisResultsList() + .equals(other.getAnalysisResultsList())) return false; + if (getFullyExplored() + != other.getFullyExplored()) return false; + if (!getNonCriticalErrorsList() + .equals(other.getNonCriticalErrorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnalysisQuery()) { + hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisQuery().hashCode(); + } + if (getAnalysisResultsCount() > 0) { + hash = (37 * hash) + ANALYSIS_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisResultsList().hashCode(); + } + hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFullyExplored()); + if (getNonCriticalErrorsCount() > 0) { + hash = (37 * hash) + NON_CRITICAL_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getNonCriticalErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * An analysis message to group the query and results.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAnalysisResultsFieldBuilder(); + getNonCriticalErrorsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + if (analysisResultsBuilder_ == null) { + analysisResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + analysisResultsBuilder_.clear(); + } + fullyExplored_ = false; + + if (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + nonCriticalErrorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis(this); + int from_bitField0_ = bitField0_; + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.build(); + } + if (analysisResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.analysisResults_ = analysisResults_; + } else { + result.analysisResults_ = analysisResultsBuilder_.build(); + } + result.fullyExplored_ = fullyExplored_; + if (nonCriticalErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.nonCriticalErrors_ = nonCriticalErrors_; + } else { + result.nonCriticalErrors_ = nonCriticalErrorsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance()) return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + if (analysisResultsBuilder_ == null) { + if (!other.analysisResults_.isEmpty()) { + if (analysisResults_.isEmpty()) { + analysisResults_ = other.analysisResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnalysisResultsIsMutable(); + analysisResults_.addAll(other.analysisResults_); + } + onChanged(); + } + } else { + if (!other.analysisResults_.isEmpty()) { + if (analysisResultsBuilder_.isEmpty()) { + analysisResultsBuilder_.dispose(); + analysisResultsBuilder_ = null; + analysisResults_ = other.analysisResults_; + bitField0_ = (bitField0_ & ~0x00000001); + analysisResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAnalysisResultsFieldBuilder() : null; + } else { + analysisResultsBuilder_.addAllMessages(other.analysisResults_); + } + } + } + if (other.getFullyExplored() != false) { + setFullyExplored(other.getFullyExplored()); + } + if (nonCriticalErrorsBuilder_ == null) { + if (!other.nonCriticalErrors_.isEmpty()) { + if (nonCriticalErrors_.isEmpty()) { + nonCriticalErrors_ = other.nonCriticalErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.addAll(other.nonCriticalErrors_); + } + onChanged(); + } + } else { + if (!other.nonCriticalErrors_.isEmpty()) { + if (nonCriticalErrorsBuilder_.isEmpty()) { + nonCriticalErrorsBuilder_.dispose(); + nonCriticalErrorsBuilder_ = null; + nonCriticalErrors_ = other.nonCriticalErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + nonCriticalErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNonCriticalErrorsFieldBuilder() : null; + } else { + nonCriticalErrorsBuilder_.addAllMessages(other.nonCriticalErrors_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> analysisQueryBuilder_; + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQueryBuilder_ != null || analysisQuery_ != null; + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisQuery_ = value; + onChanged(); + } else { + analysisQueryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_).mergeFrom(value).buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder clearAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + onChanged(); + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + + return this; + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; + } + } + /** + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), + getParentForChildren(), + isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private java.util.List analysisResults_ = + java.util.Collections.emptyList(); + private void ensureAnalysisResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + analysisResults_ = new java.util.ArrayList(analysisResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder> analysisResultsBuilder_; + + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public java.util.List getAnalysisResultsList() { + if (analysisResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(analysisResults_); + } else { + return analysisResultsBuilder_.getMessageList(); + } + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public int getAnalysisResultsCount() { + if (analysisResultsBuilder_ == null) { + return analysisResults_.size(); + } else { + return analysisResultsBuilder_.getCount(); + } + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index) { + if (analysisResultsBuilder_ == null) { + return analysisResults_.get(index); + } else { + return analysisResultsBuilder_.getMessage(index); + } + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder setAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { + if (analysisResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisResultsIsMutable(); + analysisResults_.set(index, value); + onChanged(); + } else { + analysisResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder setAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.set(index, builderForValue.build()); + onChanged(); + } else { + analysisResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults(com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { + if (analysisResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisResultsIsMutable(); + analysisResults_.add(value); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { + if (analysisResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisResultsIsMutable(); + analysisResults_.add(index, value); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.add(builderForValue.build()); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.add(index, builderForValue.build()); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAllAnalysisResults( + java.lang.Iterable values) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, analysisResults_); + onChanged(); + } else { + analysisResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder clearAnalysisResults() { + if (analysisResultsBuilder_ == null) { + analysisResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + analysisResultsBuilder_.clear(); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder removeAnalysisResults(int index) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.remove(index); + onChanged(); + } else { + analysisResultsBuilder_.remove(index); + } + return this; + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder getAnalysisResultsBuilder( + int index) { + return getAnalysisResultsFieldBuilder().getBuilder(index); + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( + int index) { + if (analysisResultsBuilder_ == null) { + return analysisResults_.get(index); } else { + return analysisResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public java.util.List + getAnalysisResultsOrBuilderList() { + if (analysisResultsBuilder_ != null) { + return analysisResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analysisResults_); + } + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder addAnalysisResultsBuilder() { + return getAnalysisResultsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()); + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder addAnalysisResultsBuilder( + int index) { + return getAnalysisResultsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()); + } + /** + *
+       * A list of
+       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public java.util.List + getAnalysisResultsBuilderList() { + return getAnalysisResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder> + getAnalysisResultsFieldBuilder() { + if (analysisResultsBuilder_ == null) { + analysisResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder>( + analysisResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + analysisResults_ = null; + } + return analysisResultsBuilder_; + } + + private boolean fullyExplored_ ; + /** + *
+       * Represents whether all entries in the
+       * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
+       * have been fully explored to answer the query.
+       * 
+ * + * bool fully_explored = 3; + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + *
+       * Represents whether all entries in the
+       * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
+       * have been fully explored to answer the query.
+       * 
+ * + * bool fully_explored = 3; + * @param value The fullyExplored to set. + * @return This builder for chaining. + */ + public Builder setFullyExplored(boolean value) { + + fullyExplored_ = value; + onChanged(); + return this; + } + /** + *
+       * Represents whether all entries in the
+       * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
+       * have been fully explored to answer the query.
+       * 
+ * + * bool fully_explored = 3; + * @return This builder for chaining. + */ + public Builder clearFullyExplored() { + + fullyExplored_ = false; + onChanged(); + return this; + } + + private java.util.List nonCriticalErrors_ = + java.util.Collections.emptyList(); + private void ensureNonCriticalErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = new java.util.ArrayList(nonCriticalErrors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> nonCriticalErrorsBuilder_; + + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public java.util.List getNonCriticalErrorsList() { + if (nonCriticalErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nonCriticalErrors_); + } else { + return nonCriticalErrorsBuilder_.getMessageList(); + } + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public int getNonCriticalErrorsCount() { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.size(); + } else { + return nonCriticalErrorsBuilder_.getCount(); + } + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index) { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.get(index); + } else { + return nonCriticalErrorsBuilder_.getMessage(index); + } + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder setNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (nonCriticalErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.set(index, value); + onChanged(); + } else { + nonCriticalErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder setNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + nonCriticalErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder addNonCriticalErrors(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (nonCriticalErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(value); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder addNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (nonCriticalErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(index, value); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder addNonCriticalErrors( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(builderForValue.build()); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder addNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder addAllNonCriticalErrors( + java.lang.Iterable values) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, nonCriticalErrors_); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder clearNonCriticalErrors() { + if (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + nonCriticalErrorsBuilder_.clear(); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public Builder removeNonCriticalErrors(int index) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.remove(index); + onChanged(); + } else { + nonCriticalErrorsBuilder_.remove(index); + } + return this; + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getNonCriticalErrorsBuilder( + int index) { + return getNonCriticalErrorsFieldBuilder().getBuilder(index); + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( + int index) { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.get(index); } else { + return nonCriticalErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public java.util.List + getNonCriticalErrorsOrBuilderList() { + if (nonCriticalErrorsBuilder_ != null) { + return nonCriticalErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nonCriticalErrors_); + } + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder addNonCriticalErrorsBuilder() { + return getNonCriticalErrorsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()); + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder addNonCriticalErrorsBuilder( + int index) { + return getNonCriticalErrorsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()); + } + /** + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + public java.util.List + getNonCriticalErrorsBuilderList() { + return getNonCriticalErrorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getNonCriticalErrorsFieldBuilder() { + if (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + nonCriticalErrors_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + nonCriticalErrors_ = null; + } + return nonCriticalErrorsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysis parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysis(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int MAIN_ANALYSIS_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis mainAnalysis_; + /** + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * @return Whether the mainAnalysis field is set. + */ + @java.lang.Override + public boolean hasMainAnalysis() { + return mainAnalysis_ != null; + } + /** + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * @return The mainAnalysis. + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis() { + return mainAnalysis_ == null ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance() : mainAnalysis_; + } + /** + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getMainAnalysisOrBuilder() { + return getMainAnalysis(); + } + + public static final int SERVICE_ACCOUNT_IMPERSONATION_ANALYSIS_FIELD_NUMBER = 2; + private java.util.List serviceAccountImpersonationAnalysis_; + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + @java.lang.Override + public java.util.List getServiceAccountImpersonationAnalysisList() { + return serviceAccountImpersonationAnalysis_; + } + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + @java.lang.Override + public java.util.List + getServiceAccountImpersonationAnalysisOrBuilderList() { + return serviceAccountImpersonationAnalysis_; + } + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + @java.lang.Override + public int getServiceAccountImpersonationAnalysisCount() { + return serviceAccountImpersonationAnalysis_.size(); + } + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getServiceAccountImpersonationAnalysis(int index) { + return serviceAccountImpersonationAnalysis_.get(index); + } + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getServiceAccountImpersonationAnalysisOrBuilder( + int index) { + return serviceAccountImpersonationAnalysis_.get(index); + } + + public static final int FULLY_EXPLORED_FIELD_NUMBER = 3; + private boolean fullyExplored_; + /** + *
+   * Represents whether all entries in the
+   * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
+   * and
+   * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
+   * have been fully explored to answer the query in the request.
+   * 
+ * + * bool fully_explored = 3; + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (mainAnalysis_ != null) { + output.writeMessage(1, getMainAnalysis()); + } + for (int i = 0; i < serviceAccountImpersonationAnalysis_.size(); i++) { + output.writeMessage(2, serviceAccountImpersonationAnalysis_.get(i)); + } + if (fullyExplored_ != false) { + output.writeBool(3, fullyExplored_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mainAnalysis_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMainAnalysis()); + } + for (int i = 0; i < serviceAccountImpersonationAnalysis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, serviceAccountImpersonationAnalysis_.get(i)); + } + if (fullyExplored_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, fullyExplored_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse other = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) obj; + + if (hasMainAnalysis() != other.hasMainAnalysis()) return false; + if (hasMainAnalysis()) { + if (!getMainAnalysis() + .equals(other.getMainAnalysis())) return false; + } + if (!getServiceAccountImpersonationAnalysisList() + .equals(other.getServiceAccountImpersonationAnalysisList())) return false; + if (getFullyExplored() + != other.getFullyExplored()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMainAnalysis()) { + hash = (37 * hash) + MAIN_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getMainAnalysis().hashCode(); + } + if (getServiceAccountImpersonationAnalysisCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNT_IMPERSONATION_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountImpersonationAnalysisList().hashCode(); + } + hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFullyExplored()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A response message for
+   * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + com.google.cloud.asset.v1.AnalyzeIamPolicyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getServiceAccountImpersonationAnalysisFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (mainAnalysisBuilder_ == null) { + mainAnalysis_ = null; + } else { + mainAnalysis_ = null; + mainAnalysisBuilder_ = null; + } + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceAccountImpersonationAnalysisBuilder_.clear(); + } + fullyExplored_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse result = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse(this); + int from_bitField0_ = bitField0_; + if (mainAnalysisBuilder_ == null) { + result.mainAnalysis_ = mainAnalysis_; + } else { + result.mainAnalysis_ = mainAnalysisBuilder_.build(); + } + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceAccountImpersonationAnalysis_ = serviceAccountImpersonationAnalysis_; + } else { + result.serviceAccountImpersonationAnalysis_ = serviceAccountImpersonationAnalysisBuilder_.build(); + } + result.fullyExplored_ = fullyExplored_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance()) return this; + if (other.hasMainAnalysis()) { + mergeMainAnalysis(other.getMainAnalysis()); + } + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (!other.serviceAccountImpersonationAnalysis_.isEmpty()) { + if (serviceAccountImpersonationAnalysis_.isEmpty()) { + serviceAccountImpersonationAnalysis_ = other.serviceAccountImpersonationAnalysis_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.addAll(other.serviceAccountImpersonationAnalysis_); + } + onChanged(); + } + } else { + if (!other.serviceAccountImpersonationAnalysis_.isEmpty()) { + if (serviceAccountImpersonationAnalysisBuilder_.isEmpty()) { + serviceAccountImpersonationAnalysisBuilder_.dispose(); + serviceAccountImpersonationAnalysisBuilder_ = null; + serviceAccountImpersonationAnalysis_ = other.serviceAccountImpersonationAnalysis_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccountImpersonationAnalysisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getServiceAccountImpersonationAnalysisFieldBuilder() : null; + } else { + serviceAccountImpersonationAnalysisBuilder_.addAllMessages(other.serviceAccountImpersonationAnalysis_); + } + } + } + if (other.getFullyExplored() != false) { + setFullyExplored(other.getFullyExplored()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis mainAnalysis_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> mainAnalysisBuilder_; + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * @return Whether the mainAnalysis field is set. + */ + public boolean hasMainAnalysis() { + return mainAnalysisBuilder_ != null || mainAnalysis_ != null; + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * @return The mainAnalysis. + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis() { + if (mainAnalysisBuilder_ == null) { + return mainAnalysis_ == null ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance() : mainAnalysis_; + } else { + return mainAnalysisBuilder_.getMessage(); + } + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + public Builder setMainAnalysis(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (mainAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mainAnalysis_ = value; + onChanged(); + } else { + mainAnalysisBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + public Builder setMainAnalysis( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { + if (mainAnalysisBuilder_ == null) { + mainAnalysis_ = builderForValue.build(); + onChanged(); + } else { + mainAnalysisBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + public Builder mergeMainAnalysis(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (mainAnalysisBuilder_ == null) { + if (mainAnalysis_ != null) { + mainAnalysis_ = + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder(mainAnalysis_).mergeFrom(value).buildPartial(); + } else { + mainAnalysis_ = value; + } + onChanged(); + } else { + mainAnalysisBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + public Builder clearMainAnalysis() { + if (mainAnalysisBuilder_ == null) { + mainAnalysis_ = null; + onChanged(); + } else { + mainAnalysis_ = null; + mainAnalysisBuilder_ = null; + } + + return this; + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder getMainAnalysisBuilder() { + + onChanged(); + return getMainAnalysisFieldBuilder().getBuilder(); + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getMainAnalysisOrBuilder() { + if (mainAnalysisBuilder_ != null) { + return mainAnalysisBuilder_.getMessageOrBuilder(); + } else { + return mainAnalysis_ == null ? + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance() : mainAnalysis_; + } + } + /** + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getMainAnalysisFieldBuilder() { + if (mainAnalysisBuilder_ == null) { + mainAnalysisBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder>( + getMainAnalysis(), + getParentForChildren(), + isClean()); + mainAnalysis_ = null; + } + return mainAnalysisBuilder_; + } + + private java.util.List serviceAccountImpersonationAnalysis_ = + java.util.Collections.emptyList(); + private void ensureServiceAccountImpersonationAnalysisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = new java.util.ArrayList(serviceAccountImpersonationAnalysis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> serviceAccountImpersonationAnalysisBuilder_; + + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public java.util.List getServiceAccountImpersonationAnalysisList() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + } else { + return serviceAccountImpersonationAnalysisBuilder_.getMessageList(); + } + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public int getServiceAccountImpersonationAnalysisCount() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return serviceAccountImpersonationAnalysis_.size(); + } else { + return serviceAccountImpersonationAnalysisBuilder_.getCount(); + } + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getServiceAccountImpersonationAnalysis(int index) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return serviceAccountImpersonationAnalysis_.get(index); + } else { + return serviceAccountImpersonationAnalysisBuilder_.getMessage(index); + } + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder setServiceAccountImpersonationAnalysis( + int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.set(index, value); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder setServiceAccountImpersonationAnalysis( + int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder addServiceAccountImpersonationAnalysis(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(value); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder addServiceAccountImpersonationAnalysis( + int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(index, value); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder addServiceAccountImpersonationAnalysis( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(builderForValue.build()); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder addServiceAccountImpersonationAnalysis( + int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder addAllServiceAccountImpersonationAnalysis( + java.lang.Iterable values) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serviceAccountImpersonationAnalysis_); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder clearServiceAccountImpersonationAnalysis() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.clear(); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public Builder removeServiceAccountImpersonationAnalysis(int index) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.remove(index); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.remove(index); + } + return this; + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder getServiceAccountImpersonationAnalysisBuilder( + int index) { + return getServiceAccountImpersonationAnalysisFieldBuilder().getBuilder(index); + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getServiceAccountImpersonationAnalysisOrBuilder( + int index) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return serviceAccountImpersonationAnalysis_.get(index); } else { + return serviceAccountImpersonationAnalysisBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public java.util.List + getServiceAccountImpersonationAnalysisOrBuilderList() { + if (serviceAccountImpersonationAnalysisBuilder_ != null) { + return serviceAccountImpersonationAnalysisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + } + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder addServiceAccountImpersonationAnalysisBuilder() { + return getServiceAccountImpersonationAnalysisFieldBuilder().addBuilder( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance()); + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder addServiceAccountImpersonationAnalysisBuilder( + int index) { + return getServiceAccountImpersonationAnalysisFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance()); + } + /** + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + public java.util.List + getServiceAccountImpersonationAnalysisBuilderList() { + return getServiceAccountImpersonationAnalysisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisFieldBuilder() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + serviceAccountImpersonationAnalysisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder>( + serviceAccountImpersonationAnalysis_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + serviceAccountImpersonationAnalysis_ = null; + } + return serviceAccountImpersonationAnalysisBuilder_; + } + + private boolean fullyExplored_ ; + /** + *
+     * Represents whether all entries in the
+     * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
+     * and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
+     * have been fully explored to answer the query in the request.
+     * 
+ * + * bool fully_explored = 3; + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + *
+     * Represents whether all entries in the
+     * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
+     * and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
+     * have been fully explored to answer the query in the request.
+     * 
+ * + * bool fully_explored = 3; + * @param value The fullyExplored to set. + * @return This builder for chaining. + */ + public Builder setFullyExplored(boolean value) { + + fullyExplored_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents whether all entries in the
+     * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
+     * and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
+     * have been fully explored to answer the query in the request.
+     * 
+ * + * bool fully_explored = 3; + * @return This builder for chaining. + */ + public Builder clearFullyExplored() { + + fullyExplored_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java new file mode 100644 index 000000000000..4eef1b0c3453 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java @@ -0,0 +1,104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeIamPolicyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * @return Whether the mainAnalysis field is set. + */ + boolean hasMainAnalysis(); + /** + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * @return The mainAnalysis. + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis(); + /** + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getMainAnalysisOrBuilder(); + + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + java.util.List + getServiceAccountImpersonationAnalysisList(); + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getServiceAccountImpersonationAnalysis(int index); + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + int getServiceAccountImpersonationAnalysisCount(); + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + java.util.List + getServiceAccountImpersonationAnalysisOrBuilderList(); + /** + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getServiceAccountImpersonationAnalysisOrBuilder( + int index); + + /** + *
+   * Represents whether all entries in the
+   * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
+   * and
+   * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
+   * have been fully explored to answer the query in the request.
+   * 
+ * + * bool fully_explored = 3; + * @return The fullyExplored. + */ + boolean getFullyExplored(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java new file mode 100644 index 000000000000..2f6d86eb8117 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java @@ -0,0 +1,1092 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * The request message for performing resource move analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveRequest} + */ +public final class AnalyzeMoveRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeMoveRequest) + AnalyzeMoveRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeMoveRequest.newBuilder() to construct. + private AnalyzeMoveRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeMoveRequest() { + resource_ = ""; + destinationParent_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeMoveRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeMoveRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + destinationParent_ = s; + break; + } + case 24: { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeMoveRequest.class, com.google.cloud.asset.v1.AnalyzeMoveRequest.Builder.class); + } + + /** + *
+   * View enum for supporting partial analysis responses.
+   * 
+ * + * Protobuf enum {@code google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView} + */ + public enum AnalysisView + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * The default/unset value.
+     * The API will default to the FULL view.
+     * 
+ * + * ANALYSIS_VIEW_UNSPECIFIED = 0; + */ + ANALYSIS_VIEW_UNSPECIFIED(0), + /** + *
+     * Full analysis including all level of impacts of the specified resource
+     * move.
+     * 
+ * + * FULL = 1; + */ + FULL(1), + /** + *
+     * Basic analysis only including blockers which will prevent the specified
+     * resource move at runtime.
+     * 
+ * + * BASIC = 2; + */ + BASIC(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * The default/unset value.
+     * The API will default to the FULL view.
+     * 
+ * + * ANALYSIS_VIEW_UNSPECIFIED = 0; + */ + public static final int ANALYSIS_VIEW_UNSPECIFIED_VALUE = 0; + /** + *
+     * Full analysis including all level of impacts of the specified resource
+     * move.
+     * 
+ * + * FULL = 1; + */ + public static final int FULL_VALUE = 1; + /** + *
+     * Basic analysis only including blockers which will prevent the specified
+     * resource move at runtime.
+     * 
+ * + * BASIC = 2; + */ + public static final int BASIC_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AnalysisView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AnalysisView forNumber(int value) { + switch (value) { + case 0: return ANALYSIS_VIEW_UNSPECIFIED; + case 1: return FULL; + case 2: return BASIC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AnalysisView> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnalysisView findValueByNumber(int number) { + return AnalysisView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1.AnalyzeMoveRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final AnalysisView[] VALUES = values(); + + public static AnalysisView valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AnalysisView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView) + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + *
+   * Required. Name of the resource to perform the analysis against.
+   * Only GCP Project are supported as of today. Hence, this can only be Project
+   * ID (such as "projects/my-project-id") or a Project Number (such as
+   * "projects/12345").
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + *
+   * Required. Name of the resource to perform the analysis against.
+   * Only GCP Project are supported as of today. Hence, this can only be Project
+   * ID (such as "projects/my-project-id") or a Project Number (such as
+   * "projects/12345").
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_PARENT_FIELD_NUMBER = 2; + private volatile java.lang.Object destinationParent_; + /** + *
+   * Required. Name of the GCP Folder or Organization to reparent the target
+   * resource. The analysis will be performed against hypothetically moving the
+   * resource to this specified desitination parent. This can only be a Folder
+   * number (such as "folders/123") or an Organization number (such as
+   * "organizations/123").
+   * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationParent. + */ + @java.lang.Override + public java.lang.String getDestinationParent() { + java.lang.Object ref = destinationParent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationParent_ = s; + return s; + } + } + /** + *
+   * Required. Name of the GCP Folder or Organization to reparent the target
+   * resource. The analysis will be performed against hypothetically moving the
+   * resource to this specified desitination parent. This can only be a Folder
+   * number (such as "folders/123") or an Organization number (such as
+   * "organizations/123").
+   * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationParent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationParentBytes() { + java.lang.Object ref = destinationParent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationParent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 3; + private int view_; + /** + *
+   * Analysis view indicating what information should be included in the
+   * analysis response. If unspecified, the default view is FULL.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override public int getViewValue() { + return view_; + } + /** + *
+   * Analysis view indicating what information should be included in the
+   * analysis response. If unspecified, the default view is FULL.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @return The view. + */ + @java.lang.Override public com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView result = com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.valueOf(view_); + return result == null ? com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationParent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destinationParent_); + } + if (view_ != com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.ANALYSIS_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(3, view_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationParent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destinationParent_); + } + if (view_ != com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.ANALYSIS_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, view_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeMoveRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeMoveRequest other = (com.google.cloud.asset.v1.AnalyzeMoveRequest) obj; + + if (!getResource() + .equals(other.getResource())) return false; + if (!getDestinationParent() + .equals(other.getDestinationParent())) return false; + if (view_ != other.view_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + DESTINATION_PARENT_FIELD_NUMBER; + hash = (53 * hash) + getDestinationParent().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeMoveRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The request message for performing resource move analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeMoveRequest) + com.google.cloud.asset.v1.AnalyzeMoveRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeMoveRequest.class, com.google.cloud.asset.v1.AnalyzeMoveRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeMoveRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resource_ = ""; + + destinationParent_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeMoveRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveRequest build() { + com.google.cloud.asset.v1.AnalyzeMoveRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveRequest buildPartial() { + com.google.cloud.asset.v1.AnalyzeMoveRequest result = new com.google.cloud.asset.v1.AnalyzeMoveRequest(this); + result.resource_ = resource_; + result.destinationParent_ = destinationParent_; + result.view_ = view_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeMoveRequest) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeMoveRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeMoveRequest other) { + if (other == com.google.cloud.asset.v1.AnalyzeMoveRequest.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getDestinationParent().isEmpty()) { + destinationParent_ = other.destinationParent_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeMoveRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeMoveRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resource_ = ""; + /** + *
+     * Required. Name of the resource to perform the analysis against.
+     * Only GCP Project are supported as of today. Hence, this can only be Project
+     * ID (such as "projects/my-project-id") or a Project Number (such as
+     * "projects/12345").
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Name of the resource to perform the analysis against.
+     * Only GCP Project are supported as of today. Hence, this can only be Project
+     * ID (such as "projects/my-project-id") or a Project Number (such as
+     * "projects/12345").
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Name of the resource to perform the analysis against.
+     * Only GCP Project are supported as of today. Hence, this can only be Project
+     * ID (such as "projects/my-project-id") or a Project Number (such as
+     * "projects/12345").
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Name of the resource to perform the analysis against.
+     * Only GCP Project are supported as of today. Hence, this can only be Project
+     * ID (such as "projects/my-project-id") or a Project Number (such as
+     * "projects/12345").
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + *
+     * Required. Name of the resource to perform the analysis against.
+     * Only GCP Project are supported as of today. Hence, this can only be Project
+     * ID (such as "projects/my-project-id") or a Project Number (such as
+     * "projects/12345").
+     * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object destinationParent_ = ""; + /** + *
+     * Required. Name of the GCP Folder or Organization to reparent the target
+     * resource. The analysis will be performed against hypothetically moving the
+     * resource to this specified desitination parent. This can only be a Folder
+     * number (such as "folders/123") or an Organization number (such as
+     * "organizations/123").
+     * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationParent. + */ + public java.lang.String getDestinationParent() { + java.lang.Object ref = destinationParent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationParent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Name of the GCP Folder or Organization to reparent the target
+     * resource. The analysis will be performed against hypothetically moving the
+     * resource to this specified desitination parent. This can only be a Folder
+     * number (such as "folders/123") or an Organization number (such as
+     * "organizations/123").
+     * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationParent. + */ + public com.google.protobuf.ByteString + getDestinationParentBytes() { + java.lang.Object ref = destinationParent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + destinationParent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Name of the GCP Folder or Organization to reparent the target
+     * resource. The analysis will be performed against hypothetically moving the
+     * resource to this specified desitination parent. This can only be a Folder
+     * number (such as "folders/123") or an Organization number (such as
+     * "organizations/123").
+     * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The destinationParent to set. + * @return This builder for chaining. + */ + public Builder setDestinationParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + destinationParent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Name of the GCP Folder or Organization to reparent the target
+     * resource. The analysis will be performed against hypothetically moving the
+     * resource to this specified desitination parent. This can only be a Folder
+     * number (such as "folders/123") or an Organization number (such as
+     * "organizations/123").
+     * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDestinationParent() { + + destinationParent_ = getDefaultInstance().getDestinationParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Name of the GCP Folder or Organization to reparent the target
+     * resource. The analysis will be performed against hypothetically moving the
+     * resource to this specified desitination parent. This can only be a Folder
+     * number (such as "folders/123") or an Organization number (such as
+     * "organizations/123").
+     * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for destinationParent to set. + * @return This builder for chaining. + */ + public Builder setDestinationParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + destinationParent_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + *
+     * Analysis view indicating what information should be included in the
+     * analysis response. If unspecified, the default view is FULL.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override public int getViewValue() { + return view_; + } + /** + *
+     * Analysis view indicating what information should be included in the
+     * analysis response. If unspecified, the default view is FULL.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + *
+     * Analysis view indicating what information should be included in the
+     * analysis response. If unspecified, the default view is FULL.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @return The view. + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView result = com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.valueOf(view_); + return result == null ? com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.UNRECOGNIZED : result; + } + /** + *
+     * Analysis view indicating what information should be included in the
+     * analysis response. If unspecified, the default view is FULL.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Analysis view indicating what information should be included in the
+     * analysis response. If unspecified, the default view is FULL.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeMoveRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeMoveRequest) + private static final com.google.cloud.asset.v1.AnalyzeMoveRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeMoveRequest(); + } + + public static com.google.cloud.asset.v1.AnalyzeMoveRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeMoveRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeMoveRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java new file mode 100644 index 000000000000..9823f3719da8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeMoveRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeMoveRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Name of the resource to perform the analysis against.
+   * Only GCP Project are supported as of today. Hence, this can only be Project
+   * ID (such as "projects/my-project-id") or a Project Number (such as
+   * "projects/12345").
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The resource. + */ + java.lang.String getResource(); + /** + *
+   * Required. Name of the resource to perform the analysis against.
+   * Only GCP Project are supported as of today. Hence, this can only be Project
+   * ID (such as "projects/my-project-id") or a Project Number (such as
+   * "projects/12345").
+   * 
+ * + * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for resource. + */ + com.google.protobuf.ByteString + getResourceBytes(); + + /** + *
+   * Required. Name of the GCP Folder or Organization to reparent the target
+   * resource. The analysis will be performed against hypothetically moving the
+   * resource to this specified desitination parent. This can only be a Folder
+   * number (such as "folders/123") or an Organization number (such as
+   * "organizations/123").
+   * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The destinationParent. + */ + java.lang.String getDestinationParent(); + /** + *
+   * Required. Name of the GCP Folder or Organization to reparent the target
+   * resource. The analysis will be performed against hypothetically moving the
+   * resource to this specified desitination parent. This can only be a Folder
+   * number (such as "folders/123") or an Organization number (such as
+   * "organizations/123").
+   * 
+ * + * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for destinationParent. + */ + com.google.protobuf.ByteString + getDestinationParentBytes(); + + /** + *
+   * Analysis view indicating what information should be included in the
+   * analysis response. If unspecified, the default view is FULL.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + *
+   * Analysis view indicating what information should be included in the
+   * analysis response. If unspecified, the default view is FULL.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; + * @return The view. + */ + com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView getView(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java new file mode 100644 index 000000000000..ae20bed35f4b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java @@ -0,0 +1,895 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * The response message for resource move analysis.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveResponse} + */ +public final class AnalyzeMoveResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeMoveResponse) + AnalyzeMoveResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use AnalyzeMoveResponse.newBuilder() to construct. + private AnalyzeMoveResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AnalyzeMoveResponse() { + moveAnalysis_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnalyzeMoveResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AnalyzeMoveResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + moveAnalysis_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + moveAnalysis_.add( + input.readMessage(com.google.cloud.asset.v1.MoveAnalysis.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + moveAnalysis_ = java.util.Collections.unmodifiableList(moveAnalysis_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeMoveResponse.class, com.google.cloud.asset.v1.AnalyzeMoveResponse.Builder.class); + } + + public static final int MOVE_ANALYSIS_FIELD_NUMBER = 1; + private java.util.List moveAnalysis_; + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + @java.lang.Override + public java.util.List getMoveAnalysisList() { + return moveAnalysis_; + } + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + @java.lang.Override + public java.util.List + getMoveAnalysisOrBuilderList() { + return moveAnalysis_; + } + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + @java.lang.Override + public int getMoveAnalysisCount() { + return moveAnalysis_.size(); + } + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysis getMoveAnalysis(int index) { + return moveAnalysis_.get(index); + } + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisOrBuilder getMoveAnalysisOrBuilder( + int index) { + return moveAnalysis_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < moveAnalysis_.size(); i++) { + output.writeMessage(1, moveAnalysis_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < moveAnalysis_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, moveAnalysis_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeMoveResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeMoveResponse other = (com.google.cloud.asset.v1.AnalyzeMoveResponse) obj; + + if (!getMoveAnalysisList() + .equals(other.getMoveAnalysisList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMoveAnalysisCount() > 0) { + hash = (37 * hash) + MOVE_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getMoveAnalysisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeMoveResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The response message for resource move analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeMoveResponse) + com.google.cloud.asset.v1.AnalyzeMoveResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeMoveResponse.class, com.google.cloud.asset.v1.AnalyzeMoveResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeMoveResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getMoveAnalysisFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (moveAnalysisBuilder_ == null) { + moveAnalysis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + moveAnalysisBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeMoveResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveResponse build() { + com.google.cloud.asset.v1.AnalyzeMoveResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveResponse buildPartial() { + com.google.cloud.asset.v1.AnalyzeMoveResponse result = new com.google.cloud.asset.v1.AnalyzeMoveResponse(this); + int from_bitField0_ = bitField0_; + if (moveAnalysisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + moveAnalysis_ = java.util.Collections.unmodifiableList(moveAnalysis_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.moveAnalysis_ = moveAnalysis_; + } else { + result.moveAnalysis_ = moveAnalysisBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AnalyzeMoveResponse) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeMoveResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeMoveResponse other) { + if (other == com.google.cloud.asset.v1.AnalyzeMoveResponse.getDefaultInstance()) return this; + if (moveAnalysisBuilder_ == null) { + if (!other.moveAnalysis_.isEmpty()) { + if (moveAnalysis_.isEmpty()) { + moveAnalysis_ = other.moveAnalysis_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMoveAnalysisIsMutable(); + moveAnalysis_.addAll(other.moveAnalysis_); + } + onChanged(); + } + } else { + if (!other.moveAnalysis_.isEmpty()) { + if (moveAnalysisBuilder_.isEmpty()) { + moveAnalysisBuilder_.dispose(); + moveAnalysisBuilder_ = null; + moveAnalysis_ = other.moveAnalysis_; + bitField0_ = (bitField0_ & ~0x00000001); + moveAnalysisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMoveAnalysisFieldBuilder() : null; + } else { + moveAnalysisBuilder_.addAllMessages(other.moveAnalysis_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AnalyzeMoveResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AnalyzeMoveResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List moveAnalysis_ = + java.util.Collections.emptyList(); + private void ensureMoveAnalysisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + moveAnalysis_ = new java.util.ArrayList(moveAnalysis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveAnalysis, com.google.cloud.asset.v1.MoveAnalysis.Builder, com.google.cloud.asset.v1.MoveAnalysisOrBuilder> moveAnalysisBuilder_; + + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public java.util.List getMoveAnalysisList() { + if (moveAnalysisBuilder_ == null) { + return java.util.Collections.unmodifiableList(moveAnalysis_); + } else { + return moveAnalysisBuilder_.getMessageList(); + } + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public int getMoveAnalysisCount() { + if (moveAnalysisBuilder_ == null) { + return moveAnalysis_.size(); + } else { + return moveAnalysisBuilder_.getCount(); + } + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public com.google.cloud.asset.v1.MoveAnalysis getMoveAnalysis(int index) { + if (moveAnalysisBuilder_ == null) { + return moveAnalysis_.get(index); + } else { + return moveAnalysisBuilder_.getMessage(index); + } + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder setMoveAnalysis( + int index, com.google.cloud.asset.v1.MoveAnalysis value) { + if (moveAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMoveAnalysisIsMutable(); + moveAnalysis_.set(index, value); + onChanged(); + } else { + moveAnalysisBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder setMoveAnalysis( + int index, com.google.cloud.asset.v1.MoveAnalysis.Builder builderForValue) { + if (moveAnalysisBuilder_ == null) { + ensureMoveAnalysisIsMutable(); + moveAnalysis_.set(index, builderForValue.build()); + onChanged(); + } else { + moveAnalysisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder addMoveAnalysis(com.google.cloud.asset.v1.MoveAnalysis value) { + if (moveAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMoveAnalysisIsMutable(); + moveAnalysis_.add(value); + onChanged(); + } else { + moveAnalysisBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder addMoveAnalysis( + int index, com.google.cloud.asset.v1.MoveAnalysis value) { + if (moveAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMoveAnalysisIsMutable(); + moveAnalysis_.add(index, value); + onChanged(); + } else { + moveAnalysisBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder addMoveAnalysis( + com.google.cloud.asset.v1.MoveAnalysis.Builder builderForValue) { + if (moveAnalysisBuilder_ == null) { + ensureMoveAnalysisIsMutable(); + moveAnalysis_.add(builderForValue.build()); + onChanged(); + } else { + moveAnalysisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder addMoveAnalysis( + int index, com.google.cloud.asset.v1.MoveAnalysis.Builder builderForValue) { + if (moveAnalysisBuilder_ == null) { + ensureMoveAnalysisIsMutable(); + moveAnalysis_.add(index, builderForValue.build()); + onChanged(); + } else { + moveAnalysisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder addAllMoveAnalysis( + java.lang.Iterable values) { + if (moveAnalysisBuilder_ == null) { + ensureMoveAnalysisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, moveAnalysis_); + onChanged(); + } else { + moveAnalysisBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder clearMoveAnalysis() { + if (moveAnalysisBuilder_ == null) { + moveAnalysis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + moveAnalysisBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public Builder removeMoveAnalysis(int index) { + if (moveAnalysisBuilder_ == null) { + ensureMoveAnalysisIsMutable(); + moveAnalysis_.remove(index); + onChanged(); + } else { + moveAnalysisBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public com.google.cloud.asset.v1.MoveAnalysis.Builder getMoveAnalysisBuilder( + int index) { + return getMoveAnalysisFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public com.google.cloud.asset.v1.MoveAnalysisOrBuilder getMoveAnalysisOrBuilder( + int index) { + if (moveAnalysisBuilder_ == null) { + return moveAnalysis_.get(index); } else { + return moveAnalysisBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public java.util.List + getMoveAnalysisOrBuilderList() { + if (moveAnalysisBuilder_ != null) { + return moveAnalysisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(moveAnalysis_); + } + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public com.google.cloud.asset.v1.MoveAnalysis.Builder addMoveAnalysisBuilder() { + return getMoveAnalysisFieldBuilder().addBuilder( + com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance()); + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public com.google.cloud.asset.v1.MoveAnalysis.Builder addMoveAnalysisBuilder( + int index) { + return getMoveAnalysisFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance()); + } + /** + *
+     * The list of analyses returned from performing the intended resource move
+     * analysis. The analysis is grouped by different Cloud services.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + public java.util.List + getMoveAnalysisBuilderList() { + return getMoveAnalysisFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveAnalysis, com.google.cloud.asset.v1.MoveAnalysis.Builder, com.google.cloud.asset.v1.MoveAnalysisOrBuilder> + getMoveAnalysisFieldBuilder() { + if (moveAnalysisBuilder_ == null) { + moveAnalysisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveAnalysis, com.google.cloud.asset.v1.MoveAnalysis.Builder, com.google.cloud.asset.v1.MoveAnalysisOrBuilder>( + moveAnalysis_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + moveAnalysis_ = null; + } + return moveAnalysisBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeMoveResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeMoveResponse) + private static final com.google.cloud.asset.v1.AnalyzeMoveResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeMoveResponse(); + } + + public static com.google.cloud.asset.v1.AnalyzeMoveResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeMoveResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeMoveResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeMoveResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java new file mode 100644 index 000000000000..7fea545cedd3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeMoveResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeMoveResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + java.util.List + getMoveAnalysisList(); + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + com.google.cloud.asset.v1.MoveAnalysis getMoveAnalysis(int index); + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + int getMoveAnalysisCount(); + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + java.util.List + getMoveAnalysisOrBuilderList(); + /** + *
+   * The list of analyses returned from performing the intended resource move
+   * analysis. The analysis is grouped by different Cloud services.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; + */ + com.google.cloud.asset.v1.MoveAnalysisOrBuilder getMoveAnalysisOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java new file mode 100644 index 000000000000..fbb8226aca23 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java @@ -0,0 +1,4158 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * An asset in Google Cloud. An asset can be any resource in the Google Cloud
+ * [resource
+ * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+ * a resource outside the Google Cloud resource hierarchy (such as Google
+ * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy),
+ * or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship).
+ * See [Supported asset
+ * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+ * for more information.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.Asset} + */ +public final class Asset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.Asset) + AssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Asset() { + name_ = ""; + assetType_ = ""; + orgPolicy_ = java.util.Collections.emptyList(); + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Asset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Asset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + com.google.cloud.asset.v1.Resource.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = input.readMessage(com.google.cloud.asset.v1.Resource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (iamPolicy_ != null) { + subBuilder = iamPolicy_.toBuilder(); + } + iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamPolicy_); + iamPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + orgPolicy_.add( + input.readMessage(com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); + break; + } + case 58: { + com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; + if (accessContextPolicyCase_ == 7) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 7; + break; + } + case 66: { + com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; + if (accessContextPolicyCase_ == 8) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 8; + break; + } + case 74: { + com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = null; + if (accessContextPolicyCase_ == 9) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 9; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + ancestors_.add(s); + break; + } + case 90: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.cloud.osconfig.v1.Inventory.Builder subBuilder = null; + if (osInventory_ != null) { + subBuilder = osInventory_.toBuilder(); + } + osInventory_ = input.readMessage(com.google.cloud.osconfig.v1.Inventory.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(osInventory_); + osInventory_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.google.cloud.asset.v1.RelatedAssets.Builder subBuilder = null; + if (relatedAssets_ != null) { + subBuilder = relatedAssets_.toBuilder(); + } + relatedAssets_ = input.readMessage(com.google.cloud.asset.v1.RelatedAssets.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relatedAssets_); + relatedAssets_ = subBuilder.buildPartial(); + } + + break; + } + case 122: { + com.google.cloud.asset.v1.RelatedAsset.Builder subBuilder = null; + if (relatedAsset_ != null) { + subBuilder = relatedAsset_.toBuilder(); + } + relatedAsset_ = input.readMessage(com.google.cloud.asset.v1.RelatedAsset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relatedAsset_); + relatedAsset_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.Asset.class, com.google.cloud.asset.v1.Asset.Builder.class); + } + + private int accessContextPolicyCase_ = 0; + private java.lang.Object accessContextPolicy_; + public enum AccessContextPolicyCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ACCESS_POLICY(7), + ACCESS_LEVEL(8), + SERVICE_PERIMETER(9), + ACCESSCONTEXTPOLICY_NOT_SET(0); + private final int value; + private AccessContextPolicyCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AccessContextPolicyCase valueOf(int value) { + return forNumber(value); + } + + public static AccessContextPolicyCase forNumber(int value) { + switch (value) { + case 7: return ACCESS_POLICY; + case 8: return ACCESS_LEVEL; + case 9: return SERVICE_PERIMETER; + case 0: return ACCESSCONTEXTPOLICY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public AccessContextPolicyCase + getAccessContextPolicyCase() { + return AccessContextPolicyCase.forNumber( + accessContextPolicyCase_); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.Resource resource_; + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.asset.v1.Resource getResource() { + return resource_ == null ? com.google.cloud.asset.v1.Resource.getDefaultInstance() : resource_; + } + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.ResourceOrBuilder getResourceOrBuilder() { + return getResource(); + } + + public static final int IAM_POLICY_FIELD_NUMBER = 4; + private com.google.iam.v1.Policy iamPolicy_; + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+   * for more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + @java.lang.Override + public boolean hasIamPolicy() { + return iamPolicy_ != null; + } + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+   * for more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getIamPolicy() { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+   * for more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + return getIamPolicy(); + } + + public static final int ORG_POLICY_FIELD_NUMBER = 6; + private java.util.List orgPolicy_; + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public java.util.List getOrgPolicyList() { + return orgPolicy_; + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public java.util.List + getOrgPolicyOrBuilderList() { + return orgPolicy_; + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public int getOrgPolicyCount() { + return orgPolicy_.size(); + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { + return orgPolicy_.get(index); + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index) { + return orgPolicy_.get(index); + } + + public static final int ACCESS_POLICY_FIELD_NUMBER = 7; + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + @java.lang.Override + public boolean hasAccessPolicy() { + return accessContextPolicyCase_ == 7; + } + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + + public static final int ACCESS_LEVEL_FIELD_NUMBER = 8; + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + @java.lang.Override + public boolean hasAccessLevel() { + return accessContextPolicyCase_ == 8; + } + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + + public static final int SERVICE_PERIMETER_FIELD_NUMBER = 9; + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + @java.lang.Override + public boolean hasServicePerimeter() { + return accessContextPolicyCase_ == 9; + } + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + + public static final int OS_INVENTORY_FIELD_NUMBER = 12; + private com.google.cloud.osconfig.v1.Inventory osInventory_; + /** + *
+   * A representation of runtime OS Inventory information. See [this
+   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+   * for more information.
+   * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + * @return Whether the osInventory field is set. + */ + @java.lang.Override + public boolean hasOsInventory() { + return osInventory_ != null; + } + /** + *
+   * A representation of runtime OS Inventory information. See [this
+   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+   * for more information.
+   * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + * @return The osInventory. + */ + @java.lang.Override + public com.google.cloud.osconfig.v1.Inventory getOsInventory() { + return osInventory_ == null ? com.google.cloud.osconfig.v1.Inventory.getDefaultInstance() : osInventory_; + } + /** + *
+   * A representation of runtime OS Inventory information. See [this
+   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+   * for more information.
+   * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + @java.lang.Override + public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() { + return getOsInventory(); + } + + public static final int RELATED_ASSETS_FIELD_NUMBER = 13; + private com.google.cloud.asset.v1.RelatedAssets relatedAssets_; + /** + *
+   * DEPRECATED. This field only presents for the purpose of
+   * backward-compatibility. The server will never generate responses with this
+   * field.
+   * The related assets of the asset of one relationship type. One asset
+   * only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. + * See google/cloud/asset/v1/assets.proto;l=166 + * @return Whether the relatedAssets field is set. + */ + @java.lang.Override + @java.lang.Deprecated public boolean hasRelatedAssets() { + return relatedAssets_ != null; + } + /** + *
+   * DEPRECATED. This field only presents for the purpose of
+   * backward-compatibility. The server will never generate responses with this
+   * field.
+   * The related assets of the asset of one relationship type. One asset
+   * only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. + * See google/cloud/asset/v1/assets.proto;l=166 + * @return The relatedAssets. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssets getRelatedAssets() { + return relatedAssets_ == null ? com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() : relatedAssets_; + } + /** + *
+   * DEPRECATED. This field only presents for the purpose of
+   * backward-compatibility. The server will never generate responses with this
+   * field.
+   * The related assets of the asset of one relationship type. One asset
+   * only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { + return getRelatedAssets(); + } + + public static final int RELATED_ASSET_FIELD_NUMBER = 15; + private com.google.cloud.asset.v1.RelatedAsset relatedAsset_; + /** + *
+   * One related asset of the current asset.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + * @return Whether the relatedAsset field is set. + */ + @java.lang.Override + public boolean hasRelatedAsset() { + return relatedAsset_ != null; + } + /** + *
+   * One related asset of the current asset.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + * @return The relatedAsset. + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset getRelatedAsset() { + return relatedAsset_ == null ? com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance() : relatedAsset_; + } + /** + *
+   * One related asset of the current asset.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssetOrBuilder getRelatedAssetOrBuilder() { + return getRelatedAsset(); + } + + public static final int ANCESTORS_FIELD_NUMBER = 10; + private com.google.protobuf.LazyStringList ancestors_; + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_; + } + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + if (resource_ != null) { + output.writeMessage(3, getResource()); + } + if (iamPolicy_ != null) { + output.writeMessage(4, getIamPolicy()); + } + for (int i = 0; i < orgPolicy_.size(); i++) { + output.writeMessage(6, orgPolicy_.get(i)); + } + if (accessContextPolicyCase_ == 7) { + output.writeMessage(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 8) { + output.writeMessage(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 9) { + output.writeMessage(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + } + for (int i = 0; i < ancestors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i)); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (osInventory_ != null) { + output.writeMessage(12, getOsInventory()); + } + if (relatedAssets_ != null) { + output.writeMessage(13, getRelatedAssets()); + } + if (relatedAsset_ != null) { + output.writeMessage(15, getRelatedAsset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResource()); + } + if (iamPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIamPolicy()); + } + for (int i = 0; i < orgPolicy_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, orgPolicy_.get(i)); + } + if (accessContextPolicyCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + } + { + int dataSize = 0; + for (int i = 0; i < ancestors_.size(); i++) { + dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); + } + size += dataSize; + size += 1 * getAncestorsList().size(); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getUpdateTime()); + } + if (osInventory_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getOsInventory()); + } + if (relatedAssets_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getRelatedAssets()); + } + if (relatedAsset_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getRelatedAsset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.Asset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.Asset other = (com.google.cloud.asset.v1.Asset) obj; + + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (hasIamPolicy() != other.hasIamPolicy()) return false; + if (hasIamPolicy()) { + if (!getIamPolicy() + .equals(other.getIamPolicy())) return false; + } + if (!getOrgPolicyList() + .equals(other.getOrgPolicyList())) return false; + if (hasOsInventory() != other.hasOsInventory()) return false; + if (hasOsInventory()) { + if (!getOsInventory() + .equals(other.getOsInventory())) return false; + } + if (hasRelatedAssets() != other.hasRelatedAssets()) return false; + if (hasRelatedAssets()) { + if (!getRelatedAssets() + .equals(other.getRelatedAssets())) return false; + } + if (hasRelatedAsset() != other.hasRelatedAsset()) return false; + if (hasRelatedAsset()) { + if (!getRelatedAsset() + .equals(other.getRelatedAsset())) return false; + } + if (!getAncestorsList() + .equals(other.getAncestorsList())) return false; + if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false; + switch (accessContextPolicyCase_) { + case 7: + if (!getAccessPolicy() + .equals(other.getAccessPolicy())) return false; + break; + case 8: + if (!getAccessLevel() + .equals(other.getAccessLevel())) return false; + break; + case 9: + if (!getServicePerimeter() + .equals(other.getServicePerimeter())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + if (hasIamPolicy()) { + hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicy().hashCode(); + } + if (getOrgPolicyCount() > 0) { + hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getOrgPolicyList().hashCode(); + } + if (hasOsInventory()) { + hash = (37 * hash) + OS_INVENTORY_FIELD_NUMBER; + hash = (53 * hash) + getOsInventory().hashCode(); + } + if (hasRelatedAssets()) { + hash = (37 * hash) + RELATED_ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedAssets().hashCode(); + } + if (hasRelatedAsset()) { + hash = (37 * hash) + RELATED_ASSET_FIELD_NUMBER; + hash = (53 * hash) + getRelatedAsset().hashCode(); + } + if (getAncestorsCount() > 0) { + hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAncestorsList().hashCode(); + } + switch (accessContextPolicyCase_) { + case 7: + hash = (37 * hash) + ACCESS_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAccessPolicy().hashCode(); + break; + case 8: + hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getAccessLevel().hashCode(); + break; + case 9: + hash = (37 * hash) + SERVICE_PERIMETER_FIELD_NUMBER; + hash = (53 * hash) + getServicePerimeter().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.Asset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Asset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Asset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Asset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Asset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Asset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Asset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Asset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.Asset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Asset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.Asset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Asset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.Asset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset in Google Cloud. An asset can be any resource in the Google Cloud
+   * [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * a resource outside the Google Cloud resource hierarchy (such as Google
+   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy),
+   * or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship).
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.Asset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.Asset) + com.google.cloud.asset.v1.AssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.Asset.class, com.google.cloud.asset.v1.Asset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.Asset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getOrgPolicyFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + name_ = ""; + + assetType_ = ""; + + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + if (orgPolicyBuilder_ == null) { + orgPolicy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + orgPolicyBuilder_.clear(); + } + if (osInventoryBuilder_ == null) { + osInventory_ = null; + } else { + osInventory_ = null; + osInventoryBuilder_ = null; + } + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = null; + } else { + relatedAssets_ = null; + relatedAssetsBuilder_ = null; + } + if (relatedAssetBuilder_ == null) { + relatedAsset_ = null; + } else { + relatedAsset_ = null; + relatedAssetBuilder_ = null; + } + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Asset getDefaultInstanceForType() { + return com.google.cloud.asset.v1.Asset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.Asset build() { + com.google.cloud.asset.v1.Asset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Asset buildPartial() { + com.google.cloud.asset.v1.Asset result = new com.google.cloud.asset.v1.Asset(this); + int from_bitField0_ = bitField0_; + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.name_ = name_; + result.assetType_ = assetType_; + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + if (iamPolicyBuilder_ == null) { + result.iamPolicy_ = iamPolicy_; + } else { + result.iamPolicy_ = iamPolicyBuilder_.build(); + } + if (orgPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.orgPolicy_ = orgPolicy_; + } else { + result.orgPolicy_ = orgPolicyBuilder_.build(); + } + if (accessContextPolicyCase_ == 7) { + if (accessPolicyBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = accessPolicyBuilder_.build(); + } + } + if (accessContextPolicyCase_ == 8) { + if (accessLevelBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = accessLevelBuilder_.build(); + } + } + if (accessContextPolicyCase_ == 9) { + if (servicePerimeterBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = servicePerimeterBuilder_.build(); + } + } + if (osInventoryBuilder_ == null) { + result.osInventory_ = osInventory_; + } else { + result.osInventory_ = osInventoryBuilder_.build(); + } + if (relatedAssetsBuilder_ == null) { + result.relatedAssets_ = relatedAssets_; + } else { + result.relatedAssets_ = relatedAssetsBuilder_.build(); + } + if (relatedAssetBuilder_ == null) { + result.relatedAsset_ = relatedAsset_; + } else { + result.relatedAsset_ = relatedAssetBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ancestors_ = ancestors_; + result.accessContextPolicyCase_ = accessContextPolicyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.Asset) { + return mergeFrom((com.google.cloud.asset.v1.Asset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.Asset other) { + if (other == com.google.cloud.asset.v1.Asset.getDefaultInstance()) return this; + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (other.hasIamPolicy()) { + mergeIamPolicy(other.getIamPolicy()); + } + if (orgPolicyBuilder_ == null) { + if (!other.orgPolicy_.isEmpty()) { + if (orgPolicy_.isEmpty()) { + orgPolicy_ = other.orgPolicy_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOrgPolicyIsMutable(); + orgPolicy_.addAll(other.orgPolicy_); + } + onChanged(); + } + } else { + if (!other.orgPolicy_.isEmpty()) { + if (orgPolicyBuilder_.isEmpty()) { + orgPolicyBuilder_.dispose(); + orgPolicyBuilder_ = null; + orgPolicy_ = other.orgPolicy_; + bitField0_ = (bitField0_ & ~0x00000001); + orgPolicyBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOrgPolicyFieldBuilder() : null; + } else { + orgPolicyBuilder_.addAllMessages(other.orgPolicy_); + } + } + } + if (other.hasOsInventory()) { + mergeOsInventory(other.getOsInventory()); + } + if (other.hasRelatedAssets()) { + mergeRelatedAssets(other.getRelatedAssets()); + } + if (other.hasRelatedAsset()) { + mergeRelatedAsset(other.getRelatedAsset()); + } + if (!other.ancestors_.isEmpty()) { + if (ancestors_.isEmpty()) { + ancestors_ = other.ancestors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAncestorsIsMutable(); + ancestors_.addAll(other.ancestors_); + } + onChanged(); + } + switch (other.getAccessContextPolicyCase()) { + case ACCESS_POLICY: { + mergeAccessPolicy(other.getAccessPolicy()); + break; + } + case ACCESS_LEVEL: { + mergeAccessLevel(other.getAccessLevel()); + break; + } + case SERVICE_PERIMETER: { + mergeServicePerimeter(other.getServicePerimeter()); + break; + } + case ACCESSCONTEXTPOLICY_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.Asset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.Asset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int accessContextPolicyCase_ = 0; + private java.lang.Object accessContextPolicy_; + public AccessContextPolicyCase + getAccessContextPolicyCase() { + return AccessContextPolicyCase.forNumber( + accessContextPolicyCase_); + } + + public Builder clearAccessContextPolicy() { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.Resource resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Resource, com.google.cloud.asset.v1.Resource.Builder, com.google.cloud.asset.v1.ResourceOrBuilder> resourceBuilder_; + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + * @return The resource. + */ + public com.google.cloud.asset.v1.Resource getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.google.cloud.asset.v1.Resource.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + public Builder setResource(com.google.cloud.asset.v1.Resource value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + public Builder setResource( + com.google.cloud.asset.v1.Resource.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + public Builder mergeResource(com.google.cloud.asset.v1.Resource value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.asset.v1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + public com.google.cloud.asset.v1.Resource.Builder getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + public com.google.cloud.asset.v1.ResourceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.google.cloud.asset.v1.Resource.getDefaultInstance() : resource_; + } + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Resource, com.google.cloud.asset.v1.Resource.Builder, com.google.cloud.asset.v1.ResourceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Resource, com.google.cloud.asset.v1.Resource.Builder, com.google.cloud.asset.v1.ResourceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private com.google.iam.v1.Policy iamPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + public boolean hasIamPolicy() { + return iamPolicyBuilder_ != null || iamPolicy_ != null; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + public com.google.iam.v1.Policy getIamPolicy() { + if (iamPolicyBuilder_ == null) { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } else { + return iamPolicyBuilder_.getMessage(); + } + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicy_ = value; + onChanged(); + } else { + iamPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy( + com.google.iam.v1.Policy.Builder builderForValue) { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = builderForValue.build(); + onChanged(); + } else { + iamPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (iamPolicy_ != null) { + iamPolicy_ = + com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); + } else { + iamPolicy_ = value; + } + onChanged(); + } else { + iamPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder clearIamPolicy() { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + onChanged(); + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { + + onChanged(); + return getIamPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + if (iamPolicyBuilder_ != null) { + return iamPolicyBuilder_.getMessageOrBuilder(); + } else { + return iamPolicy_ == null ? + com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+     * for more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> + getIamPolicyFieldBuilder() { + if (iamPolicyBuilder_ == null) { + iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( + getIamPolicy(), + getParentForChildren(), + isClean()); + iamPolicy_ = null; + } + return iamPolicyBuilder_; + } + + private java.util.List orgPolicy_ = + java.util.Collections.emptyList(); + private void ensureOrgPolicyIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = new java.util.ArrayList(orgPolicy_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> orgPolicyBuilder_; + + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List getOrgPolicyList() { + if (orgPolicyBuilder_ == null) { + return java.util.Collections.unmodifiableList(orgPolicy_); + } else { + return orgPolicyBuilder_.getMessageList(); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public int getOrgPolicyCount() { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.size(); + } else { + return orgPolicyBuilder_.getCount(); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.get(index); + } else { + return orgPolicyBuilder_.getMessage(index); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder setOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.set(index, value); + onChanged(); + } else { + orgPolicyBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder setOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.set(index, builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.add(value); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.add(index, value); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(index, builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addAllOrgPolicy( + java.lang.Iterable values) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, orgPolicy_); + onChanged(); + } else { + orgPolicyBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder clearOrgPolicy() { + if (orgPolicyBuilder_ == null) { + orgPolicy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + orgPolicyBuilder_.clear(); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder removeOrgPolicy(int index) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.remove(index); + onChanged(); + } else { + orgPolicyBuilder_.remove(index); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder getOrgPolicyBuilder( + int index) { + return getOrgPolicyFieldBuilder().getBuilder(index); + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index) { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.get(index); } else { + return orgPolicyBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List + getOrgPolicyOrBuilderList() { + if (orgPolicyBuilder_ != null) { + return orgPolicyBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orgPolicy_); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder() { + return getOrgPolicyFieldBuilder().addBuilder( + com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder( + int index) { + return getOrgPolicyFieldBuilder().addBuilder( + index, com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List + getOrgPolicyBuilderList() { + return getOrgPolicyFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> + getOrgPolicyFieldBuilder() { + if (orgPolicyBuilder_ == null) { + orgPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder>( + orgPolicy_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + orgPolicy_ = null; + } + return orgPolicyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> accessPolicyBuilder_; + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + @java.lang.Override + public boolean hasAccessPolicy() { + return accessContextPolicyCase_ == 7; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 7) { + return accessPolicyBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder setAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { + if (accessPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + accessPolicyBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 7; + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder setAccessPolicy( + com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder builderForValue) { + if (accessPolicyBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + accessPolicyBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 7; + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder mergeAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.newBuilder((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 7) { + accessPolicyBuilder_.mergeFrom(value); + } else { + accessPolicyBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 7; + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder clearAccessPolicy() { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 7) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + accessPolicyBuilder_.clear(); + } + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder getAccessPolicyBuilder() { + return getAccessPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { + if ((accessContextPolicyCase_ == 7) && (accessPolicyBuilder_ != null)) { + return accessPolicyBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> + getAccessPolicyFieldBuilder() { + if (accessPolicyBuilder_ == null) { + if (!(accessContextPolicyCase_ == 7)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + accessPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>( + (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 7; + onChanged();; + return accessPolicyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> accessLevelBuilder_; + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + @java.lang.Override + public boolean hasAccessLevel() { + return accessContextPolicyCase_ == 8; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 8) { + return accessLevelBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder setAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { + if (accessLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + accessLevelBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 8; + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder setAccessLevel( + com.google.identity.accesscontextmanager.v1.AccessLevel.Builder builderForValue) { + if (accessLevelBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + accessLevelBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 8; + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder mergeAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.newBuilder((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 8) { + accessLevelBuilder_.mergeFrom(value); + } else { + accessLevelBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 8; + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder clearAccessLevel() { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 8) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + accessLevelBuilder_.clear(); + } + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public com.google.identity.accesscontextmanager.v1.AccessLevel.Builder getAccessLevelBuilder() { + return getAccessLevelFieldBuilder().getBuilder(); + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { + if ((accessContextPolicyCase_ == 8) && (accessLevelBuilder_ != null)) { + return accessLevelBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> + getAccessLevelFieldBuilder() { + if (accessLevelBuilder_ == null) { + if (!(accessContextPolicyCase_ == 8)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + accessLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>( + (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 8; + onChanged();; + return accessLevelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> servicePerimeterBuilder_; + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + @java.lang.Override + public boolean hasServicePerimeter() { + return accessContextPolicyCase_ == 9; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 9) { + return servicePerimeterBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder setServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { + if (servicePerimeterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + servicePerimeterBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 9; + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder setServicePerimeter( + com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder builderForValue) { + if (servicePerimeterBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + servicePerimeterBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 9; + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder mergeServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.newBuilder((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 9) { + servicePerimeterBuilder_.mergeFrom(value); + } else { + servicePerimeterBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 9; + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder clearServicePerimeter() { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 9) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + servicePerimeterBuilder_.clear(); + } + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder getServicePerimeterBuilder() { + return getServicePerimeterFieldBuilder().getBuilder(); + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { + if ((accessContextPolicyCase_ == 9) && (servicePerimeterBuilder_ != null)) { + return servicePerimeterBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> + getServicePerimeterFieldBuilder() { + if (servicePerimeterBuilder_ == null) { + if (!(accessContextPolicyCase_ == 9)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + servicePerimeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>( + (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 9; + onChanged();; + return servicePerimeterBuilder_; + } + + private com.google.cloud.osconfig.v1.Inventory osInventory_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.Inventory, com.google.cloud.osconfig.v1.Inventory.Builder, com.google.cloud.osconfig.v1.InventoryOrBuilder> osInventoryBuilder_; + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + * @return Whether the osInventory field is set. + */ + public boolean hasOsInventory() { + return osInventoryBuilder_ != null || osInventory_ != null; + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + * @return The osInventory. + */ + public com.google.cloud.osconfig.v1.Inventory getOsInventory() { + if (osInventoryBuilder_ == null) { + return osInventory_ == null ? com.google.cloud.osconfig.v1.Inventory.getDefaultInstance() : osInventory_; + } else { + return osInventoryBuilder_.getMessage(); + } + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + public Builder setOsInventory(com.google.cloud.osconfig.v1.Inventory value) { + if (osInventoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + osInventory_ = value; + onChanged(); + } else { + osInventoryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + public Builder setOsInventory( + com.google.cloud.osconfig.v1.Inventory.Builder builderForValue) { + if (osInventoryBuilder_ == null) { + osInventory_ = builderForValue.build(); + onChanged(); + } else { + osInventoryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + public Builder mergeOsInventory(com.google.cloud.osconfig.v1.Inventory value) { + if (osInventoryBuilder_ == null) { + if (osInventory_ != null) { + osInventory_ = + com.google.cloud.osconfig.v1.Inventory.newBuilder(osInventory_).mergeFrom(value).buildPartial(); + } else { + osInventory_ = value; + } + onChanged(); + } else { + osInventoryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + public Builder clearOsInventory() { + if (osInventoryBuilder_ == null) { + osInventory_ = null; + onChanged(); + } else { + osInventory_ = null; + osInventoryBuilder_ = null; + } + + return this; + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + public com.google.cloud.osconfig.v1.Inventory.Builder getOsInventoryBuilder() { + + onChanged(); + return getOsInventoryFieldBuilder().getBuilder(); + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() { + if (osInventoryBuilder_ != null) { + return osInventoryBuilder_.getMessageOrBuilder(); + } else { + return osInventory_ == null ? + com.google.cloud.osconfig.v1.Inventory.getDefaultInstance() : osInventory_; + } + } + /** + *
+     * A representation of runtime OS Inventory information. See [this
+     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+     * for more information.
+     * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.Inventory, com.google.cloud.osconfig.v1.Inventory.Builder, com.google.cloud.osconfig.v1.InventoryOrBuilder> + getOsInventoryFieldBuilder() { + if (osInventoryBuilder_ == null) { + osInventoryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.osconfig.v1.Inventory, com.google.cloud.osconfig.v1.Inventory.Builder, com.google.cloud.osconfig.v1.InventoryOrBuilder>( + getOsInventory(), + getParentForChildren(), + isClean()); + osInventory_ = null; + } + return osInventoryBuilder_; + } + + private com.google.cloud.asset.v1.RelatedAssets relatedAssets_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAssets, com.google.cloud.asset.v1.RelatedAssets.Builder, com.google.cloud.asset.v1.RelatedAssetsOrBuilder> relatedAssetsBuilder_; + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. + * See google/cloud/asset/v1/assets.proto;l=166 + * @return Whether the relatedAssets field is set. + */ + @java.lang.Deprecated public boolean hasRelatedAssets() { + return relatedAssetsBuilder_ != null || relatedAssets_ != null; + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. + * See google/cloud/asset/v1/assets.proto;l=166 + * @return The relatedAssets. + */ + @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssets getRelatedAssets() { + if (relatedAssetsBuilder_ == null) { + return relatedAssets_ == null ? com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() : relatedAssets_; + } else { + return relatedAssetsBuilder_.getMessage(); + } + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setRelatedAssets(com.google.cloud.asset.v1.RelatedAssets value) { + if (relatedAssetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relatedAssets_ = value; + onChanged(); + } else { + relatedAssetsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Deprecated public Builder setRelatedAssets( + com.google.cloud.asset.v1.RelatedAssets.Builder builderForValue) { + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = builderForValue.build(); + onChanged(); + } else { + relatedAssetsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Deprecated public Builder mergeRelatedAssets(com.google.cloud.asset.v1.RelatedAssets value) { + if (relatedAssetsBuilder_ == null) { + if (relatedAssets_ != null) { + relatedAssets_ = + com.google.cloud.asset.v1.RelatedAssets.newBuilder(relatedAssets_).mergeFrom(value).buildPartial(); + } else { + relatedAssets_ = value; + } + onChanged(); + } else { + relatedAssetsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Deprecated public Builder clearRelatedAssets() { + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = null; + onChanged(); + } else { + relatedAssets_ = null; + relatedAssetsBuilder_ = null; + } + + return this; + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssets.Builder getRelatedAssetsBuilder() { + + onChanged(); + return getRelatedAssetsFieldBuilder().getBuilder(); + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { + if (relatedAssetsBuilder_ != null) { + return relatedAssetsBuilder_.getMessageOrBuilder(); + } else { + return relatedAssets_ == null ? + com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() : relatedAssets_; + } + } + /** + *
+     * DEPRECATED. This field only presents for the purpose of
+     * backward-compatibility. The server will never generate responses with this
+     * field.
+     * The related assets of the asset of one relationship type. One asset
+     * only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAssets, com.google.cloud.asset.v1.RelatedAssets.Builder, com.google.cloud.asset.v1.RelatedAssetsOrBuilder> + getRelatedAssetsFieldBuilder() { + if (relatedAssetsBuilder_ == null) { + relatedAssetsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAssets, com.google.cloud.asset.v1.RelatedAssets.Builder, com.google.cloud.asset.v1.RelatedAssetsOrBuilder>( + getRelatedAssets(), + getParentForChildren(), + isClean()); + relatedAssets_ = null; + } + return relatedAssetsBuilder_; + } + + private com.google.cloud.asset.v1.RelatedAsset relatedAsset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> relatedAssetBuilder_; + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + * @return Whether the relatedAsset field is set. + */ + public boolean hasRelatedAsset() { + return relatedAssetBuilder_ != null || relatedAsset_ != null; + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + * @return The relatedAsset. + */ + public com.google.cloud.asset.v1.RelatedAsset getRelatedAsset() { + if (relatedAssetBuilder_ == null) { + return relatedAsset_ == null ? com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance() : relatedAsset_; + } else { + return relatedAssetBuilder_.getMessage(); + } + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + public Builder setRelatedAsset(com.google.cloud.asset.v1.RelatedAsset value) { + if (relatedAssetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relatedAsset_ = value; + onChanged(); + } else { + relatedAssetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + public Builder setRelatedAsset( + com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { + if (relatedAssetBuilder_ == null) { + relatedAsset_ = builderForValue.build(); + onChanged(); + } else { + relatedAssetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + public Builder mergeRelatedAsset(com.google.cloud.asset.v1.RelatedAsset value) { + if (relatedAssetBuilder_ == null) { + if (relatedAsset_ != null) { + relatedAsset_ = + com.google.cloud.asset.v1.RelatedAsset.newBuilder(relatedAsset_).mergeFrom(value).buildPartial(); + } else { + relatedAsset_ = value; + } + onChanged(); + } else { + relatedAssetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + public Builder clearRelatedAsset() { + if (relatedAssetBuilder_ == null) { + relatedAsset_ = null; + onChanged(); + } else { + relatedAsset_ = null; + relatedAssetBuilder_ = null; + } + + return this; + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + public com.google.cloud.asset.v1.RelatedAsset.Builder getRelatedAssetBuilder() { + + onChanged(); + return getRelatedAssetFieldBuilder().getBuilder(); + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + public com.google.cloud.asset.v1.RelatedAssetOrBuilder getRelatedAssetOrBuilder() { + if (relatedAssetBuilder_ != null) { + return relatedAssetBuilder_.getMessageOrBuilder(); + } else { + return relatedAsset_ == null ? + com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance() : relatedAsset_; + } + } + /** + *
+     * One related asset of the current asset.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> + getRelatedAssetFieldBuilder() { + if (relatedAssetBuilder_ == null) { + relatedAssetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder>( + getRelatedAsset(), + getParentForChildren(), + isClean()); + relatedAsset_ = null; + } + return relatedAssetBuilder_; + } + + private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAncestorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_.getUnmodifiableView(); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index to set the value at. + * @param value The ancestors to set. + * @return This builder for chaining. + */ + public Builder setAncestors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param value The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param values The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAllAncestors( + java.lang.Iterable values) { + ensureAncestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ancestors_); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @return This builder for chaining. + */ + public Builder clearAncestors() { + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param value The bytes of the ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.Asset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Asset) + private static final com.google.cloud.asset.v1.Asset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.Asset(); + } + + public static com.google.cloud.asset.v1.Asset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Asset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Asset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Asset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java new file mode 100644 index 000000000000..24d40ac71917 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java @@ -0,0 +1,490 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface AssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.Asset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + * @return The resource. + */ + com.google.cloud.asset.v1.Resource getResource(); + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1.Resource resource = 3; + */ + com.google.cloud.asset.v1.ResourceOrBuilder getResourceOrBuilder(); + + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+   * for more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + boolean hasIamPolicy(); + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+   * for more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + com.google.iam.v1.Policy getIamPolicy(); + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
+   * for more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); + + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + java.util.List + getOrgPolicyList(); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + int getOrgPolicyCount(); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + java.util.List + getOrgPolicyOrBuilderList(); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index); + + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + boolean hasAccessPolicy(); + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy(); + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder(); + + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + boolean hasAccessLevel(); + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel(); + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder(); + + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + boolean hasServicePerimeter(); + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter(); + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder(); + + /** + *
+   * A representation of runtime OS Inventory information. See [this
+   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+   * for more information.
+   * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + * @return Whether the osInventory field is set. + */ + boolean hasOsInventory(); + /** + *
+   * A representation of runtime OS Inventory information. See [this
+   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+   * for more information.
+   * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + * @return The osInventory. + */ + com.google.cloud.osconfig.v1.Inventory getOsInventory(); + /** + *
+   * A representation of runtime OS Inventory information. See [this
+   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
+   * for more information.
+   * 
+ * + * .google.cloud.osconfig.v1.Inventory os_inventory = 12; + */ + com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder(); + + /** + *
+   * DEPRECATED. This field only presents for the purpose of
+   * backward-compatibility. The server will never generate responses with this
+   * field.
+   * The related assets of the asset of one relationship type. One asset
+   * only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. + * See google/cloud/asset/v1/assets.proto;l=166 + * @return Whether the relatedAssets field is set. + */ + @java.lang.Deprecated boolean hasRelatedAssets(); + /** + *
+   * DEPRECATED. This field only presents for the purpose of
+   * backward-compatibility. The server will never generate responses with this
+   * field.
+   * The related assets of the asset of one relationship type. One asset
+   * only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. + * See google/cloud/asset/v1/assets.proto;l=166 + * @return The relatedAssets. + */ + @java.lang.Deprecated com.google.cloud.asset.v1.RelatedAssets getRelatedAssets(); + /** + *
+   * DEPRECATED. This field only presents for the purpose of
+   * backward-compatibility. The server will never generate responses with this
+   * field.
+   * The related assets of the asset of one relationship type. One asset
+   * only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; + */ + @java.lang.Deprecated com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder(); + + /** + *
+   * One related asset of the current asset.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + * @return Whether the relatedAsset field is set. + */ + boolean hasRelatedAsset(); + /** + *
+   * One related asset of the current asset.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + * @return The relatedAsset. + */ + com.google.cloud.asset.v1.RelatedAsset getRelatedAsset(); + /** + *
+   * One related asset of the current asset.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAsset related_asset = 15; + */ + com.google.cloud.asset.v1.RelatedAssetOrBuilder getRelatedAssetOrBuilder(); + + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + java.util.List + getAncestorsList(); + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + int getAncestorsCount(); + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + java.lang.String getAncestors(int index); + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + com.google.protobuf.ByteString + getAncestorsBytes(int index); + + public com.google.cloud.asset.v1.Asset.AccessContextPolicyCase getAccessContextPolicyCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java new file mode 100644 index 000000000000..62f475b01a6e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java @@ -0,0 +1,502 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public final class AssetProto { + private AssetProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_TimeWindow_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_Asset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_Resource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_VersionedResource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AttachedResource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\"google/cloud/asset/v1/assets.proto\022\025go" + + "ogle.cloud.asset.v1\032\031google/api/resource" + + ".proto\032)google/cloud/orgpolicy/v1/orgpol" + + "icy.proto\032(google/cloud/osconfig/v1/inve" + + "ntory.proto\032\032google/iam/v1/policy.proto\032" + + ":google/identity/accesscontextmanager/v1" + + "/access_level.proto\032;google/identity/acc" + + "esscontextmanager/v1/access_policy.proto" + + "\032?google/identity/accesscontextmanager/v" + + "1/service_perimeter.proto\032\034google/protob" + + "uf/struct.proto\032\037google/protobuf/timesta" + + "mp.proto\032\025google/rpc/code.proto\"\365\002\n\rTemp" + + "oralAsset\0221\n\006window\030\001 \001(\0132!.google.cloud" + + ".asset.v1.TimeWindow\022\017\n\007deleted\030\002 \001(\010\022+\n" + + "\005asset\030\003 \001(\0132\034.google.cloud.asset.v1.Ass" + + "et\022O\n\021prior_asset_state\030\004 \001(\01624.google.c" + + "loud.asset.v1.TemporalAsset.PriorAssetSt" + + "ate\0221\n\013prior_asset\030\005 \001(\0132\034.google.cloud." + + "asset.v1.Asset\"o\n\017PriorAssetState\022!\n\035PRI" + + "OR_ASSET_STATE_UNSPECIFIED\020\000\022\013\n\007PRESENT\020" + + "\001\022\013\n\007INVALID\020\002\022\022\n\016DOES_NOT_EXIST\020\003\022\013\n\007DE" + + "LETED\020\004\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(" + + "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\"\363\005\n\005" + + "Asset\022/\n\013update_time\030\013 \001(\0132\032.google.prot" + + "obuf.Timestamp\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_ty" + + "pe\030\002 \001(\t\0221\n\010resource\030\003 \001(\0132\037.google.clou" + + "d.asset.v1.Resource\022)\n\niam_policy\030\004 \001(\0132" + + "\025.google.iam.v1.Policy\0225\n\norg_policy\030\006 \003" + + "(\0132!.google.cloud.orgpolicy.v1.Policy\022N\n" + + "\raccess_policy\030\007 \001(\01325.google.identity.a" + + "ccesscontextmanager.v1.AccessPolicyH\000\022L\n" + + "\014access_level\030\010 \001(\01324.google.identity.ac" + + "cesscontextmanager.v1.AccessLevelH\000\022V\n\021s" + + "ervice_perimeter\030\t \001(\01329.google.identity" + + ".accesscontextmanager.v1.ServicePerimete" + + "rH\000\0229\n\014os_inventory\030\014 \001(\0132#.google.cloud" + + ".osconfig.v1.Inventory\022@\n\016related_assets" + + "\030\r \001(\0132$.google.cloud.asset.v1.RelatedAs" + + "setsB\002\030\001\022:\n\rrelated_asset\030\017 \001(\0132#.google" + + ".cloud.asset.v1.RelatedAsset\022\021\n\tancestor" + + "s\030\n \003(\t:\'\352A$\n\037cloudasset.googleapis.com/" + + "Asset\022\001*B\027\n\025access_context_policy\"\262\001\n\010Re" + + "source\022\017\n\007version\030\001 \001(\t\022\036\n\026discovery_doc" + + "ument_uri\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022" + + "\024\n\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n" + + "\004data\030\006 \001(\0132\027.google.protobuf.Struct\022\020\n\010" + + "location\030\010 \001(\t\"\230\001\n\rRelatedAssets\022N\n\027rela" + + "tionship_attributes\030\001 \001(\0132-.google.cloud" + + ".asset.v1.RelationshipAttributes\0223\n\006asse" + + "ts\030\002 \003(\0132#.google.cloud.asset.v1.Related" + + "Asset:\002\030\001\"v\n\026RelationshipAttributes\022\014\n\004t" + + "ype\030\004 \001(\t\022\034\n\024source_resource_type\030\001 \001(\t\022" + + "\034\n\024target_resource_type\030\002 \001(\t\022\016\n\006action\030" + + "\003 \001(\t:\002\030\001\"\205\001\n\014RelatedAsset\0223\n\005asset\030\001 \001(" + + "\tB$\372A!\n\037cloudasset.googleapis.com/Asset\022" + + "\022\n\nasset_type\030\002 \001(\t\022\021\n\tancestors\030\003 \003(\t\022\031" + + "\n\021relationship_type\030\004 \001(\t\"\262\007\n\024ResourceSe" + + "archResult\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002" + + " \001(\t\022\017\n\007project\030\003 \001(\t\022\017\n\007folders\030\021 \003(\t\022\024" + + "\n\014organization\030\022 \001(\t\022\024\n\014display_name\030\004 \001" + + "(\t\022\023\n\013description\030\005 \001(\t\022\020\n\010location\030\006 \001(" + + "\t\022G\n\006labels\030\007 \003(\01327.google.cloud.asset.v" + + "1.ResourceSearchResult.LabelsEntry\022\024\n\014ne" + + "twork_tags\030\010 \003(\t\022\017\n\007kms_key\030\n \001(\t\022/\n\013cre" + + "ate_time\030\013 \001(\0132\032.google.protobuf.Timesta" + + "mp\022/\n\013update_time\030\014 \001(\0132\032.google.protobu" + + "f.Timestamp\022\r\n\005state\030\r \001(\t\0226\n\025additional" + + "_attributes\030\t \001(\0132\027.google.protobuf.Stru" + + "ct\022!\n\031parent_full_resource_name\030\023 \001(\t\022E\n" + + "\023versioned_resources\030\020 \003(\0132(.google.clou" + + "d.asset.v1.VersionedResource\022C\n\022attached" + + "_resources\030\024 \003(\0132\'.google.cloud.asset.v1" + + ".AttachedResource\022U\n\rrelationships\030\025 \003(\013" + + "2>.google.cloud.asset.v1.ResourceSearchR" + + "esult.RelationshipsEntry\022\020\n\010tag_keys\030\027 \003" + + "(\t\022\022\n\ntag_values\030\031 \003(\t\022\025\n\rtag_value_ids\030" + + "\032 \003(\t\022\031\n\021parent_asset_type\030g \001(\t\032-\n\013Labe" + + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032" + + "]\n\022RelationshipsEntry\022\013\n\003key\030\001 \001(\t\0226\n\005va" + + "lue\030\002 \001(\0132\'.google.cloud.asset.v1.Relate" + + "dResources:\0028\001\"O\n\021VersionedResource\022\017\n\007v" + + "ersion\030\001 \001(\t\022)\n\010resource\030\002 \001(\0132\027.google." + + "protobuf.Struct\"m\n\020AttachedResource\022\022\n\na" + + "sset_type\030\001 \001(\t\022E\n\023versioned_resources\030\003" + + " \003(\0132(.google.cloud.asset.v1.VersionedRe" + + "source\"U\n\020RelatedResources\022A\n\021related_re" + + "sources\030\001 \003(\0132&.google.cloud.asset.v1.Re" + + "latedResource\"A\n\017RelatedResource\022\022\n\nasse" + + "t_type\030\001 \001(\t\022\032\n\022full_resource_name\030\002 \001(\t" + + "\"\217\004\n\025IamPolicySearchResult\022\020\n\010resource\030\001" + + " \001(\t\022\022\n\nasset_type\030\005 \001(\t\022\017\n\007project\030\002 \001(" + + "\t\022\017\n\007folders\030\006 \003(\t\022\024\n\014organization\030\007 \001(\t" + + "\022%\n\006policy\030\003 \001(\0132\025.google.iam.v1.Policy\022" + + "M\n\013explanation\030\004 \001(\01328.google.cloud.asse" + + "t.v1.IamPolicySearchResult.Explanation\032\241" + + "\002\n\013Explanation\022m\n\023matched_permissions\030\001 " + + "\003(\0132P.google.cloud.asset.v1.IamPolicySea" + + "rchResult.Explanation.MatchedPermissions" + + "Entry\032\"\n\013Permissions\022\023\n\013permissions\030\001 \003(" + + "\t\032\177\n\027MatchedPermissionsEntry\022\013\n\003key\030\001 \001(" + + "\t\022S\n\005value\030\002 \001(\0132D.google.cloud.asset.v1" + + ".IamPolicySearchResult.Explanation.Permi" + + "ssions:\0028\001\"G\n\026IamPolicyAnalysisState\022\036\n\004" + + "code\030\001 \001(\0162\020.google.rpc.Code\022\r\n\005cause\030\002 " + + "\001(\t\"\306\001\n\023ConditionEvaluation\022T\n\020evaluatio" + + "n_value\030\001 \001(\0162:.google.cloud.asset.v1.Co" + + "nditionEvaluation.EvaluationValue\"Y\n\017Eva" + + "luationValue\022 \n\034EVALUATION_VALUE_UNSPECI" + + "FIED\020\000\022\010\n\004TRUE\020\001\022\t\n\005FALSE\020\002\022\017\n\013CONDITION" + + "AL\020\003\"\253\t\n\027IamPolicyAnalysisResult\022#\n\033atta" + + "ched_resource_full_name\030\001 \001(\t\022+\n\013iam_bin" + + "ding\030\002 \001(\0132\026.google.iam.v1.Binding\022^\n\024ac" + + "cess_control_lists\030\003 \003(\0132@.google.cloud." + + "asset.v1.IamPolicyAnalysisResult.AccessC" + + "ontrolList\022R\n\ridentity_list\030\004 \001(\0132;.goog" + + "le.cloud.asset.v1.IamPolicyAnalysisResul" + + "t.IdentityList\022\026\n\016fully_explored\030\005 \001(\010\032m" + + "\n\010Resource\022\032\n\022full_resource_name\030\001 \001(\t\022E" + + "\n\016analysis_state\030\002 \001(\0132-.google.cloud.as" + + "set.v1.IamPolicyAnalysisState\032\205\001\n\006Access" + + "\022\016\n\004role\030\001 \001(\tH\000\022\024\n\npermission\030\002 \001(\tH\000\022E" + + "\n\016analysis_state\030\003 \001(\0132-.google.cloud.as" + + "set.v1.IamPolicyAnalysisStateB\016\n\014oneof_a" + + "ccess\032_\n\010Identity\022\014\n\004name\030\001 \001(\t\022E\n\016analy" + + "sis_state\030\002 \001(\0132-.google.cloud.asset.v1." + + "IamPolicyAnalysisState\0320\n\004Edge\022\023\n\013source" + + "_node\030\001 \001(\t\022\023\n\013target_node\030\002 \001(\t\032\277\002\n\021Acc" + + "essControlList\022J\n\tresources\030\001 \003(\01327.goog" + + "le.cloud.asset.v1.IamPolicyAnalysisResul" + + "t.Resource\022G\n\010accesses\030\002 \003(\01325.google.cl" + + "oud.asset.v1.IamPolicyAnalysisResult.Acc" + + "ess\022K\n\016resource_edges\030\003 \003(\01323.google.clo" + + "ud.asset.v1.IamPolicyAnalysisResult.Edge" + + "\022H\n\024condition_evaluation\030\004 \001(\0132*.google." + + "cloud.asset.v1.ConditionEvaluation\032\245\001\n\014I" + + "dentityList\022K\n\nidentities\030\001 \003(\01327.google" + + ".cloud.asset.v1.IamPolicyAnalysisResult." + + "Identity\022H\n\013group_edges\030\002 \003(\01323.google.c" + + "loud.asset.v1.IamPolicyAnalysisResult.Ed" + + "geB\230\001\n\031com.google.cloud.asset.v1B\nAssetP" + + "rotoP\001Z:google.golang.org/genproto/googl" + + "eapis/cloud/asset/v1;asset\370\001\001\252\002\025Google.C" + + "loud.Asset.V1\312\002\025Google\\Cloud\\Asset\\V1b\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(), + com.google.cloud.osconfig.v1.Inventories.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.CodeProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1_TemporalAsset_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_TemporalAsset_descriptor, + new java.lang.String[] { "Window", "Deleted", "Asset", "PriorAssetState", "PriorAsset", }); + internal_static_google_cloud_asset_v1_TimeWindow_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_TimeWindow_descriptor, + new java.lang.String[] { "StartTime", "EndTime", }); + internal_static_google_cloud_asset_v1_Asset_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_Asset_descriptor, + new java.lang.String[] { "UpdateTime", "Name", "AssetType", "Resource", "IamPolicy", "OrgPolicy", "AccessPolicy", "AccessLevel", "ServicePerimeter", "OsInventory", "RelatedAssets", "RelatedAsset", "Ancestors", "AccessContextPolicy", }); + internal_static_google_cloud_asset_v1_Resource_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_Resource_descriptor, + new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", "Location", }); + internal_static_google_cloud_asset_v1_RelatedAssets_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedAssets_descriptor, + new java.lang.String[] { "RelationshipAttributes", "Assets", }); + internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor, + new java.lang.String[] { "Type", "SourceResourceType", "TargetResourceType", "Action", }); + internal_static_google_cloud_asset_v1_RelatedAsset_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedAsset_descriptor, + new java.lang.String[] { "Asset", "AssetType", "Ancestors", "RelationshipType", }); + internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor, + new java.lang.String[] { "Name", "AssetType", "Project", "Folders", "Organization", "DisplayName", "Description", "Location", "Labels", "NetworkTags", "KmsKey", "CreateTime", "UpdateTime", "State", "AdditionalAttributes", "ParentFullResourceName", "VersionedResources", "AttachedResources", "Relationships", "TagKeys", "TagValues", "TagValueIds", "ParentAssetType", }); + internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor = + internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor = + internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1_VersionedResource_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_VersionedResource_descriptor, + new java.lang.String[] { "Version", "Resource", }); + internal_static_google_cloud_asset_v1_AttachedResource_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AttachedResource_descriptor, + new java.lang.String[] { "AssetType", "VersionedResources", }); + internal_static_google_cloud_asset_v1_RelatedResources_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedResources_descriptor, + new java.lang.String[] { "RelatedResources", }); + internal_static_google_cloud_asset_v1_RelatedResource_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedResource_descriptor, + new java.lang.String[] { "AssetType", "FullResourceName", }); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor, + new java.lang.String[] { "Resource", "AssetType", "Project", "Folders", "Organization", "Policy", "Explanation", }); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor = + internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor, + new java.lang.String[] { "MatchedPermissions", }); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor = + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor, + new java.lang.String[] { "Permissions", }); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor = + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor, + new java.lang.String[] { "Code", "Cause", }); + internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor, + new java.lang.String[] { "EvaluationValue", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor, + new java.lang.String[] { "AttachedResourceFullName", "IamBinding", "AccessControlLists", "IdentityList", "FullyExplored", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor, + new java.lang.String[] { "FullResourceName", "AnalysisState", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor, + new java.lang.String[] { "Role", "Permission", "AnalysisState", "OneofAccess", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor, + new java.lang.String[] { "Name", "AnalysisState", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor, + new java.lang.String[] { "SourceNode", "TargetNode", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor, + new java.lang.String[] { "Resources", "Accesses", "ResourceEdges", "ConditionEvaluation", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(5); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor, + new java.lang.String[] { "Identities", "GroupEdges", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(); + com.google.cloud.osconfig.v1.Inventories.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.CodeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java new file mode 100644 index 000000000000..57cad7816d2c --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java @@ -0,0 +1,1149 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public final class AssetServiceProto { + private AssetServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_OutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_OutputResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_Feed_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_SavedQuery_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_MoveImpact_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_QueryResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_TableSchema_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/asset/v1/asset_service.pr" + + "oto\022\025google.cloud.asset.v1\032\034google/api/a" + + "nnotations.proto\032\027google/api/client.prot" + + "o\032\037google/api/field_behavior.proto\032\031goog" + + "le/api/resource.proto\032\"google/cloud/asse" + + "t/v1/assets.proto\032\032google/iam/v1/policy." + + "proto\032#google/longrunning/operations.pro" + + "to\032\036google/protobuf/duration.proto\032\033goog" + + "le/protobuf/empty.proto\032 google/protobuf" + + "/field_mask.proto\032\034google/protobuf/struc" + + "t.proto\032\037google/protobuf/timestamp.proto" + + "\032\027google/rpc/status.proto\032\026google/type/e" + + "xpr.proto\"[\n#AnalyzeIamPolicyLongrunning" + + "Metadata\0224\n\013create_time\030\001 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\"\251\002\n\023ExportAssetsR" + + "equest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudass" + + "et.googleapis.com/Asset\022-\n\tread_time\030\002 \001" + + "(\0132\032.google.protobuf.Timestamp\022\023\n\013asset_" + + "types\030\003 \003(\t\0228\n\014content_type\030\004 \001(\0162\".goog" + + "le.cloud.asset.v1.ContentType\022?\n\routput_" + + "config\030\005 \001(\0132#.google.cloud.asset.v1.Out" + + "putConfigB\003\340A\002\022\032\n\022relationship_types\030\006 \003" + + "(\t\"\275\001\n\024ExportAssetsResponse\022-\n\tread_time" + + "\030\001 \001(\0132\032.google.protobuf.Timestamp\022:\n\rou" + + "tput_config\030\002 \001(\0132#.google.cloud.asset.v" + + "1.OutputConfig\022:\n\routput_result\030\003 \001(\0132#." + + "google.cloud.asset.v1.OutputResult\"\215\002\n\021L" + + "istAssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!" + + "\022\037cloudasset.googleapis.com/Asset\022-\n\trea" + + "d_time\030\002 \001(\0132\032.google.protobuf.Timestamp" + + "\022\023\n\013asset_types\030\003 \003(\t\0228\n\014content_type\030\004 " + + "\001(\0162\".google.cloud.asset.v1.ContentType\022" + + "\021\n\tpage_size\030\005 \001(\005\022\022\n\npage_token\030\006 \001(\t\022\032" + + "\n\022relationship_types\030\007 \003(\t\"\212\001\n\022ListAsset" + + "sResponse\022-\n\tread_time\030\001 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022,\n\006assets\030\002 \003(\0132\034.googl" + + "e.cloud.asset.v1.Asset\022\027\n\017next_page_toke" + + "n\030\003 \001(\t\"\216\002\n\034BatchGetAssetsHistoryRequest" + + "\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.goo" + + "gleapis.com/Asset\022\023\n\013asset_names\030\002 \003(\t\022=" + + "\n\014content_type\030\003 \001(\0162\".google.cloud.asse" + + "t.v1.ContentTypeB\003\340A\001\022@\n\020read_time_windo" + + "w\030\004 \001(\0132!.google.cloud.asset.v1.TimeWind" + + "owB\003\340A\001\022\037\n\022relationship_types\030\005 \003(\tB\003\340A\001" + + "\"U\n\035BatchGetAssetsHistoryResponse\0224\n\006ass" + + "ets\030\001 \003(\0132$.google.cloud.asset.v1.Tempor" + + "alAsset\"n\n\021CreateFeedRequest\022\023\n\006parent\030\001" + + " \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\tB\003\340A\002\022.\n\004feed\030" + + "\003 \001(\0132\033.google.cloud.asset.v1.FeedB\003\340A\002\"" + + "F\n\016GetFeedRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036cloudasset.googleapis.com/Feed\"\'\n\020ListF" + + "eedsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\"?\n\021List" + + "FeedsResponse\022*\n\005feeds\030\001 \003(\0132\033.google.cl" + + "oud.asset.v1.Feed\"y\n\021UpdateFeedRequest\022." + + "\n\004feed\030\001 \001(\0132\033.google.cloud.asset.v1.Fee" + + "dB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.pro" + + "tobuf.FieldMaskB\003\340A\002\"I\n\021DeleteFeedReques" + + "t\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset.goog" + + "leapis.com/Feed\"\253\001\n\014OutputConfig\022@\n\017gcs_" + + "destination\030\001 \001(\0132%.google.cloud.asset.v" + + "1.GcsDestinationH\000\022J\n\024bigquery_destinati" + + "on\030\002 \001(\0132*.google.cloud.asset.v1.BigQuer" + + "yDestinationH\000B\r\n\013destination\"V\n\014OutputR" + + "esult\022<\n\ngcs_result\030\001 \001(\0132&.google.cloud" + + ".asset.v1.GcsOutputResultH\000B\010\n\006result\"\037\n" + + "\017GcsOutputResult\022\014\n\004uris\030\001 \003(\t\"C\n\016GcsDes" + + "tination\022\r\n\003uri\030\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 " + + "\001(\tH\000B\014\n\nobject_uri\"\264\001\n\023BigQueryDestinat" + + "ion\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\t" + + "B\003\340A\002\022\r\n\005force\030\003 \001(\010\022<\n\016partition_spec\030\004" + + " \001(\0132$.google.cloud.asset.v1.PartitionSp" + + "ec\022&\n\036separate_tables_per_asset_type\030\005 \001" + + "(\010\"\251\001\n\rPartitionSpec\022H\n\rpartition_key\030\001 " + + "\001(\01621.google.cloud.asset.v1.PartitionSpe" + + "c.PartitionKey\"N\n\014PartitionKey\022\035\n\031PARTIT" + + "ION_KEY_UNSPECIFIED\020\000\022\r\n\tREAD_TIME\020\001\022\020\n\014" + + "REQUEST_TIME\020\002\"\"\n\021PubsubDestination\022\r\n\005t" + + "opic\030\001 \001(\t\"i\n\020FeedOutputConfig\022F\n\022pubsub" + + "_destination\030\001 \001(\0132(.google.cloud.asset." + + "v1.PubsubDestinationH\000B\r\n\013destination\"\235\003" + + "\n\004Feed\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013asset_names" + + "\030\002 \003(\t\022\023\n\013asset_types\030\003 \003(\t\0228\n\014content_t" + + "ype\030\004 \001(\0162\".google.cloud.asset.v1.Conten" + + "tType\022H\n\022feed_output_config\030\005 \001(\0132\'.goog" + + "le.cloud.asset.v1.FeedOutputConfigB\003\340A\002\022" + + "$\n\tcondition\030\006 \001(\0132\021.google.type.Expr\022\032\n" + + "\022relationship_types\030\007 \003(\t:\221\001\352A\215\001\n\036clouda" + + "sset.googleapis.com/Feed\022\037projects/{proj" + + "ect}/feeds/{feed}\022\035folders/{folder}/feed" + + "s/{feed}\022)organizations/{organization}/f" + + "eeds/{feed} \001\"\331\001\n\031SearchAllResourcesRequ" + + "est\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003" + + "\340A\001\022\030\n\013asset_types\030\003 \003(\tB\003\340A\001\022\026\n\tpage_si" + + "ze\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\022\025" + + "\n\010order_by\030\006 \001(\tB\003\340A\001\0222\n\tread_mask\030\010 \001(\013" + + "2\032.google.protobuf.FieldMaskB\003\340A\001\"s\n\032Sea" + + "rchAllResourcesResponse\022<\n\007results\030\001 \003(\013" + + "2+.google.cloud.asset.v1.ResourceSearchR" + + "esult\022\027\n\017next_page_token\030\002 \001(\t\"\247\001\n\033Searc" + + "hAllIamPoliciesRequest\022\022\n\005scope\030\001 \001(\tB\003\340" + + "A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(" + + "\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\022\030\n\013asset" + + "_types\030\005 \003(\tB\003\340A\001\022\025\n\010order_by\030\007 \001(\tB\003\340A\001" + + "\"v\n\034SearchAllIamPoliciesResponse\022=\n\007resu" + + "lts\030\001 \003(\0132,.google.cloud.asset.v1.IamPol" + + "icySearchResult\022\027\n\017next_page_token\030\002 \001(\t" + + "\"\306\007\n\026IamPolicyAnalysisQuery\022\022\n\005scope\030\001 \001" + + "(\tB\003\340A\002\022^\n\021resource_selector\030\002 \001(\0132>.goo" + + "gle.cloud.asset.v1.IamPolicyAnalysisQuer" + + "y.ResourceSelectorB\003\340A\001\022^\n\021identity_sele" + + "ctor\030\003 \001(\0132>.google.cloud.asset.v1.IamPo" + + "licyAnalysisQuery.IdentitySelectorB\003\340A\001\022" + + "Z\n\017access_selector\030\004 \001(\0132<.google.cloud." + + "asset.v1.IamPolicyAnalysisQuery.AccessSe" + + "lectorB\003\340A\001\022K\n\007options\030\005 \001(\01325.google.cl" + + "oud.asset.v1.IamPolicyAnalysisQuery.Opti" + + "onsB\003\340A\001\022^\n\021condition_context\030\006 \001(\0132>.go" + + "ogle.cloud.asset.v1.IamPolicyAnalysisQue" + + "ry.ConditionContextB\003\340A\001\0323\n\020ResourceSele" + + "ctor\022\037\n\022full_resource_name\030\001 \001(\tB\003\340A\002\032)\n" + + "\020IdentitySelector\022\025\n\010identity\030\001 \001(\tB\003\340A\002" + + "\032>\n\016AccessSelector\022\022\n\005roles\030\001 \003(\tB\003\340A\001\022\030" + + "\n\013permissions\030\002 \003(\tB\003\340A\001\032\330\001\n\007Options\022\032\n\r" + + "expand_groups\030\001 \001(\010B\003\340A\001\022\031\n\014expand_roles" + + "\030\002 \001(\010B\003\340A\001\022\035\n\020expand_resources\030\003 \001(\010B\003\340" + + "A\001\022\"\n\025output_resource_edges\030\004 \001(\010B\003\340A\001\022\037" + + "\n\022output_group_edges\030\005 \001(\010B\003\340A\001\0222\n%analy" + + "ze_service_account_impersonation\030\006 \001(\010B\003" + + "\340A\001\032T\n\020ConditionContext\0221\n\013access_time\030\001" + + " \001(\0132\032.google.protobuf.TimestampH\000B\r\n\013Ti" + + "meContext\"\303\001\n\027AnalyzeIamPolicyRequest\022J\n" + + "\016analysis_query\030\001 \001(\0132-.google.cloud.ass" + + "et.v1.IamPolicyAnalysisQueryB\003\340A\002\022!\n\024sav" + + "ed_analysis_query\030\003 \001(\tB\003\340A\001\0229\n\021executio" + + "n_timeout\030\002 \001(\0132\031.google.protobuf.Durati" + + "onB\003\340A\001\"\212\004\n\030AnalyzeIamPolicyResponse\022X\n\r" + + "main_analysis\030\001 \001(\0132A.google.cloud.asset" + + ".v1.AnalyzeIamPolicyResponse.IamPolicyAn" + + "alysis\022q\n&service_account_impersonation_" + + "analysis\030\002 \003(\0132A.google.cloud.asset.v1.A" + + "nalyzeIamPolicyResponse.IamPolicyAnalysi" + + "s\022\026\n\016fully_explored\030\003 \001(\010\032\210\002\n\021IamPolicyA" + + "nalysis\022E\n\016analysis_query\030\001 \001(\0132-.google" + + ".cloud.asset.v1.IamPolicyAnalysisQuery\022H" + + "\n\020analysis_results\030\002 \003(\0132..google.cloud." + + "asset.v1.IamPolicyAnalysisResult\022\026\n\016full" + + "y_explored\030\003 \001(\010\022J\n\023non_critical_errors\030" + + "\005 \003(\0132-.google.cloud.asset.v1.IamPolicyA" + + "nalysisState\"\264\004\n\035IamPolicyAnalysisOutput" + + "Config\022^\n\017gcs_destination\030\001 \001(\0132C.google" + + ".cloud.asset.v1.IamPolicyAnalysisOutputC" + + "onfig.GcsDestinationH\000\022h\n\024bigquery_desti" + + "nation\030\002 \001(\0132H.google.cloud.asset.v1.Iam" + + "PolicyAnalysisOutputConfig.BigQueryDesti" + + "nationH\000\032\"\n\016GcsDestination\022\020\n\003uri\030\001 \001(\tB" + + "\003\340A\002\032\225\002\n\023BigQueryDestination\022\024\n\007dataset\030" + + "\001 \001(\tB\003\340A\002\022\031\n\014table_prefix\030\002 \001(\tB\003\340A\002\022l\n" + + "\rpartition_key\030\003 \001(\0162U.google.cloud.asse" + + "t.v1.IamPolicyAnalysisOutputConfig.BigQu" + + "eryDestination.PartitionKey\022\036\n\021write_dis" + + "position\030\004 \001(\tB\003\340A\001\"?\n\014PartitionKey\022\035\n\031P" + + "ARTITION_KEY_UNSPECIFIED\020\000\022\020\n\014REQUEST_TI" + + "ME\020\001B\r\n\013destination\"\345\001\n\"AnalyzeIamPolicy" + + "LongrunningRequest\022J\n\016analysis_query\030\001 \001" + + "(\0132-.google.cloud.asset.v1.IamPolicyAnal" + + "ysisQueryB\003\340A\002\022!\n\024saved_analysis_query\030\003" + + " \001(\tB\003\340A\001\022P\n\routput_config\030\002 \001(\01324.googl" + + "e.cloud.asset.v1.IamPolicyAnalysisOutput" + + "ConfigB\003\340A\002\"%\n#AnalyzeIamPolicyLongrunni" + + "ngResponse\"\267\005\n\nSavedQuery\022\014\n\004name\030\001 \001(\t\022" + + "\023\n\013description\030\002 \001(\t\0224\n\013create_time\030\003 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\022\024\n\007cr" + + "eator\030\004 \001(\tB\003\340A\003\0229\n\020last_update_time\030\005 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\022\031\n\014l" + + "ast_updater\030\006 \001(\tB\003\340A\003\022=\n\006labels\030\007 \003(\0132-" + + ".google.cloud.asset.v1.SavedQuery.Labels" + + "Entry\022?\n\007content\030\010 \001(\0132..google.cloud.as" + + "set.v1.SavedQuery.QueryContent\032s\n\014QueryC" + + "ontent\022R\n\031iam_policy_analysis_query\030\001 \001(" + + "\0132-.google.cloud.asset.v1.IamPolicyAnaly" + + "sisQueryH\000B\017\n\rquery_content\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\277\001\352A\273" + + "\001\n$cloudasset.googleapis.com/SavedQuery\022" + + "-projects/{project}/savedQueries/{saved_" + + "query}\022+folders/{folder}/savedQueries/{s" + + "aved_query}\0227organizations/{organization" + + "}/savedQueries/{saved_query}\"\261\001\n\027CreateS" + + "avedQueryRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&" + + "\022$cloudasset.googleapis.com/SavedQuery\022;" + + "\n\013saved_query\030\002 \001(\0132!.google.cloud.asset" + + ".v1.SavedQueryB\003\340A\002\022\033\n\016saved_query_id\030\003 " + + "\001(\tB\003\340A\002\"R\n\024GetSavedQueryRequest\022:\n\004name" + + "\030\001 \001(\tB,\340A\002\372A&\n$cloudasset.googleapis.co" + + "m/SavedQuery\"\235\001\n\027ListSavedQueriesRequest" + + "\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$cloudasset.goo" + + "gleapis.com/SavedQuery\022\023\n\006filter\030\004 \001(\tB\003" + + "\340A\001\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + + "n\030\003 \001(\tB\003\340A\001\"m\n\030ListSavedQueriesResponse" + + "\0228\n\rsaved_queries\030\001 \003(\0132!.google.cloud.a" + + "sset.v1.SavedQuery\022\027\n\017next_page_token\030\002 " + + "\001(\t\"\214\001\n\027UpdateSavedQueryRequest\022;\n\013saved" + + "_query\030\001 \001(\0132!.google.cloud.asset.v1.Sav" + + "edQueryB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goog" + + "le.protobuf.FieldMaskB\003\340A\002\"U\n\027DeleteSave" + + "dQueryRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$clo" + + "udasset.googleapis.com/SavedQuery\"\326\001\n\022An" + + "alyzeMoveRequest\022\025\n\010resource\030\001 \001(\tB\003\340A\002\022" + + "\037\n\022destination_parent\030\002 \001(\tB\003\340A\002\022D\n\004view" + + "\030\003 \001(\01626.google.cloud.asset.v1.AnalyzeMo" + + "veRequest.AnalysisView\"B\n\014AnalysisView\022\035" + + "\n\031ANALYSIS_VIEW_UNSPECIFIED\020\000\022\010\n\004FULL\020\001\022" + + "\t\n\005BASIC\020\002\"Q\n\023AnalyzeMoveResponse\022:\n\rmov" + + "e_analysis\030\001 \003(\0132#.google.cloud.asset.v1" + + ".MoveAnalysis\"\222\001\n\014MoveAnalysis\022\024\n\014displa" + + "y_name\030\001 \001(\t\022=\n\010analysis\030\002 \001(\0132).google." + + "cloud.asset.v1.MoveAnalysisResultH\000\022#\n\005e" + + "rror\030\003 \001(\0132\022.google.rpc.StatusH\000B\010\n\006resu" + + "lt\"~\n\022MoveAnalysisResult\0223\n\010blockers\030\001 \003" + + "(\0132!.google.cloud.asset.v1.MoveImpact\0223\n" + + "\010warnings\030\002 \003(\0132!.google.cloud.asset.v1." + + "MoveImpact\"\034\n\nMoveImpact\022\016\n\006detail\030\001 \001(\t" + + "\"\327\001\n\027QueryAssetsOutputConfig\022`\n\024bigquery" + + "_destination\030\001 \001(\0132B.google.cloud.asset." + + "v1.QueryAssetsOutputConfig.BigQueryDesti" + + "nation\032Z\n\023BigQueryDestination\022\024\n\007dataset" + + "\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\tB\003\340A\002\022\031\n\021write" + + "_disposition\030\003 \001(\t\"\276\003\n\022QueryAssetsReques" + + "t\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.go" + + "ogleapis.com/Asset\022\030\n\tstatement\030\002 \001(\tB\003\340" + + "A\001H\000\022\034\n\rjob_reference\030\003 \001(\tB\003\340A\001H\000\022\026\n\tpa" + + "ge_size\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003" + + "\340A\001\022/\n\007timeout\030\006 \001(\0132\031.google.protobuf.D" + + "urationB\003\340A\001\022B\n\020read_time_window\030\007 \001(\0132!" + + ".google.cloud.asset.v1.TimeWindowB\003\340A\001H\001" + + "\0224\n\tread_time\030\010 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\001H\001\022J\n\routput_config\030\t \001(\0132.." + + "google.cloud.asset.v1.QueryAssetsOutputC" + + "onfigB\003\340A\001B\007\n\005queryB\006\n\004time\"\360\001\n\023QueryAss" + + "etsResponse\022\025\n\rjob_reference\030\001 \001(\t\022\014\n\004do" + + "ne\030\002 \001(\010\022#\n\005error\030\003 \001(\0132\022.google.rpc.Sta" + + "tusH\000\022:\n\014query_result\030\004 \001(\0132\".google.clo" + + "ud.asset.v1.QueryResultH\000\022G\n\routput_conf" + + "ig\030\005 \001(\0132..google.cloud.asset.v1.QueryAs" + + "setsOutputConfigH\000B\n\n\010response\"\225\001\n\013Query" + + "Result\022%\n\004rows\030\001 \003(\0132\027.google.protobuf.S" + + "truct\0222\n\006schema\030\002 \001(\0132\".google.cloud.ass" + + "et.v1.TableSchema\022\027\n\017next_page_token\030\003 \001" + + "(\t\022\022\n\ntotal_rows\030\004 \001(\003\"F\n\013TableSchema\0227\n" + + "\006fields\030\001 \003(\0132\'.google.cloud.asset.v1.Ta" + + "bleFieldSchema\"v\n\020TableFieldSchema\022\r\n\005fi" + + "eld\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\014\n\004mode\030\003 \001(\t\0227\n" + + "\006fields\030\004 \003(\0132\'.google.cloud.asset.v1.Ta" + + "bleFieldSchema\"Y\n#BatchGetEffectiveIamPo" + + "liciesRequest\022\030\n\005scope\030\001 \001(\tB\t\340A\002\372A\003\022\001*\022" + + "\030\n\005names\030\003 \003(\tB\t\340A\002\372A\003\n\001*\"\376\002\n$BatchGetEf" + + "fectiveIamPoliciesResponse\022f\n\016policy_res" + + "ults\030\002 \003(\0132N.google.cloud.asset.v1.Batch" + + "GetEffectiveIamPoliciesResponse.Effectiv" + + "eIamPolicy\032\355\001\n\022EffectiveIamPolicy\022\032\n\022ful" + + "l_resource_name\030\001 \001(\t\022k\n\010policies\030\002 \003(\0132" + + "Y.google.cloud.asset.v1.BatchGetEffectiv" + + "eIamPoliciesResponse.EffectiveIamPolicy." + + "PolicyInfo\032N\n\nPolicyInfo\022\031\n\021attached_res" + + "ource\030\001 \001(\t\022%\n\006policy\030\002 \001(\0132\025.google.iam" + + ".v1.Policy*\220\001\n\013ContentType\022\034\n\030CONTENT_TY" + + "PE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_PO" + + "LICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020" + + "\005\022\020\n\014OS_INVENTORY\020\006\022\020\n\014RELATIONSHIP\020\0072\233\033" + + "\n\014AssetService\022\336\001\n\014ExportAssets\022*.google" + + ".cloud.asset.v1.ExportAssetsRequest\032\035.go" + + "ogle.longrunning.Operation\"\202\001\202\323\344\223\002\"\"\035/v1" + + "/{parent=*/*}:exportAssets:\001*\312AW\n*google" + + ".cloud.asset.v1.ExportAssetsResponse\022)go" + + "ogle.cloud.asset.v1.ExportAssetsRequest\022" + + "\213\001\n\nListAssets\022(.google.cloud.asset.v1.L" + + "istAssetsRequest\032).google.cloud.asset.v1" + + ".ListAssetsResponse\"(\202\323\344\223\002\031\022\027/v1/{parent" + + "=*/*}/assets\332A\006parent\022\262\001\n\025BatchGetAssets" + + "History\0223.google.cloud.asset.v1.BatchGet" + + "AssetsHistoryRequest\0324.google.cloud.asse" + + "t.v1.BatchGetAssetsHistoryResponse\".\202\323\344\223" + + "\002(\022&/v1/{parent=*/*}:batchGetAssetsHisto" + + "ry\022\177\n\nCreateFeed\022(.google.cloud.asset.v1" + + ".CreateFeedRequest\032\033.google.cloud.asset." + + "v1.Feed\"*\202\323\344\223\002\033\"\026/v1/{parent=*/*}/feeds:" + + "\001*\332A\006parent\022t\n\007GetFeed\022%.google.cloud.as" + + "set.v1.GetFeedRequest\032\033.google.cloud.ass" + + "et.v1.Feed\"%\202\323\344\223\002\030\022\026/v1/{name=*/*/feeds/" + + "*}\332A\004name\022\207\001\n\tListFeeds\022\'.google.cloud.a" + + "sset.v1.ListFeedsRequest\032(.google.cloud." + + "asset.v1.ListFeedsResponse\"\'\202\323\344\223\002\030\022\026/v1/" + + "{parent=*/*}/feeds\332A\006parent\022\202\001\n\nUpdateFe" + + "ed\022(.google.cloud.asset.v1.UpdateFeedReq" + + "uest\032\033.google.cloud.asset.v1.Feed\"-\202\323\344\223\002" + + " 2\033/v1/{feed.name=*/*/feeds/*}:\001*\332A\004feed" + + "\022u\n\nDeleteFeed\022(.google.cloud.asset.v1.D" + + "eleteFeedRequest\032\026.google.protobuf.Empty" + + "\"%\202\323\344\223\002\030*\026/v1/{name=*/*/feeds/*}\332A\004name\022" + + "\277\001\n\022SearchAllResources\0220.google.cloud.as" + + "set.v1.SearchAllResourcesRequest\0321.googl" + + "e.cloud.asset.v1.SearchAllResourcesRespo" + + "nse\"D\202\323\344\223\002$\022\"/v1/{scope=*/*}:searchAllRe" + + "sources\332A\027scope,query,asset_types\022\273\001\n\024Se" + + "archAllIamPolicies\0222.google.cloud.asset." + + "v1.SearchAllIamPoliciesRequest\0323.google." + + "cloud.asset.v1.SearchAllIamPoliciesRespo" + + "nse\":\202\323\344\223\002&\022$/v1/{scope=*/*}:searchAllIa" + + "mPolicies\332A\013scope,query\022\254\001\n\020AnalyzeIamPo" + + "licy\022..google.cloud.asset.v1.AnalyzeIamP" + + "olicyRequest\032/.google.cloud.asset.v1.Ana" + + "lyzeIamPolicyResponse\"7\202\323\344\223\0021\022//v1/{anal" + + "ysis_query.scope=*/*}:analyzeIamPolicy\022\270" + + "\002\n\033AnalyzeIamPolicyLongrunning\0229.google." + + "cloud.asset.v1.AnalyzeIamPolicyLongrunni" + + "ngRequest\032\035.google.longrunning.Operation" + + "\"\276\001\202\323\344\223\002?\":/v1/{analysis_query.scope=*/*" + + "}:analyzeIamPolicyLongrunning:\001*\312Av\n9goo" + + "gle.cloud.asset.v1.AnalyzeIamPolicyLongr" + + "unningResponse\0229google.cloud.asset.v1.An" + + "alyzeIamPolicyLongrunningMetadata\022\214\001\n\013An" + + "alyzeMove\022).google.cloud.asset.v1.Analyz" + + "eMoveRequest\032*.google.cloud.asset.v1.Ana" + + "lyzeMoveResponse\"&\202\323\344\223\002 \022\036/v1/{resource=" + + "*/*}:analyzeMove\022\215\001\n\013QueryAssets\022).googl" + + "e.cloud.asset.v1.QueryAssetsRequest\032*.go" + + "ogle.cloud.asset.v1.QueryAssetsResponse\"" + + "\'\202\323\344\223\002!\"\034/v1/{parent=*/*}:queryAssets:\001*" + + "\022\275\001\n\020CreateSavedQuery\022..google.cloud.ass" + + "et.v1.CreateSavedQueryRequest\032!.google.c" + + "loud.asset.v1.SavedQuery\"V\202\323\344\223\002,\"\035/v1/{p" + + "arent=*/*}/savedQueries:\013saved_query\332A!p" + + "arent,saved_query,saved_query_id\022\215\001\n\rGet" + + "SavedQuery\022+.google.cloud.asset.v1.GetSa" + + "vedQueryRequest\032!.google.cloud.asset.v1." + + "SavedQuery\",\202\323\344\223\002\037\022\035/v1/{name=*/*/savedQ" + + "ueries/*}\332A\004name\022\243\001\n\020ListSavedQueries\022.." + + "google.cloud.asset.v1.ListSavedQueriesRe" + + "quest\032/.google.cloud.asset.v1.ListSavedQ" + + "ueriesResponse\".\202\323\344\223\002\037\022\035/v1/{parent=*/*}" + + "/savedQueries\332A\006parent\022\277\001\n\020UpdateSavedQu" + + "ery\022..google.cloud.asset.v1.UpdateSavedQ" + + "ueryRequest\032!.google.cloud.asset.v1.Save" + + "dQuery\"X\202\323\344\223\00282)/v1/{saved_query.name=*/" + + "*/savedQueries/*}:\013saved_query\332A\027saved_q" + + "uery,update_mask\022\210\001\n\020DeleteSavedQuery\022.." + + "google.cloud.asset.v1.DeleteSavedQueryRe" + + "quest\032\026.google.protobuf.Empty\",\202\323\344\223\002\037*\035/" + + "v1/{name=*/*/savedQueries/*}\332A\004name\022\316\001\n\034" + + "BatchGetEffectiveIamPolicies\022:.google.cl" + + "oud.asset.v1.BatchGetEffectiveIamPolicie" + + "sRequest\032;.google.cloud.asset.v1.BatchGe" + + "tEffectiveIamPoliciesResponse\"5\202\323\344\223\002/\022-/" + + "v1/{scope=*/*}/effectiveIamPolicies:batc" + + "hGet\032M\312A\031cloudasset.googleapis.com\322A.htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "ormB\234\001\n\031com.google.cloud.asset.v1B\021Asset" + + "ServiceProtoP\001Z:google.golang.org/genpro" + + "to/googleapis/cloud/asset/v1;asset\252\002\025Goo" + + "gle.Cloud.Asset.V1\312\002\025Google\\Cloud\\Asset\\" + + "V1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.asset.v1.AssetProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.ExprProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor, + new java.lang.String[] { "CreateTime", }); + internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor, + new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "OutputConfig", "RelationshipTypes", }); + internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor, + new java.lang.String[] { "ReadTime", "OutputConfig", "OutputResult", }); + internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor, + new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "PageSize", "PageToken", "RelationshipTypes", }); + internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor, + new java.lang.String[] { "ReadTime", "Assets", "NextPageToken", }); + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor, + new java.lang.String[] { "Parent", "AssetNames", "ContentType", "ReadTimeWindow", "RelationshipTypes", }); + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor, + new java.lang.String[] { "Assets", }); + internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor, + new java.lang.String[] { "Parent", "FeedId", "Feed", }); + internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor, + new java.lang.String[] { "Parent", }); + internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor, + new java.lang.String[] { "Feeds", }); + internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor, + new java.lang.String[] { "Feed", "UpdateMask", }); + internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_asset_v1_OutputConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_OutputConfig_descriptor, + new java.lang.String[] { "GcsDestination", "BigqueryDestination", "Destination", }); + internal_static_google_cloud_asset_v1_OutputResult_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_OutputResult_descriptor, + new java.lang.String[] { "GcsResult", "Result", }); + internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor, + new java.lang.String[] { "Uris", }); + internal_static_google_cloud_asset_v1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_GcsDestination_descriptor, + new java.lang.String[] { "Uri", "UriPrefix", "ObjectUri", }); + internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor, + new java.lang.String[] { "Dataset", "Table", "Force", "PartitionSpec", "SeparateTablesPerAssetType", }); + internal_static_google_cloud_asset_v1_PartitionSpec_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_PartitionSpec_descriptor, + new java.lang.String[] { "PartitionKey", }); + internal_static_google_cloud_asset_v1_PubsubDestination_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_PubsubDestination_descriptor, + new java.lang.String[] { "Topic", }); + internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor, + new java.lang.String[] { "PubsubDestination", "Destination", }); + internal_static_google_cloud_asset_v1_Feed_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_Feed_descriptor, + new java.lang.String[] { "Name", "AssetNames", "AssetTypes", "ContentType", "FeedOutputConfig", "Condition", "RelationshipTypes", }); + internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor, + new java.lang.String[] { "Scope", "Query", "AssetTypes", "PageSize", "PageToken", "OrderBy", "ReadMask", }); + internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor, + new java.lang.String[] { "Results", "NextPageToken", }); + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor, + new java.lang.String[] { "Scope", "Query", "PageSize", "PageToken", "AssetTypes", "OrderBy", }); + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor, + new java.lang.String[] { "Results", "NextPageToken", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor, + new java.lang.String[] { "Scope", "ResourceSelector", "IdentitySelector", "AccessSelector", "Options", "ConditionContext", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor, + new java.lang.String[] { "FullResourceName", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor, + new java.lang.String[] { "Identity", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor, + new java.lang.String[] { "Roles", "Permissions", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor, + new java.lang.String[] { "ExpandGroups", "ExpandRoles", "ExpandResources", "OutputResourceEdges", "OutputGroupEdges", "AnalyzeServiceAccountImpersonation", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor, + new java.lang.String[] { "AccessTime", "TimeContext", }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor, + new java.lang.String[] { "AnalysisQuery", "SavedAnalysisQuery", "ExecutionTimeout", }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor, + new java.lang.String[] { "MainAnalysis", "ServiceAccountImpersonationAnalysis", "FullyExplored", }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor = + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor, + new java.lang.String[] { "AnalysisQuery", "AnalysisResults", "FullyExplored", "NonCriticalErrors", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor, + new java.lang.String[] { "GcsDestination", "BigqueryDestination", "Destination", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor, + new java.lang.String[] { "Uri", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor, + new java.lang.String[] { "Dataset", "TablePrefix", "PartitionKey", "WriteDisposition", }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor, + new java.lang.String[] { "AnalysisQuery", "SavedAnalysisQuery", "OutputConfig", }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor, + new java.lang.String[] { }); + internal_static_google_cloud_asset_v1_SavedQuery_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_SavedQuery_descriptor, + new java.lang.String[] { "Name", "Description", "CreateTime", "Creator", "LastUpdateTime", "LastUpdater", "Labels", "Content", }); + internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor = + internal_static_google_cloud_asset_v1_SavedQuery_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor, + new java.lang.String[] { "IamPolicyAnalysisQuery", "QueryContent", }); + internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor = + internal_static_google_cloud_asset_v1_SavedQuery_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor, + new java.lang.String[] { "Parent", "SavedQuery", "SavedQueryId", }); + internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor, + new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); + internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor, + new java.lang.String[] { "SavedQueries", "NextPageToken", }); + internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor, + new java.lang.String[] { "SavedQuery", "UpdateMask", }); + internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor, + new java.lang.String[] { "Resource", "DestinationParent", "View", }); + internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor, + new java.lang.String[] { "MoveAnalysis", }); + internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor, + new java.lang.String[] { "DisplayName", "Analysis", "Error", "Result", }); + internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor, + new java.lang.String[] { "Blockers", "Warnings", }); + internal_static_google_cloud_asset_v1_MoveImpact_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_MoveImpact_descriptor, + new java.lang.String[] { "Detail", }); + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor, + new java.lang.String[] { "BigqueryDestination", }); + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor = + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor, + new java.lang.String[] { "Dataset", "Table", "WriteDisposition", }); + internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor, + new java.lang.String[] { "Parent", "Statement", "JobReference", "PageSize", "PageToken", "Timeout", "ReadTimeWindow", "ReadTime", "OutputConfig", "Query", "Time", }); + internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor, + new java.lang.String[] { "JobReference", "Done", "Error", "QueryResult", "OutputConfig", "Response", }); + internal_static_google_cloud_asset_v1_QueryResult_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_QueryResult_descriptor, + new java.lang.String[] { "Rows", "Schema", "NextPageToken", "TotalRows", }); + internal_static_google_cloud_asset_v1_TableSchema_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_TableSchema_descriptor, + new java.lang.String[] { "Fields", }); + internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor, + new java.lang.String[] { "Field", "Type", "Mode", "Fields", }); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor, + new java.lang.String[] { "Scope", "Names", }); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor, + new java.lang.String[] { "PolicyResults", }); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor = + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor, + new java.lang.String[] { "FullResourceName", "Policies", }); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor = + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor, + new java.lang.String[] { "AttachedResource", "Policy", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.asset.v1.AssetProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.ExprProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java new file mode 100644 index 000000000000..554af654c8f9 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java @@ -0,0 +1,1114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Attached resource representation, which is defined by the corresponding
+ * service provider. It represents an attached resource's payload.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AttachedResource} + */ +public final class AttachedResource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AttachedResource) + AttachedResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttachedResource.newBuilder() to construct. + private AttachedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttachedResource() { + assetType_ = ""; + versionedResources_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AttachedResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AttachedResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + versionedResources_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + versionedResources_.add( + input.readMessage(com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AttachedResource.class, com.google.cloud.asset.v1.AttachedResource.Builder.class); + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of this attached resource.
+   * Example: `osconfig.googleapis.com/Inventory`
+   * You can find the supported attached asset types of each resource in this
+   * table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * string asset_type = 1; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of this attached resource.
+   * Example: `osconfig.googleapis.com/Inventory`
+   * You can find the supported attached asset types of each resource in this
+   * table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * string asset_type = 1; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSIONED_RESOURCES_FIELD_NUMBER = 3; + private java.util.List versionedResources_; + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + @java.lang.Override + public java.util.List getVersionedResourcesList() { + return versionedResources_; + } + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + @java.lang.Override + public java.util.List + getVersionedResourcesOrBuilderList() { + return versionedResources_; + } + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + @java.lang.Override + public int getVersionedResourcesCount() { + return versionedResources_.size(); + } + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { + return versionedResources_.get(index); + } + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( + int index) { + return versionedResources_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assetType_); + } + for (int i = 0; i < versionedResources_.size(); i++) { + output.writeMessage(3, versionedResources_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, assetType_); + } + for (int i = 0; i < versionedResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, versionedResources_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.AttachedResource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AttachedResource other = (com.google.cloud.asset.v1.AttachedResource) obj; + + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (!getVersionedResourcesList() + .equals(other.getVersionedResourcesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (getVersionedResourcesCount() > 0) { + hash = (37 * hash) + VERSIONED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getVersionedResourcesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AttachedResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AttachedResource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.AttachedResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.AttachedResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Attached resource representation, which is defined by the corresponding
+   * service provider. It represents an attached resource's payload.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AttachedResource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AttachedResource) + com.google.cloud.asset.v1.AttachedResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AttachedResource.class, com.google.cloud.asset.v1.AttachedResource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AttachedResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVersionedResourcesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + assetType_ = ""; + + if (versionedResourcesBuilder_ == null) { + versionedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + versionedResourcesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AttachedResource getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AttachedResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AttachedResource build() { + com.google.cloud.asset.v1.AttachedResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AttachedResource buildPartial() { + com.google.cloud.asset.v1.AttachedResource result = new com.google.cloud.asset.v1.AttachedResource(this); + int from_bitField0_ = bitField0_; + result.assetType_ = assetType_; + if (versionedResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.versionedResources_ = versionedResources_; + } else { + result.versionedResources_ = versionedResourcesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.AttachedResource) { + return mergeFrom((com.google.cloud.asset.v1.AttachedResource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AttachedResource other) { + if (other == com.google.cloud.asset.v1.AttachedResource.getDefaultInstance()) return this; + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (versionedResourcesBuilder_ == null) { + if (!other.versionedResources_.isEmpty()) { + if (versionedResources_.isEmpty()) { + versionedResources_ = other.versionedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVersionedResourcesIsMutable(); + versionedResources_.addAll(other.versionedResources_); + } + onChanged(); + } + } else { + if (!other.versionedResources_.isEmpty()) { + if (versionedResourcesBuilder_.isEmpty()) { + versionedResourcesBuilder_.dispose(); + versionedResourcesBuilder_ = null; + versionedResources_ = other.versionedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + versionedResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVersionedResourcesFieldBuilder() : null; + } else { + versionedResourcesBuilder_.addAllMessages(other.versionedResources_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.AttachedResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.AttachedResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of this attached resource.
+     * Example: `osconfig.googleapis.com/Inventory`
+     * You can find the supported attached asset types of each resource in this
+     * table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * string asset_type = 1; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of this attached resource.
+     * Example: `osconfig.googleapis.com/Inventory`
+     * You can find the supported attached asset types of each resource in this
+     * table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * string asset_type = 1; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of this attached resource.
+     * Example: `osconfig.googleapis.com/Inventory`
+     * You can find the supported attached asset types of each resource in this
+     * table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * string asset_type = 1; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of this attached resource.
+     * Example: `osconfig.googleapis.com/Inventory`
+     * You can find the supported attached asset types of each resource in this
+     * table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * string asset_type = 1; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of this attached resource.
+     * Example: `osconfig.googleapis.com/Inventory`
+     * You can find the supported attached asset types of each resource in this
+     * table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * string asset_type = 1; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private java.util.List versionedResources_ = + java.util.Collections.emptyList(); + private void ensureVersionedResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + versionedResources_ = new java.util.ArrayList(versionedResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> versionedResourcesBuilder_; + + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public java.util.List getVersionedResourcesList() { + if (versionedResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(versionedResources_); + } else { + return versionedResourcesBuilder_.getMessageList(); + } + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public int getVersionedResourcesCount() { + if (versionedResourcesBuilder_ == null) { + return versionedResources_.size(); + } else { + return versionedResourcesBuilder_.getCount(); + } + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { + if (versionedResourcesBuilder_ == null) { + return versionedResources_.get(index); + } else { + return versionedResourcesBuilder_.getMessage(index); + } + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder setVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource value) { + if (versionedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionedResourcesIsMutable(); + versionedResources_.set(index, value); + onChanged(); + } else { + versionedResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder setVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.set(index, builderForValue.build()); + onChanged(); + } else { + versionedResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder addVersionedResources(com.google.cloud.asset.v1.VersionedResource value) { + if (versionedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionedResourcesIsMutable(); + versionedResources_.add(value); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder addVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource value) { + if (versionedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionedResourcesIsMutable(); + versionedResources_.add(index, value); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder addVersionedResources( + com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.add(builderForValue.build()); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder addVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.add(index, builderForValue.build()); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder addAllVersionedResources( + java.lang.Iterable values) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, versionedResources_); + onChanged(); + } else { + versionedResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder clearVersionedResources() { + if (versionedResourcesBuilder_ == null) { + versionedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + versionedResourcesBuilder_.clear(); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public Builder removeVersionedResources(int index) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.remove(index); + onChanged(); + } else { + versionedResourcesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public com.google.cloud.asset.v1.VersionedResource.Builder getVersionedResourcesBuilder( + int index) { + return getVersionedResourcesFieldBuilder().getBuilder(index); + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( + int index) { + if (versionedResourcesBuilder_ == null) { + return versionedResources_.get(index); } else { + return versionedResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public java.util.List + getVersionedResourcesOrBuilderList() { + if (versionedResourcesBuilder_ != null) { + return versionedResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versionedResources_); + } + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder() { + return getVersionedResourcesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder( + int index) { + return getVersionedResourcesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); + } + /** + *
+     * Versioned resource representations of this attached resource. This is
+     * repeated because there could be multiple versions of the attached resource
+     * representations during version migration.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + public java.util.List + getVersionedResourcesBuilderList() { + return getVersionedResourcesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> + getVersionedResourcesFieldBuilder() { + if (versionedResourcesBuilder_ == null) { + versionedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder>( + versionedResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + versionedResources_ = null; + } + return versionedResourcesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AttachedResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AttachedResource) + private static final com.google.cloud.asset.v1.AttachedResource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AttachedResource(); + } + + public static com.google.cloud.asset.v1.AttachedResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttachedResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AttachedResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AttachedResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java new file mode 100644 index 000000000000..15fc2826e2e8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface AttachedResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AttachedResource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of this attached resource.
+   * Example: `osconfig.googleapis.com/Inventory`
+   * You can find the supported attached asset types of each resource in this
+   * table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * string asset_type = 1; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of this attached resource.
+   * Example: `osconfig.googleapis.com/Inventory`
+   * You can find the supported attached asset types of each resource in this
+   * table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * string asset_type = 1; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + java.util.List + getVersionedResourcesList(); + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index); + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + int getVersionedResourcesCount(); + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + java.util.List + getVersionedResourcesOrBuilderList(); + /** + *
+   * Versioned resource representations of this attached resource. This is
+   * repeated because there could be multiple versions of the attached resource
+   * representations during version migration.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; + */ + com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java new file mode 100644 index 000000000000..c8b5b27bbd17 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java @@ -0,0 +1,1780 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Batch get assets history request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryRequest} + */ +public final class BatchGetAssetsHistoryRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) + BatchGetAssetsHistoryRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchGetAssetsHistoryRequest.newBuilder() to construct. + private BatchGetAssetsHistoryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchGetAssetsHistoryRequest() { + parent_ = ""; + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchGetAssetsHistoryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchGetAssetsHistoryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetNames_.add(s); + break; + } + case 24: { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 34: { + com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; + if (readTimeWindow_ != null) { + subBuilder = readTimeWindow_.toBuilder(); + } + readTimeWindow_ = input.readMessage(com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTimeWindow_); + readTimeWindow_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + relationshipTypes_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetNames_ = assetNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The relative name of the root asset. It can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id")", or a project number (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative name of the root asset. It can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id")", or a project number (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList assetNames_; + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + public com.google.protobuf.ProtocolStringList + getAssetNamesList() { + return assetNames_; + } + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + public int getAssetNamesCount() { + return assetNames_.size(); + } + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + public java.lang.String getAssetNames(int index) { + return assetNames_.get(index); + } + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + public com.google.protobuf.ByteString + getAssetNamesBytes(int index) { + return assetNames_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 3; + private int contentType_; + /** + *
+   * Optional. The content type.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+   * Optional. The content type.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The contentType. + */ + @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + + public static final int READ_TIME_WINDOW_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.TimeWindow readTimeWindow_; + /** + *
+   * Optional. The time window for the asset history. Both start_time and
+   * end_time are optional and if set, it must be after the current time minus
+   * 35 days. If end_time is not set, it is default to current timestamp.
+   * If start_time is not set, the snapshot of the assets at end_time will be
+   * returned. The returned results contain all temporal assets whose time
+   * window overlap with read_time_window.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTimeWindow field is set. + */ + @java.lang.Override + public boolean hasReadTimeWindow() { + return readTimeWindow_ != null; + } + /** + *
+   * Optional. The time window for the asset history. Both start_time and
+   * end_time are optional and if set, it must be after the current time minus
+   * 35 days. If end_time is not set, it is default to current timestamp.
+   * If start_time is not set, the snapshot of the assets at end_time will be
+   * returned. The returned results contain all temporal assets whose time
+   * window overlap with read_time_window.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTimeWindow. + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { + return readTimeWindow_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : readTimeWindow_; + } + /** + *
+   * Optional. The time window for the asset history. Both start_time and
+   * end_time are optional and if set, it must be after the current time minus
+   * 35 days. If end_time is not set, it is default to current timestamp.
+   * If start_time is not set, the snapshot of the assets at end_time will be
+   * returned. The returned results contain all temporal assets whose time
+   * window overlap with read_time_window.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { + return getReadTimeWindow(); + } + + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_; + } + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < assetNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i)); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, contentType_); + } + if (readTimeWindow_ != null) { + output.writeMessage(4, getReadTimeWindow()); + } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, relationshipTypes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < assetNames_.size(); i++) { + dataSize += computeStringSizeNoTag(assetNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetNamesList().size(); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, contentType_); + } + if (readTimeWindow_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getReadTimeWindow()); + } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest other = (com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getAssetNamesList() + .equals(other.getAssetNamesList())) return false; + if (contentType_ != other.contentType_) return false; + if (hasReadTimeWindow() != other.hasReadTimeWindow()) return false; + if (hasReadTimeWindow()) { + if (!getReadTimeWindow() + .equals(other.getReadTimeWindow())) return false; + } + if (!getRelationshipTypesList() + .equals(other.getRelationshipTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getAssetNamesCount() > 0) { + hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAssetNamesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + if (hasReadTimeWindow()) { + hash = (37 * hash) + READ_TIME_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getReadTimeWindow().hashCode(); + } + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Batch get assets history request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + contentType_ = 0; + + if (readTimeWindowBuilder_ == null) { + readTimeWindow_ = null; + } else { + readTimeWindow_ = null; + readTimeWindowBuilder_ = null; + } + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest build() { + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest buildPartial() { + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest result = new com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (((bitField0_ & 0x00000001) != 0)) { + assetNames_ = assetNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetNames_ = assetNames_; + result.contentType_ = contentType_; + if (readTimeWindowBuilder_ == null) { + result.readTimeWindow_ = readTimeWindow_; + } else { + result.readTimeWindow_ = readTimeWindowBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationshipTypes_ = relationshipTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) { + return mergeFrom((com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest other) { + if (other == com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.assetNames_.isEmpty()) { + if (assetNames_.isEmpty()) { + assetNames_ = other.assetNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetNamesIsMutable(); + assetNames_.addAll(other.assetNames_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.hasReadTimeWindow()) { + mergeReadTimeWindow(other.getReadTimeWindow()); + } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative name of the root asset. It can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id")", or a project number (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. It can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id")", or a project number (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. It can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id")", or a project number (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. It can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id")", or a project number (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. It can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id")", or a project number (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + public com.google.protobuf.ProtocolStringList + getAssetNamesList() { + return assetNames_.getUnmodifiableView(); + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + public int getAssetNamesCount() { + return assetNames_.size(); + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + public java.lang.String getAssetNames(int index) { + return assetNames_.get(index); + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + public com.google.protobuf.ByteString + getAssetNamesBytes(int index) { + return assetNames_.getByteString(index); + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index to set the value at. + * @param value The assetNames to set. + * @return This builder for chaining. + */ + public Builder setAssetNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetNamesIsMutable(); + assetNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @param value The assetNames to add. + * @return This builder for chaining. + */ + public Builder addAssetNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetNamesIsMutable(); + assetNames_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @param values The assetNames to add. + * @return This builder for chaining. + */ + public Builder addAllAssetNames( + java.lang.Iterable values) { + ensureAssetNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetNames_); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @return This builder for chaining. + */ + public Builder clearAssetNames() { + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets.
+     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * The request becomes a no-op if the asset name list is empty, and the max
+     * size of the asset name list is 100 in one request.
+     * 
+ * + * repeated string asset_names = 2; + * @param value The bytes of the assetNames to add. + * @return This builder for chaining. + */ + public Builder addAssetNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetNamesIsMutable(); + assetNames_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + *
+     * Optional. The content type.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+     * Optional. The content type.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The content type.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + /** + *
+     * Optional. The content type.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Optional. The content type.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.TimeWindow readTimeWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> readTimeWindowBuilder_; + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTimeWindow field is set. + */ + public boolean hasReadTimeWindow() { + return readTimeWindowBuilder_ != null || readTimeWindow_ != null; + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTimeWindow. + */ + public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { + if (readTimeWindowBuilder_ == null) { + return readTimeWindow_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : readTimeWindow_; + } else { + return readTimeWindowBuilder_.getMessage(); + } + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { + if (readTimeWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTimeWindow_ = value; + onChanged(); + } else { + readTimeWindowBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadTimeWindow( + com.google.cloud.asset.v1.TimeWindow.Builder builderForValue) { + if (readTimeWindowBuilder_ == null) { + readTimeWindow_ = builderForValue.build(); + onChanged(); + } else { + readTimeWindowBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { + if (readTimeWindowBuilder_ == null) { + if (readTimeWindow_ != null) { + readTimeWindow_ = + com.google.cloud.asset.v1.TimeWindow.newBuilder(readTimeWindow_).mergeFrom(value).buildPartial(); + } else { + readTimeWindow_ = value; + } + onChanged(); + } else { + readTimeWindowBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearReadTimeWindow() { + if (readTimeWindowBuilder_ == null) { + readTimeWindow_ = null; + onChanged(); + } else { + readTimeWindow_ = null; + readTimeWindowBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.TimeWindow.Builder getReadTimeWindowBuilder() { + + onChanged(); + return getReadTimeWindowFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { + if (readTimeWindowBuilder_ != null) { + return readTimeWindowBuilder_.getMessageOrBuilder(); + } else { + return readTimeWindow_ == null ? + com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : readTimeWindow_; + } + } + /** + *
+     * Optional. The time window for the asset history. Both start_time and
+     * end_time are optional and if set, it must be after the current time minus
+     * 35 days. If end_time is not set, it is default to current timestamp.
+     * If start_time is not set, the snapshot of the assets at end_time will be
+     * returned. The returned results contain all temporal assets whose time
+     * window overlap with read_time_window.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> + getReadTimeWindowFieldBuilder() { + if (readTimeWindowBuilder_ == null) { + readTimeWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder>( + getReadTimeWindow(), + getParentForChildren(), + isClean()); + readTimeWindow_ = null; + } + return readTimeWindowBuilder_; + } + + private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes( + java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationshipTypes_); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) + private static final com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(); + } + + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchGetAssetsHistoryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchGetAssetsHistoryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java new file mode 100644 index 000000000000..cfc137961ccd --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java @@ -0,0 +1,256 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface BatchGetAssetsHistoryRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative name of the root asset. It can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id")", or a project number (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative name of the root asset. It can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id")", or a project number (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + java.util.List + getAssetNamesList(); + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + int getAssetNamesCount(); + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + java.lang.String getAssetNames(int index); + /** + *
+   * A list of the full names of the assets.
+   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * The request becomes a no-op if the asset name list is empty, and the max
+   * size of the asset name list is 100 in one request.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + com.google.protobuf.ByteString + getAssetNamesBytes(int index); + + /** + *
+   * Optional. The content type.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + *
+   * Optional. The content type.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The contentType. + */ + com.google.cloud.asset.v1.ContentType getContentType(); + + /** + *
+   * Optional. The time window for the asset history. Both start_time and
+   * end_time are optional and if set, it must be after the current time minus
+   * 35 days. If end_time is not set, it is default to current timestamp.
+   * If start_time is not set, the snapshot of the assets at end_time will be
+   * returned. The returned results contain all temporal assets whose time
+   * window overlap with read_time_window.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTimeWindow field is set. + */ + boolean hasReadTimeWindow(); + /** + *
+   * Optional. The time window for the asset history. Both start_time and
+   * end_time are optional and if set, it must be after the current time minus
+   * 35 days. If end_time is not set, it is default to current timestamp.
+   * If start_time is not set, the snapshot of the assets at end_time will be
+   * returned. The returned results contain all temporal assets whose time
+   * window overlap with read_time_window.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTimeWindow. + */ + com.google.cloud.asset.v1.TimeWindow getReadTimeWindow(); + /** + *
+   * Optional. The time window for the asset history. Both start_time and
+   * end_time are optional and if set, it must be after the current time minus
+   * 35 days. If end_time is not set, it is default to current timestamp.
+   * If start_time is not set, the snapshot of the assets at end_time will be
+   * returned. The returned results contain all temporal assets whose time
+   * window overlap with read_time_window.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); + + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the relationshipTypes. + */ + java.util.List + getRelationshipTypesList(); + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString + getRelationshipTypesBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java new file mode 100644 index 000000000000..1498932954fb --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Batch get assets history response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryResponse} + */ +public final class BatchGetAssetsHistoryResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) + BatchGetAssetsHistoryResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchGetAssetsHistoryResponse.newBuilder() to construct. + private BatchGetAssetsHistoryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchGetAssetsHistoryResponse() { + assets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchGetAssetsHistoryResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchGetAssetsHistoryResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assets_.add( + input.readMessage(com.google.cloud.asset.v1.TemporalAsset.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.Builder.class); + } + + public static final int ASSETS_FIELD_NUMBER = 1; + private java.util.List assets_; + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TemporalAsset getAssets(int index) { + return assets_.get(index); + } + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TemporalAssetOrBuilder getAssetsOrBuilder( + int index) { + return assets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(1, assets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, assets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse other = (com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) obj; + + if (!getAssetsList() + .equals(other.getAssetsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Batch get assets history response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAssetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + assetsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse build() { + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse buildPartial() { + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse result = new com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(this); + int from_bitField0_ = bitField0_; + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) { + return mergeFrom((com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse other) { + if (other == com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.getDefaultInstance()) return this; + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssetsFieldBuilder() : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List assets_ = + java.util.Collections.emptyList(); + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TemporalAsset, com.google.cloud.asset.v1.TemporalAsset.Builder, com.google.cloud.asset.v1.TemporalAssetOrBuilder> assetsBuilder_; + + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public com.google.cloud.asset.v1.TemporalAsset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1.TemporalAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1.TemporalAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder addAssets(com.google.cloud.asset.v1.TemporalAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1.TemporalAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder addAssets( + com.google.cloud.asset.v1.TemporalAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1.TemporalAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public com.google.cloud.asset.v1.TemporalAsset.Builder getAssetsBuilder( + int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public com.google.cloud.asset.v1.TemporalAssetOrBuilder getAssetsOrBuilder( + int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public com.google.cloud.asset.v1.TemporalAsset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance()); + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public com.google.cloud.asset.v1.TemporalAsset.Builder addAssetsBuilder( + int index) { + return getAssetsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance()); + } + /** + *
+     * A list of assets with valid time windows.
+     * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + public java.util.List + getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TemporalAsset, com.google.cloud.asset.v1.TemporalAsset.Builder, com.google.cloud.asset.v1.TemporalAssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TemporalAsset, com.google.cloud.asset.v1.TemporalAsset.Builder, com.google.cloud.asset.v1.TemporalAssetOrBuilder>( + assets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + assets_ = null; + } + return assetsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) + private static final com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(); + } + + public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchGetAssetsHistoryResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchGetAssetsHistoryResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java new file mode 100644 index 000000000000..70e9d55a250e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface BatchGetAssetsHistoryResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + java.util.List + getAssetsList(); + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + com.google.cloud.asset.v1.TemporalAsset getAssets(int index); + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + int getAssetsCount(); + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + java.util.List + getAssetsOrBuilderList(); + /** + *
+   * A list of assets with valid time windows.
+   * 
+ * + * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; + */ + com.google.cloud.asset.v1.TemporalAssetOrBuilder getAssetsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java new file mode 100644 index 000000000000..3acec1606453 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java @@ -0,0 +1,945 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A request message for
+ * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest} + */ +public final class BatchGetEffectiveIamPoliciesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) + BatchGetEffectiveIamPoliciesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchGetEffectiveIamPoliciesRequest.newBuilder() to construct. + private BatchGetEffectiveIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchGetEffectiveIamPoliciesRequest() { + scope_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchGetEffectiveIamPoliciesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchGetEffectiveIamPoliciesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + names_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + *
+   * Required. Only IAM policies on or below the scope will be returned.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + *
+   * Required. Only IAM policies on or below the scope will be returned.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList names_; + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_; + } + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) obj; + + if (!getScope() + .equals(other.getScope())) return false; + if (!getNamesList() + .equals(other.getNamesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A request message for
+   * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + scope_ = ""; + + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest build() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest buildPartial() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest(this); + int from_bitField0_ = bitField0_; + result.scope_ = scope_; + if (((bitField0_ & 0x00000001) != 0)) { + names_ = names_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.names_ = names_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) { + return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest other) { + if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.getDefaultInstance()) return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object scope_ = ""; + /** + *
+     * Required. Only IAM policies on or below the scope will be returned.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Only IAM policies on or below the scope will be returned.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Only IAM policies on or below the scope will be returned.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Only IAM policies on or below the scope will be returned.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = getDefaultInstance().getScope(); + onChanged(); + return this; + } + /** + *
+     * Required. Only IAM policies on or below the scope will be returned.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scope_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList + getNamesList() { + return names_.getUnmodifiableView(); + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString + getNamesBytes(int index) { + return names_.getByteString(index); + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames( + java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, names_); + onChanged(); + return this; + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Required. The names refer to the [full_resource_names]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * A maximum of 20 resources' effective policies can be retrieved in a batch.
+     * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) + private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest(); + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchGetEffectiveIamPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchGetEffectiveIamPoliciesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..f75a8b07cda0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java @@ -0,0 +1,100 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface BatchGetEffectiveIamPoliciesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Only IAM policies on or below the scope will be returned.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The scope. + */ + java.lang.String getScope(); + /** + *
+   * Required. Only IAM policies on or below the scope will be returned.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for scope. + */ + com.google.protobuf.ByteString + getScopeBytes(); + + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return A list containing the names. + */ + java.util.List + getNamesList(); + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The count of names. + */ + int getNamesCount(); + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + /** + *
+   * Required. The names refer to the [full_resource_names]
+   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * A maximum of 20 resources' effective policies can be retrieved in a batch.
+   * 
+ * + * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString + getNamesBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java new file mode 100644 index 000000000000..1cc8063e30d4 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java @@ -0,0 +1,3530 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A response message for
+ * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse} + */ +public final class BatchGetEffectiveIamPoliciesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) + BatchGetEffectiveIamPoliciesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use BatchGetEffectiveIamPoliciesResponse.newBuilder() to construct. + private BatchGetEffectiveIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BatchGetEffectiveIamPoliciesResponse() { + policyResults_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BatchGetEffectiveIamPoliciesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BatchGetEffectiveIamPoliciesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + policyResults_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + policyResults_.add( + input.readMessage(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + policyResults_ = java.util.Collections.unmodifiableList(policyResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.Builder.class); + } + + public interface EffectiveIamPolicyOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The [full_resource_name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for which the
+     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+     * are computed. This is one of the
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+     * the caller provides in the request.
+     * 
+ * + * string full_resource_name = 1; + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + *
+     * The [full_resource_name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for which the
+     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+     * are computed. This is one of the
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+     * the caller provides in the request.
+     * 
+ * + * string full_resource_name = 1; + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString + getFullResourceNameBytes(); + + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + java.util.List + getPoliciesList(); + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getPolicies(int index); + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + int getPoliciesCount(); + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + java.util.List + getPoliciesOrBuilderList(); + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder getPoliciesOrBuilder( + int index); + } + /** + *
+   * The effective IAM policies on one resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy} + */ + public static final class EffectiveIamPolicy extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) + EffectiveIamPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use EffectiveIamPolicy.newBuilder() to construct. + private EffectiveIamPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EffectiveIamPolicy() { + fullResourceName_ = ""; + policies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EffectiveIamPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EffectiveIamPolicy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fullResourceName_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + policies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + policies_.add( + input.readMessage(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + policies_ = java.util.Collections.unmodifiableList(policies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder.class); + } + + public interface PolicyInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The full resource name the
+       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+       * is directly attached to.
+       * 
+ * + * string attached_resource = 1; + * @return The attachedResource. + */ + java.lang.String getAttachedResource(); + /** + *
+       * The full resource name the
+       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+       * is directly attached to.
+       * 
+ * + * string attached_resource = 1; + * @return The bytes for attachedResource. + */ + com.google.protobuf.ByteString + getAttachedResourceBytes(); + + /** + *
+       * The IAM policy that's directly attached to the
+       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+       * 
+ * + * .google.iam.v1.Policy policy = 2; + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + /** + *
+       * The IAM policy that's directly attached to the
+       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+       * 
+ * + * .google.iam.v1.Policy policy = 2; + * @return The policy. + */ + com.google.iam.v1.Policy getPolicy(); + /** + *
+       * The IAM policy that's directly attached to the
+       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+       * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); + } + /** + *
+     * The IAM policy and its attached resource.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo} + */ + public static final class PolicyInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) + PolicyInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PolicyInfo.newBuilder() to construct. + private PolicyInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PolicyInfo() { + attachedResource_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PolicyInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PolicyInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + attachedResource_ = s; + break; + } + case 18: { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (policy_ != null) { + subBuilder = policy_.toBuilder(); + } + policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policy_); + policy_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder.class); + } + + public static final int ATTACHED_RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object attachedResource_; + /** + *
+       * The full resource name the
+       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+       * is directly attached to.
+       * 
+ * + * string attached_resource = 1; + * @return The attachedResource. + */ + @java.lang.Override + public java.lang.String getAttachedResource() { + java.lang.Object ref = attachedResource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attachedResource_ = s; + return s; + } + } + /** + *
+       * The full resource name the
+       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+       * is directly attached to.
+       * 
+ * + * string attached_resource = 1; + * @return The bytes for attachedResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttachedResourceBytes() { + java.lang.Object ref = attachedResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attachedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_FIELD_NUMBER = 2; + private com.google.iam.v1.Policy policy_; + /** + *
+       * The IAM policy that's directly attached to the
+       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+       * 
+ * + * .google.iam.v1.Policy policy = 2; + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return policy_ != null; + } + /** + *
+       * The IAM policy that's directly attached to the
+       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+       * 
+ * + * .google.iam.v1.Policy policy = 2; + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getPolicy() { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + /** + *
+       * The IAM policy that's directly attached to the
+       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+       * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + return getPolicy(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachedResource_); + } + if (policy_ != null) { + output.writeMessage(2, getPolicy()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachedResource_); + } + if (policy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getPolicy()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) obj; + + if (!getAttachedResource() + .equals(other.getAttachedResource())) return false; + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy() + .equals(other.getPolicy())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTACHED_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getAttachedResource().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * The IAM policy and its attached resource.
+       * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + attachedResource_ = ""; + + if (policyBuilder_ == null) { + policy_ = null; + } else { + policy_ = null; + policyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo build() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo buildPartial() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo(this); + result.attachedResource_ = attachedResource_; + if (policyBuilder_ == null) { + result.policy_ = policy_; + } else { + result.policy_ = policyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) { + return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo other) { + if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance()) return this; + if (!other.getAttachedResource().isEmpty()) { + attachedResource_ = other.attachedResource_; + onChanged(); + } + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object attachedResource_ = ""; + /** + *
+         * The full resource name the
+         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+         * is directly attached to.
+         * 
+ * + * string attached_resource = 1; + * @return The attachedResource. + */ + public java.lang.String getAttachedResource() { + java.lang.Object ref = attachedResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attachedResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+         * The full resource name the
+         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+         * is directly attached to.
+         * 
+ * + * string attached_resource = 1; + * @return The bytes for attachedResource. + */ + public com.google.protobuf.ByteString + getAttachedResourceBytes() { + java.lang.Object ref = attachedResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attachedResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+         * The full resource name the
+         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+         * is directly attached to.
+         * 
+ * + * string attached_resource = 1; + * @param value The attachedResource to set. + * @return This builder for chaining. + */ + public Builder setAttachedResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + attachedResource_ = value; + onChanged(); + return this; + } + /** + *
+         * The full resource name the
+         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+         * is directly attached to.
+         * 
+ * + * string attached_resource = 1; + * @return This builder for chaining. + */ + public Builder clearAttachedResource() { + + attachedResource_ = getDefaultInstance().getAttachedResource(); + onChanged(); + return this; + } + /** + *
+         * The full resource name the
+         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
+         * is directly attached to.
+         * 
+ * + * string attached_resource = 1; + * @param value The bytes for attachedResource to set. + * @return This builder for chaining. + */ + public Builder setAttachedResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + attachedResource_ = value; + onChanged(); + return this; + } + + private com.google.iam.v1.Policy policy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> policyBuilder_; + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return policyBuilder_ != null || policy_ != null; + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + * @return The policy. + */ + public com.google.iam.v1.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + public Builder setPolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + onChanged(); + } else { + policyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + public Builder setPolicy( + com.google.iam.v1.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + onChanged(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + public Builder mergePolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (policy_ != null) { + policy_ = + com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); + } else { + policy_ = value; + } + onChanged(); + } else { + policyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + public Builder clearPolicy() { + if (policyBuilder_ == null) { + policy_ = null; + onChanged(); + } else { + policy_ = null; + policyBuilder_ = null; + } + + return this; + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + public com.google.iam.v1.Policy.Builder getPolicyBuilder() { + + onChanged(); + return getPolicyFieldBuilder().getBuilder(); + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? + com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + } + /** + *
+         * The IAM policy that's directly attached to the
+         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
+         * 
+ * + * .google.iam.v1.Policy policy = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> + getPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( + getPolicy(), + getParentForChildren(), + isClean()); + policy_ = null; + } + return policyBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) + private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo(); + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PolicyInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fullResourceName_; + /** + *
+     * The [full_resource_name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for which the
+     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+     * are computed. This is one of the
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+     * the caller provides in the request.
+     * 
+ * + * string full_resource_name = 1; + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } + } + /** + *
+     * The [full_resource_name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for which the
+     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+     * are computed. This is one of the
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+     * the caller provides in the request.
+     * 
+ * + * string full_resource_name = 1; + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICIES_FIELD_NUMBER = 2; + private java.util.List policies_; + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + @java.lang.Override + public java.util.List getPoliciesList() { + return policies_; + } + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + @java.lang.Override + public java.util.List + getPoliciesOrBuilderList() { + return policies_; + } + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + @java.lang.Override + public int getPoliciesCount() { + return policies_.size(); + } + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getPolicies(int index) { + return policies_.get(index); + } + /** + *
+     * The effective policies for the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies include the policy set on the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * and those set on its parents and ancestors up to the
+     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+     * Note that these policies are not filtered according to the resource type
+     * of the
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+     * These policies are hierarchically ordered by
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * starting from
+     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+     * itself to its parents and ancestors, such that policies[i]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+     * is the child of policies[i+1]'s
+     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+     * if policies[i+1] exists.
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder getPoliciesOrBuilder( + int index) { + return policies_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); + } + for (int i = 0; i < policies_.size(); i++) { + output.writeMessage(2, policies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); + } + for (int i = 0; i < policies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, policies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) obj; + + if (!getFullResourceName() + .equals(other.getFullResourceName())) return false; + if (!getPoliciesList() + .equals(other.getPoliciesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + if (getPoliciesCount() > 0) { + hash = (37 * hash) + POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getPoliciesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The effective IAM policies on one resource.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPoliciesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + fullResourceName_ = ""; + + if (policiesBuilder_ == null) { + policies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policiesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy build() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy buildPartial() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy(this); + int from_bitField0_ = bitField0_; + result.fullResourceName_ = fullResourceName_; + if (policiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policies_ = java.util.Collections.unmodifiableList(policies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policies_ = policies_; + } else { + result.policies_ = policiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) { + return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy other) { + if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance()) return this; + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + onChanged(); + } + if (policiesBuilder_ == null) { + if (!other.policies_.isEmpty()) { + if (policies_.isEmpty()) { + policies_ = other.policies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePoliciesIsMutable(); + policies_.addAll(other.policies_); + } + onChanged(); + } + } else { + if (!other.policies_.isEmpty()) { + if (policiesBuilder_.isEmpty()) { + policiesBuilder_.dispose(); + policiesBuilder_ = null; + policies_ = other.policies_; + bitField0_ = (bitField0_ & ~0x00000001); + policiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPoliciesFieldBuilder() : null; + } else { + policiesBuilder_.addAllMessages(other.policies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object fullResourceName_ = ""; + /** + *
+       * The [full_resource_name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * for which the
+       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+       * are computed. This is one of the
+       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+       * the caller provides in the request.
+       * 
+ * + * string full_resource_name = 1; + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The [full_resource_name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * for which the
+       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+       * are computed. This is one of the
+       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+       * the caller provides in the request.
+       * 
+ * + * string full_resource_name = 1; + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The [full_resource_name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * for which the
+       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+       * are computed. This is one of the
+       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+       * the caller provides in the request.
+       * 
+ * + * string full_resource_name = 1; + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResourceName_ = value; + onChanged(); + return this; + } + /** + *
+       * The [full_resource_name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * for which the
+       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+       * are computed. This is one of the
+       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+       * the caller provides in the request.
+       * 
+ * + * string full_resource_name = 1; + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + *
+       * The [full_resource_name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * for which the
+       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
+       * are computed. This is one of the
+       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
+       * the caller provides in the request.
+       * 
+ * + * string full_resource_name = 1; + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResourceName_ = value; + onChanged(); + return this; + } + + private java.util.List policies_ = + java.util.Collections.emptyList(); + private void ensurePoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policies_ = new java.util.ArrayList(policies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder> policiesBuilder_; + + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public java.util.List getPoliciesList() { + if (policiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(policies_); + } else { + return policiesBuilder_.getMessageList(); + } + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public int getPoliciesCount() { + if (policiesBuilder_ == null) { + return policies_.size(); + } else { + return policiesBuilder_.getCount(); + } + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getPolicies(int index) { + if (policiesBuilder_ == null) { + return policies_.get(index); + } else { + return policiesBuilder_.getMessage(index); + } + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder setPolicies( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.set(index, value); + onChanged(); + } else { + policiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder setPolicies( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.set(index, builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder addPolicies(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.add(value); + onChanged(); + } else { + policiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder addPolicies( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo value) { + if (policiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePoliciesIsMutable(); + policies_.add(index, value); + onChanged(); + } else { + policiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder addPolicies( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder addPolicies( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder builderForValue) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(index, builderForValue.build()); + onChanged(); + } else { + policiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder addAllPolicies( + java.lang.Iterable values) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, policies_); + onChanged(); + } else { + policiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder clearPolicies() { + if (policiesBuilder_ == null) { + policies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policiesBuilder_.clear(); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public Builder removePolicies(int index) { + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.remove(index); + onChanged(); + } else { + policiesBuilder_.remove(index); + } + return this; + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder getPoliciesBuilder( + int index) { + return getPoliciesFieldBuilder().getBuilder(index); + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder getPoliciesOrBuilder( + int index) { + if (policiesBuilder_ == null) { + return policies_.get(index); } else { + return policiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public java.util.List + getPoliciesOrBuilderList() { + if (policiesBuilder_ != null) { + return policiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policies_); + } + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder addPoliciesBuilder() { + return getPoliciesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance()); + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder addPoliciesBuilder( + int index) { + return getPoliciesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance()); + } + /** + *
+       * The effective policies for the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies include the policy set on the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * and those set on its parents and ancestors up to the
+       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
+       * Note that these policies are not filtered according to the resource type
+       * of the
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
+       * These policies are hierarchically ordered by
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * starting from
+       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
+       * itself to its parents and ancestors, such that policies[i]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
+       * is the child of policies[i+1]'s
+       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
+       * if policies[i+1] exists.
+       * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; + */ + public java.util.List + getPoliciesBuilderList() { + return getPoliciesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder> + getPoliciesFieldBuilder() { + if (policiesBuilder_ == null) { + policiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder>( + policies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policies_ = null; + } + return policiesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) + private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy(); + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EffectiveIamPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EffectiveIamPolicy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int POLICY_RESULTS_FIELD_NUMBER = 2; + private java.util.List policyResults_; + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + @java.lang.Override + public java.util.List getPolicyResultsList() { + return policyResults_; + } + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + @java.lang.Override + public java.util.List + getPolicyResultsOrBuilderList() { + return policyResults_; + } + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + @java.lang.Override + public int getPolicyResultsCount() { + return policyResults_.size(); + } + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getPolicyResults(int index) { + return policyResults_.get(index); + } + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder getPolicyResultsOrBuilder( + int index) { + return policyResults_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < policyResults_.size(); i++) { + output.writeMessage(2, policyResults_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < policyResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, policyResults_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) obj; + + if (!getPolicyResultsList() + .equals(other.getPolicyResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPolicyResultsCount() > 0) { + hash = (37 * hash) + POLICY_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyResultsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A response message for
+   * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPolicyResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (policyResultsBuilder_ == null) { + policyResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + policyResultsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse build() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse buildPartial() { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse(this); + int from_bitField0_ = bitField0_; + if (policyResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyResults_ = java.util.Collections.unmodifiableList(policyResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyResults_ = policyResults_; + } else { + result.policyResults_ = policyResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) { + return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse other) { + if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance()) return this; + if (policyResultsBuilder_ == null) { + if (!other.policyResults_.isEmpty()) { + if (policyResults_.isEmpty()) { + policyResults_ = other.policyResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyResultsIsMutable(); + policyResults_.addAll(other.policyResults_); + } + onChanged(); + } + } else { + if (!other.policyResults_.isEmpty()) { + if (policyResultsBuilder_.isEmpty()) { + policyResultsBuilder_.dispose(); + policyResultsBuilder_ = null; + policyResults_ = other.policyResults_; + bitField0_ = (bitField0_ & ~0x00000001); + policyResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPolicyResultsFieldBuilder() : null; + } else { + policyResultsBuilder_.addAllMessages(other.policyResults_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List policyResults_ = + java.util.Collections.emptyList(); + private void ensurePolicyResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyResults_ = new java.util.ArrayList(policyResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder> policyResultsBuilder_; + + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public java.util.List getPolicyResultsList() { + if (policyResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyResults_); + } else { + return policyResultsBuilder_.getMessageList(); + } + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public int getPolicyResultsCount() { + if (policyResultsBuilder_ == null) { + return policyResults_.size(); + } else { + return policyResultsBuilder_.getCount(); + } + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getPolicyResults(int index) { + if (policyResultsBuilder_ == null) { + return policyResults_.get(index); + } else { + return policyResultsBuilder_.getMessage(index); + } + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder setPolicyResults( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) { + if (policyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyResultsIsMutable(); + policyResults_.set(index, value); + onChanged(); + } else { + policyResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder setPolicyResults( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder builderForValue) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.set(index, builderForValue.build()); + onChanged(); + } else { + policyResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder addPolicyResults(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) { + if (policyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyResultsIsMutable(); + policyResults_.add(value); + onChanged(); + } else { + policyResultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder addPolicyResults( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) { + if (policyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyResultsIsMutable(); + policyResults_.add(index, value); + onChanged(); + } else { + policyResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder addPolicyResults( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder builderForValue) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.add(builderForValue.build()); + onChanged(); + } else { + policyResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder addPolicyResults( + int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder builderForValue) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.add(index, builderForValue.build()); + onChanged(); + } else { + policyResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder addAllPolicyResults( + java.lang.Iterable values) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, policyResults_); + onChanged(); + } else { + policyResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder clearPolicyResults() { + if (policyResultsBuilder_ == null) { + policyResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyResultsBuilder_.clear(); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public Builder removePolicyResults(int index) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.remove(index); + onChanged(); + } else { + policyResultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder getPolicyResultsBuilder( + int index) { + return getPolicyResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder getPolicyResultsOrBuilder( + int index) { + if (policyResultsBuilder_ == null) { + return policyResults_.get(index); } else { + return policyResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public java.util.List + getPolicyResultsOrBuilderList() { + if (policyResultsBuilder_ != null) { + return policyResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyResults_); + } + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder addPolicyResultsBuilder() { + return getPolicyResultsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance()); + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder addPolicyResultsBuilder( + int index) { + return getPolicyResultsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance()); + } + /** + *
+     * The effective policies for a batch of resources. Note that the results
+     * order is the same as the order of
+     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+     * When a resource does not have any effective IAM policies, its corresponding
+     * policy_result will contain empty
+     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+     * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + public java.util.List + getPolicyResultsBuilderList() { + return getPolicyResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder> + getPolicyResultsFieldBuilder() { + if (policyResultsBuilder_ == null) { + policyResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder>( + policyResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyResults_ = null; + } + return policyResultsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) + private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse(); + } + + public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchGetEffectiveIamPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchGetEffectiveIamPoliciesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..55cd6994abb1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface BatchGetEffectiveIamPoliciesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + java.util.List + getPolicyResultsList(); + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getPolicyResults(int index); + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + int getPolicyResultsCount(); + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + java.util.List + getPolicyResultsOrBuilderList(); + /** + *
+   * The effective policies for a batch of resources. Note that the results
+   * order is the same as the order of
+   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
+   * When a resource does not have any effective IAM policies, its corresponding
+   * policy_result will contain empty
+   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
+   * 
+ * + * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; + */ + com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder getPolicyResultsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java new file mode 100644 index 000000000000..f21e8c3b03ac --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java @@ -0,0 +1,1494 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A BigQuery destination for exporting assets to.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BigQueryDestination} + */ +public final class BigQueryDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BigQueryDestination) + BigQueryDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use BigQueryDestination.newBuilder() to construct. + private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryDestination() { + dataset_ = ""; + table_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + table_ = s; + break; + } + case 24: { + + force_ = input.readBool(); + break; + } + case 34: { + com.google.cloud.asset.v1.PartitionSpec.Builder subBuilder = null; + if (partitionSpec_ != null) { + subBuilder = partitionSpec_.toBuilder(); + } + partitionSpec_ = input.readMessage(com.google.cloud.asset.v1.PartitionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(partitionSpec_); + partitionSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 40: { + + separateTablesPerAssetType_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BigQueryDestination.class, com.google.cloud.asset.v1.BigQueryDestination.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+   * determines the
+   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+   * influences the schema.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+   * determines the
+   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+   * influences the schema.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_FIELD_NUMBER = 2; + private volatile java.lang.Object table_; + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } + } + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_; + /** + *
+   * If the destination table already exists and this flag is `TRUE`, the
+   * table will be overwritten by the contents of assets snapshot. If the flag
+   * is `FALSE` or unset and the destination table already exists, the export
+   * call returns an INVALID_ARGUMEMT error.
+   * 
+ * + * bool force = 3; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + public static final int PARTITION_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.PartitionSpec partitionSpec_; + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + * @return Whether the partitionSpec field is set. + */ + @java.lang.Override + public boolean hasPartitionSpec() { + return partitionSpec_ != null; + } + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + * @return The partitionSpec. + */ + @java.lang.Override + public com.google.cloud.asset.v1.PartitionSpec getPartitionSpec() { + return partitionSpec_ == null ? com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance() : partitionSpec_; + } + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { + return getPartitionSpec(); + } + + public static final int SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER = 5; + private boolean separateTablesPerAssetType_; + /** + *
+   * If this flag is `TRUE`, the snapshot results will be written to one or
+   * multiple tables, each of which contains results of one asset type. The
+   * [force] and [partition_spec] fields will apply to each of them.
+   * Field [table] will be concatenated with "_" and the asset type names (see
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+   * supported asset types) to construct per-asset-type table names, in which
+   * all non-alphanumeric characters like "." and "/" will be substituted by
+   * "_". Example: if field [table] is "mytable" and snapshot results
+   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+   * tables does not exist, a new table with the concatenated name will be
+   * created.
+   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+   * each table will include RECORD-type columns mapped to the nested fields in
+   * the Asset.resource.data field of that asset type (up to the 15 nested level
+   * BigQuery supports
+   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+   * fields in >15 nested levels will be stored in JSON format string as a child
+   * column of its parent RECORD column.
+   * If error occurs when exporting to any table, the whole export call will
+   * return an error but the export results that already succeed will persist.
+   * Example: if exporting to table_type_A succeeds when exporting to
+   * table_type_B fails during one export call, the results in table_type_A will
+   * persist and there will not be partial results persisting in a table.
+   * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return The separateTablesPerAssetType. + */ + @java.lang.Override + public boolean getSeparateTablesPerAssetType() { + return separateTablesPerAssetType_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + if (partitionSpec_ != null) { + output.writeMessage(4, getPartitionSpec()); + } + if (separateTablesPerAssetType_ != false) { + output.writeBool(5, separateTablesPerAssetType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, force_); + } + if (partitionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPartitionSpec()); + } + if (separateTablesPerAssetType_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, separateTablesPerAssetType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.BigQueryDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.BigQueryDestination other = (com.google.cloud.asset.v1.BigQueryDestination) obj; + + if (!getDataset() + .equals(other.getDataset())) return false; + if (!getTable() + .equals(other.getTable())) return false; + if (getForce() + != other.getForce()) return false; + if (hasPartitionSpec() != other.hasPartitionSpec()) return false; + if (hasPartitionSpec()) { + if (!getPartitionSpec() + .equals(other.getPartitionSpec())) return false; + } + if (getSeparateTablesPerAssetType() + != other.getSeparateTablesPerAssetType()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + if (hasPartitionSpec()) { + hash = (37 * hash) + PARTITION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPartitionSpec().hashCode(); + } + hash = (37 * hash) + SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSeparateTablesPerAssetType()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.BigQueryDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A BigQuery destination for exporting assets to.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.BigQueryDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BigQueryDestination) + com.google.cloud.asset.v1.BigQueryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.BigQueryDestination.class, com.google.cloud.asset.v1.BigQueryDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.BigQueryDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + table_ = ""; + + force_ = false; + + if (partitionSpecBuilder_ == null) { + partitionSpec_ = null; + } else { + partitionSpec_ = null; + partitionSpecBuilder_ = null; + } + separateTablesPerAssetType_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination build() { + com.google.cloud.asset.v1.BigQueryDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination buildPartial() { + com.google.cloud.asset.v1.BigQueryDestination result = new com.google.cloud.asset.v1.BigQueryDestination(this); + result.dataset_ = dataset_; + result.table_ = table_; + result.force_ = force_; + if (partitionSpecBuilder_ == null) { + result.partitionSpec_ = partitionSpec_; + } else { + result.partitionSpec_ = partitionSpecBuilder_.build(); + } + result.separateTablesPerAssetType_ = separateTablesPerAssetType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.BigQueryDestination) { + return mergeFrom((com.google.cloud.asset.v1.BigQueryDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.BigQueryDestination other) { + if (other == com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getTable().isEmpty()) { + table_ = other.table_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + if (other.hasPartitionSpec()) { + mergePartitionSpec(other.getPartitionSpec()); + } + if (other.getSeparateTablesPerAssetType() != false) { + setSeparateTablesPerAssetType(other.getSeparateTablesPerAssetType()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.BigQueryDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.BigQueryDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+     * determines the
+     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+     * influences the schema.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+     * determines the
+     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+     * influences the schema.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+     * determines the
+     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+     * influences the schema.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+     * determines the
+     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+     * influences the schema.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+     * determines the
+     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+     * influences the schema.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object table_ = ""; + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + public com.google.protobuf.ByteString + getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + table_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTable() { + + table_ = getDefaultInstance().getTable(); + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + table_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is `FALSE` or unset and the destination table already exists, the export
+     * call returns an INVALID_ARGUMEMT error.
+     * 
+ * + * bool force = 3; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is `FALSE` or unset and the destination table already exists, the export
+     * call returns an INVALID_ARGUMEMT error.
+     * 
+ * + * bool force = 3; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is `FALSE` or unset and the destination table already exists, the export
+     * call returns an INVALID_ARGUMEMT error.
+     * 
+ * + * bool force = 3; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.PartitionSpec partitionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.PartitionSpec, com.google.cloud.asset.v1.PartitionSpec.Builder, com.google.cloud.asset.v1.PartitionSpecOrBuilder> partitionSpecBuilder_; + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + * @return Whether the partitionSpec field is set. + */ + public boolean hasPartitionSpec() { + return partitionSpecBuilder_ != null || partitionSpec_ != null; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + * @return The partitionSpec. + */ + public com.google.cloud.asset.v1.PartitionSpec getPartitionSpec() { + if (partitionSpecBuilder_ == null) { + return partitionSpec_ == null ? com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance() : partitionSpec_; + } else { + return partitionSpecBuilder_.getMessage(); + } + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + public Builder setPartitionSpec(com.google.cloud.asset.v1.PartitionSpec value) { + if (partitionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partitionSpec_ = value; + onChanged(); + } else { + partitionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + public Builder setPartitionSpec( + com.google.cloud.asset.v1.PartitionSpec.Builder builderForValue) { + if (partitionSpecBuilder_ == null) { + partitionSpec_ = builderForValue.build(); + onChanged(); + } else { + partitionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + public Builder mergePartitionSpec(com.google.cloud.asset.v1.PartitionSpec value) { + if (partitionSpecBuilder_ == null) { + if (partitionSpec_ != null) { + partitionSpec_ = + com.google.cloud.asset.v1.PartitionSpec.newBuilder(partitionSpec_).mergeFrom(value).buildPartial(); + } else { + partitionSpec_ = value; + } + onChanged(); + } else { + partitionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + public Builder clearPartitionSpec() { + if (partitionSpecBuilder_ == null) { + partitionSpec_ = null; + onChanged(); + } else { + partitionSpec_ = null; + partitionSpecBuilder_ = null; + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + public com.google.cloud.asset.v1.PartitionSpec.Builder getPartitionSpecBuilder() { + + onChanged(); + return getPartitionSpecFieldBuilder().getBuilder(); + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + public com.google.cloud.asset.v1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { + if (partitionSpecBuilder_ != null) { + return partitionSpecBuilder_.getMessageOrBuilder(); + } else { + return partitionSpec_ == null ? + com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance() : partitionSpec_; + } + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.PartitionSpec, com.google.cloud.asset.v1.PartitionSpec.Builder, com.google.cloud.asset.v1.PartitionSpecOrBuilder> + getPartitionSpecFieldBuilder() { + if (partitionSpecBuilder_ == null) { + partitionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.PartitionSpec, com.google.cloud.asset.v1.PartitionSpec.Builder, com.google.cloud.asset.v1.PartitionSpecOrBuilder>( + getPartitionSpec(), + getParentForChildren(), + isClean()); + partitionSpec_ = null; + } + return partitionSpecBuilder_; + } + + private boolean separateTablesPerAssetType_ ; + /** + *
+     * If this flag is `TRUE`, the snapshot results will be written to one or
+     * multiple tables, each of which contains results of one asset type. The
+     * [force] and [partition_spec] fields will apply to each of them.
+     * Field [table] will be concatenated with "_" and the asset type names (see
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+     * supported asset types) to construct per-asset-type table names, in which
+     * all non-alphanumeric characters like "." and "/" will be substituted by
+     * "_". Example: if field [table] is "mytable" and snapshot results
+     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+     * tables does not exist, a new table with the concatenated name will be
+     * created.
+     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+     * each table will include RECORD-type columns mapped to the nested fields in
+     * the Asset.resource.data field of that asset type (up to the 15 nested level
+     * BigQuery supports
+     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+     * fields in >15 nested levels will be stored in JSON format string as a child
+     * column of its parent RECORD column.
+     * If error occurs when exporting to any table, the whole export call will
+     * return an error but the export results that already succeed will persist.
+     * Example: if exporting to table_type_A succeeds when exporting to
+     * table_type_B fails during one export call, the results in table_type_A will
+     * persist and there will not be partial results persisting in a table.
+     * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return The separateTablesPerAssetType. + */ + @java.lang.Override + public boolean getSeparateTablesPerAssetType() { + return separateTablesPerAssetType_; + } + /** + *
+     * If this flag is `TRUE`, the snapshot results will be written to one or
+     * multiple tables, each of which contains results of one asset type. The
+     * [force] and [partition_spec] fields will apply to each of them.
+     * Field [table] will be concatenated with "_" and the asset type names (see
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+     * supported asset types) to construct per-asset-type table names, in which
+     * all non-alphanumeric characters like "." and "/" will be substituted by
+     * "_". Example: if field [table] is "mytable" and snapshot results
+     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+     * tables does not exist, a new table with the concatenated name will be
+     * created.
+     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+     * each table will include RECORD-type columns mapped to the nested fields in
+     * the Asset.resource.data field of that asset type (up to the 15 nested level
+     * BigQuery supports
+     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+     * fields in >15 nested levels will be stored in JSON format string as a child
+     * column of its parent RECORD column.
+     * If error occurs when exporting to any table, the whole export call will
+     * return an error but the export results that already succeed will persist.
+     * Example: if exporting to table_type_A succeeds when exporting to
+     * table_type_B fails during one export call, the results in table_type_A will
+     * persist and there will not be partial results persisting in a table.
+     * 
+ * + * bool separate_tables_per_asset_type = 5; + * @param value The separateTablesPerAssetType to set. + * @return This builder for chaining. + */ + public Builder setSeparateTablesPerAssetType(boolean value) { + + separateTablesPerAssetType_ = value; + onChanged(); + return this; + } + /** + *
+     * If this flag is `TRUE`, the snapshot results will be written to one or
+     * multiple tables, each of which contains results of one asset type. The
+     * [force] and [partition_spec] fields will apply to each of them.
+     * Field [table] will be concatenated with "_" and the asset type names (see
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+     * supported asset types) to construct per-asset-type table names, in which
+     * all non-alphanumeric characters like "." and "/" will be substituted by
+     * "_". Example: if field [table] is "mytable" and snapshot results
+     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+     * tables does not exist, a new table with the concatenated name will be
+     * created.
+     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+     * each table will include RECORD-type columns mapped to the nested fields in
+     * the Asset.resource.data field of that asset type (up to the 15 nested level
+     * BigQuery supports
+     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+     * fields in >15 nested levels will be stored in JSON format string as a child
+     * column of its parent RECORD column.
+     * If error occurs when exporting to any table, the whole export call will
+     * return an error but the export results that already succeed will persist.
+     * Example: if exporting to table_type_A succeeds when exporting to
+     * table_type_B fails during one export call, the results in table_type_A will
+     * persist and there will not be partial results persisting in a table.
+     * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return This builder for chaining. + */ + public Builder clearSeparateTablesPerAssetType() { + + separateTablesPerAssetType_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BigQueryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BigQueryDestination) + private static final com.google.cloud.asset.v1.BigQueryDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BigQueryDestination(); + } + + public static com.google.cloud.asset.v1.BigQueryDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java new file mode 100644 index 000000000000..2b70f211fc51 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java @@ -0,0 +1,182 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface BigQueryDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BigQueryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+   * determines the
+   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+   * influences the schema.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + java.lang.String getDataset(); + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
+   * determines the
+   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
+   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
+   * influences the schema.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString + getDatasetBytes(); + + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + java.lang.String getTable(); + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + com.google.protobuf.ByteString + getTableBytes(); + + /** + *
+   * If the destination table already exists and this flag is `TRUE`, the
+   * table will be overwritten by the contents of assets snapshot. If the flag
+   * is `FALSE` or unset and the destination table already exists, the export
+   * call returns an INVALID_ARGUMEMT error.
+   * 
+ * + * bool force = 3; + * @return The force. + */ + boolean getForce(); + + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + * @return Whether the partitionSpec field is set. + */ + boolean hasPartitionSpec(); + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + * @return The partitionSpec. + */ + com.google.cloud.asset.v1.PartitionSpec getPartitionSpec(); + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; + */ + com.google.cloud.asset.v1.PartitionSpecOrBuilder getPartitionSpecOrBuilder(); + + /** + *
+   * If this flag is `TRUE`, the snapshot results will be written to one or
+   * multiple tables, each of which contains results of one asset type. The
+   * [force] and [partition_spec] fields will apply to each of them.
+   * Field [table] will be concatenated with "_" and the asset type names (see
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+   * supported asset types) to construct per-asset-type table names, in which
+   * all non-alphanumeric characters like "." and "/" will be substituted by
+   * "_". Example: if field [table] is "mytable" and snapshot results
+   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+   * tables does not exist, a new table with the concatenated name will be
+   * created.
+   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+   * each table will include RECORD-type columns mapped to the nested fields in
+   * the Asset.resource.data field of that asset type (up to the 15 nested level
+   * BigQuery supports
+   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+   * fields in >15 nested levels will be stored in JSON format string as a child
+   * column of its parent RECORD column.
+   * If error occurs when exporting to any table, the whole export call will
+   * return an error but the export results that already succeed will persist.
+   * Example: if exporting to table_type_A succeeds when exporting to
+   * table_type_B fails during one export call, the results in table_type_A will
+   * persist and there will not be partial results persisting in a table.
+   * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return The separateTablesPerAssetType. + */ + boolean getSeparateTablesPerAssetType(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java new file mode 100644 index 000000000000..c3895147a7ef --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * The Condition evaluation.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ConditionEvaluation} + */ +public final class ConditionEvaluation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ConditionEvaluation) + ConditionEvaluationOrBuilder { +private static final long serialVersionUID = 0L; + // Use ConditionEvaluation.newBuilder() to construct. + private ConditionEvaluation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConditionEvaluation() { + evaluationValue_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConditionEvaluation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ConditionEvaluation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + evaluationValue_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ConditionEvaluation.class, com.google.cloud.asset.v1.ConditionEvaluation.Builder.class); + } + + /** + *
+   * Value of this expression.
+   * 
+ * + * Protobuf enum {@code google.cloud.asset.v1.ConditionEvaluation.EvaluationValue} + */ + public enum EvaluationValue + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Reserved for future use.
+     * 
+ * + * EVALUATION_VALUE_UNSPECIFIED = 0; + */ + EVALUATION_VALUE_UNSPECIFIED(0), + /** + *
+     * The evaluation result is `true`.
+     * 
+ * + * TRUE = 1; + */ + TRUE(1), + /** + *
+     * The evaluation result is `false`.
+     * 
+ * + * FALSE = 2; + */ + FALSE(2), + /** + *
+     * The evaluation result is `conditional` when the condition expression
+     * contains variables that are either missing input values or have not been
+     * supported by Analyzer yet.
+     * 
+ * + * CONDITIONAL = 3; + */ + CONDITIONAL(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Reserved for future use.
+     * 
+ * + * EVALUATION_VALUE_UNSPECIFIED = 0; + */ + public static final int EVALUATION_VALUE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The evaluation result is `true`.
+     * 
+ * + * TRUE = 1; + */ + public static final int TRUE_VALUE = 1; + /** + *
+     * The evaluation result is `false`.
+     * 
+ * + * FALSE = 2; + */ + public static final int FALSE_VALUE = 2; + /** + *
+     * The evaluation result is `conditional` when the condition expression
+     * contains variables that are either missing input values or have not been
+     * supported by Analyzer yet.
+     * 
+ * + * CONDITIONAL = 3; + */ + public static final int CONDITIONAL_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EvaluationValue valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EvaluationValue forNumber(int value) { + switch (value) { + case 0: return EVALUATION_VALUE_UNSPECIFIED; + case 1: return TRUE; + case 2: return FALSE; + case 3: return CONDITIONAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EvaluationValue> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EvaluationValue findValueByNumber(int number) { + return EvaluationValue.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1.ConditionEvaluation.getDescriptor().getEnumTypes().get(0); + } + + private static final EvaluationValue[] VALUES = values(); + + public static EvaluationValue valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EvaluationValue(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.ConditionEvaluation.EvaluationValue) + } + + public static final int EVALUATION_VALUE_FIELD_NUMBER = 1; + private int evaluationValue_; + /** + *
+   * The evaluation result.
+   * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @return The enum numeric value on the wire for evaluationValue. + */ + @java.lang.Override public int getEvaluationValueValue() { + return evaluationValue_; + } + /** + *
+   * The evaluation result.
+   * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @return The evaluationValue. + */ + @java.lang.Override public com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue result = com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.valueOf(evaluationValue_); + return result == null ? com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (evaluationValue_ != com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.EVALUATION_VALUE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, evaluationValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (evaluationValue_ != com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.EVALUATION_VALUE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, evaluationValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ConditionEvaluation)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ConditionEvaluation other = (com.google.cloud.asset.v1.ConditionEvaluation) obj; + + if (evaluationValue_ != other.evaluationValue_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EVALUATION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + evaluationValue_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ConditionEvaluation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The Condition evaluation.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ConditionEvaluation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ConditionEvaluation) + com.google.cloud.asset.v1.ConditionEvaluationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ConditionEvaluation.class, com.google.cloud.asset.v1.ConditionEvaluation.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ConditionEvaluation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + evaluationValue_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation build() { + com.google.cloud.asset.v1.ConditionEvaluation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation buildPartial() { + com.google.cloud.asset.v1.ConditionEvaluation result = new com.google.cloud.asset.v1.ConditionEvaluation(this); + result.evaluationValue_ = evaluationValue_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ConditionEvaluation) { + return mergeFrom((com.google.cloud.asset.v1.ConditionEvaluation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ConditionEvaluation other) { + if (other == com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance()) return this; + if (other.evaluationValue_ != 0) { + setEvaluationValueValue(other.getEvaluationValueValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ConditionEvaluation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ConditionEvaluation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int evaluationValue_ = 0; + /** + *
+     * The evaluation result.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @return The enum numeric value on the wire for evaluationValue. + */ + @java.lang.Override public int getEvaluationValueValue() { + return evaluationValue_; + } + /** + *
+     * The evaluation result.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @param value The enum numeric value on the wire for evaluationValue to set. + * @return This builder for chaining. + */ + public Builder setEvaluationValueValue(int value) { + + evaluationValue_ = value; + onChanged(); + return this; + } + /** + *
+     * The evaluation result.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @return The evaluationValue. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue result = com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.valueOf(evaluationValue_); + return result == null ? com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.UNRECOGNIZED : result; + } + /** + *
+     * The evaluation result.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @param value The evaluationValue to set. + * @return This builder for chaining. + */ + public Builder setEvaluationValue(com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue value) { + if (value == null) { + throw new NullPointerException(); + } + + evaluationValue_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The evaluation result.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @return This builder for chaining. + */ + public Builder clearEvaluationValue() { + + evaluationValue_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ConditionEvaluation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ConditionEvaluation) + private static final com.google.cloud.asset.v1.ConditionEvaluation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ConditionEvaluation(); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionEvaluation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConditionEvaluation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java new file mode 100644 index 000000000000..999084a21084 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface ConditionEvaluationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ConditionEvaluation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The evaluation result.
+   * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @return The enum numeric value on the wire for evaluationValue. + */ + int getEvaluationValueValue(); + /** + *
+   * The evaluation result.
+   * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * @return The evaluationValue. + */ + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java new file mode 100644 index 000000000000..9838b22f41bb --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Asset content type.
+ * 
+ * + * Protobuf enum {@code google.cloud.asset.v1.ContentType} + */ +public enum ContentType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + CONTENT_TYPE_UNSPECIFIED(0), + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + RESOURCE(1), + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + IAM_POLICY(2), + /** + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + ORG_POLICY(4), + /** + *
+   * The Cloud Access context manager Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + ACCESS_POLICY(5), + /** + *
+   * The runtime OS Inventory information.
+   * 
+ * + * OS_INVENTORY = 6; + */ + OS_INVENTORY(6), + /** + *
+   * The related resources.
+   * 
+ * + * RELATIONSHIP = 7; + */ + RELATIONSHIP(7), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + public static final int RESOURCE_VALUE = 1; + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + public static final int IAM_POLICY_VALUE = 2; + /** + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + public static final int ORG_POLICY_VALUE = 4; + /** + *
+   * The Cloud Access context manager Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + public static final int ACCESS_POLICY_VALUE = 5; + /** + *
+   * The runtime OS Inventory information.
+   * 
+ * + * OS_INVENTORY = 6; + */ + public static final int OS_INVENTORY_VALUE = 6; + /** + *
+   * The related resources.
+   * 
+ * + * RELATIONSHIP = 7; + */ + public static final int RELATIONSHIP_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContentType forNumber(int value) { + switch (value) { + case 0: return CONTENT_TYPE_UNSPECIFIED; + case 1: return RESOURCE; + case 2: return IAM_POLICY; + case 4: return ORG_POLICY; + case 5: return ACCESS_POLICY; + case 6: return OS_INVENTORY; + case 7: return RELATIONSHIP; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ContentType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ContentType findValueByNumber(int number) { + return ContentType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ContentType[] VALUES = values(); + + public static ContentType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ContentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.ContentType) +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java new file mode 100644 index 000000000000..25f55d41b88b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java @@ -0,0 +1,1068 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Create asset feed request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.CreateFeedRequest} + */ +public final class CreateFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.CreateFeedRequest) + CreateFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateFeedRequest.newBuilder() to construct. + private CreateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateFeedRequest() { + parent_ = ""; + feedId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + feedId_ = s; + break; + } + case 26: { + com.google.cloud.asset.v1.Feed.Builder subBuilder = null; + if (feed_ != null) { + subBuilder = feed_.toBuilder(); + } + feed_ = input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(feed_); + feed_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.CreateFeedRequest.class, com.google.cloud.asset.v1.CreateFeedRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEED_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object feedId_; + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedId. + */ + @java.lang.Override + public java.lang.String getFeedId() { + java.lang.Object ref = feedId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + feedId_ = s; + return s; + } + } + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for feedId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFeedIdBytes() { + java.lang.Object ref = feedId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + feedId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEED_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.Feed feed_; + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be
+   * generated in the format of: projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + @java.lang.Override + public boolean hasFeed() { + return feed_ != null; + } + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be
+   * generated in the format of: projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + @java.lang.Override + public com.google.cloud.asset.v1.Feed getFeed() { + return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; + } + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be
+   * generated in the format of: projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { + return getFeed(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, feedId_); + } + if (feed_ != null) { + output.writeMessage(3, getFeed()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, feedId_); + } + if (feed_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFeed()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.CreateFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.CreateFeedRequest other = (com.google.cloud.asset.v1.CreateFeedRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFeedId() + .equals(other.getFeedId())) return false; + if (hasFeed() != other.hasFeed()) return false; + if (hasFeed()) { + if (!getFeed() + .equals(other.getFeed())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FEED_ID_FIELD_NUMBER; + hash = (53 * hash) + getFeedId().hashCode(); + if (hasFeed()) { + hash = (37 * hash) + FEED_FIELD_NUMBER; + hash = (53 * hash) + getFeed().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.CreateFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Create asset feed request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.CreateFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.CreateFeedRequest) + com.google.cloud.asset.v1.CreateFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.CreateFeedRequest.class, com.google.cloud.asset.v1.CreateFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.CreateFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + feedId_ = ""; + + if (feedBuilder_ == null) { + feed_ = null; + } else { + feed_ = null; + feedBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.CreateFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateFeedRequest build() { + com.google.cloud.asset.v1.CreateFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateFeedRequest buildPartial() { + com.google.cloud.asset.v1.CreateFeedRequest result = new com.google.cloud.asset.v1.CreateFeedRequest(this); + result.parent_ = parent_; + result.feedId_ = feedId_; + if (feedBuilder_ == null) { + result.feed_ = feed_; + } else { + result.feed_ = feedBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.CreateFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1.CreateFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.CreateFeedRequest other) { + if (other == com.google.cloud.asset.v1.CreateFeedRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFeedId().isEmpty()) { + feedId_ = other.feedId_; + onChanged(); + } + if (other.hasFeed()) { + mergeFeed(other.getFeed()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.CreateFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.CreateFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object feedId_ = ""; + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedId. + */ + public java.lang.String getFeedId() { + java.lang.Object ref = feedId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + feedId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for feedId. + */ + public com.google.protobuf.ByteString + getFeedIdBytes() { + java.lang.Object ref = feedId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + feedId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The feedId to set. + * @return This builder for chaining. + */ + public Builder setFeedId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + feedId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearFeedId() { + + feedId_ = getDefaultInstance().getFeedId(); + onChanged(); + return this; + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for feedId to set. + * @return This builder for chaining. + */ + public Builder setFeedIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + feedId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.Feed feed_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> feedBuilder_; + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + public boolean hasFeed() { + return feedBuilder_ != null || feed_ != null; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + public com.google.cloud.asset.v1.Feed getFeed() { + if (feedBuilder_ == null) { + return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; + } else { + return feedBuilder_.getMessage(); + } + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed(com.google.cloud.asset.v1.Feed value) { + if (feedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + feed_ = value; + onChanged(); + } else { + feedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed( + com.google.cloud.asset.v1.Feed.Builder builderForValue) { + if (feedBuilder_ == null) { + feed_ = builderForValue.build(); + onChanged(); + } else { + feedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFeed(com.google.cloud.asset.v1.Feed value) { + if (feedBuilder_ == null) { + if (feed_ != null) { + feed_ = + com.google.cloud.asset.v1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); + } else { + feed_ = value; + } + onChanged(); + } else { + feedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFeed() { + if (feedBuilder_ == null) { + feed_ = null; + onChanged(); + } else { + feed_ = null; + feedBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.Feed.Builder getFeedBuilder() { + + onChanged(); + return getFeedFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { + if (feedBuilder_ != null) { + return feedBuilder_.getMessageOrBuilder(); + } else { + return feed_ == null ? + com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; + } + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be
+     * generated in the format of: projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> + getFeedFieldBuilder() { + if (feedBuilder_ == null) { + feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder>( + getFeed(), + getParentForChildren(), + isClean()); + feed_ = null; + } + return feedBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.CreateFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.CreateFeedRequest) + private static final com.google.cloud.asset.v1.CreateFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.CreateFeedRequest(); + } + + public static com.google.cloud.asset.v1.CreateFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java new file mode 100644 index 000000000000..23948980df5c --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface CreateFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.CreateFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedId. + */ + java.lang.String getFeedId(); + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for feedId. + */ + com.google.protobuf.ByteString + getFeedIdBytes(); + + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be
+   * generated in the format of: projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + boolean hasFeed(); + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be
+   * generated in the format of: projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + com.google.cloud.asset.v1.Feed getFeed(); + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be
+   * generated in the format of: projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java new file mode 100644 index 000000000000..ccbd50c72321 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java @@ -0,0 +1,1079 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Request to create a saved query.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.CreateSavedQueryRequest} + */ +public final class CreateSavedQueryRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.CreateSavedQueryRequest) + CreateSavedQueryRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateSavedQueryRequest.newBuilder() to construct. + private CreateSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateSavedQueryRequest() { + parent_ = ""; + savedQueryId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateSavedQueryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateSavedQueryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.asset.v1.SavedQuery.Builder subBuilder = null; + if (savedQuery_ != null) { + subBuilder = savedQuery_.toBuilder(); + } + savedQuery_ = input.readMessage(com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(savedQuery_); + savedQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + savedQueryId_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.CreateSavedQueryRequest.class, com.google.cloud.asset.v1.CreateSavedQueryRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The name of the project/folder/organization where this
+   * saved_query should be created in. It can only be an organization number
+   * (such as "organizations/123"), a folder number (such as "folders/123"), a
+   * project ID (such as "projects/my-project-id")", or a project number (such
+   * as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The name of the project/folder/organization where this
+   * saved_query should be created in. It can only be an organization number
+   * (such as "organizations/123"), a folder number (such as "folders/123"), a
+   * project ID (such as "projects/my-project-id")", or a project number (such
+   * as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SAVED_QUERY_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.SavedQuery savedQuery_; + /** + *
+   * Required. The saved_query details. The `name` field must be empty as it
+   * will be generated based on the parent and saved_query_id.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the savedQuery field is set. + */ + @java.lang.Override + public boolean hasSavedQuery() { + return savedQuery_ != null; + } + /** + *
+   * Required. The saved_query details. The `name` field must be empty as it
+   * will be generated based on the parent and saved_query_id.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { + return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; + } + /** + *
+   * Required. The saved_query details. The `name` field must be empty as it
+   * will be generated based on the parent and saved_query_id.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { + return getSavedQuery(); + } + + public static final int SAVED_QUERY_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object savedQueryId_; + /** + *
+   * Required. The ID to use for the saved query, which must be unique in the
+   * specified parent. It will become the final component of the saved query's
+   * resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Notice that this field is required in the saved query creation, and the
+   * `name` field of the `saved_query` will be ignored.
+   * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQueryId. + */ + @java.lang.Override + public java.lang.String getSavedQueryId() { + java.lang.Object ref = savedQueryId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + savedQueryId_ = s; + return s; + } + } + /** + *
+   * Required. The ID to use for the saved query, which must be unique in the
+   * specified parent. It will become the final component of the saved query's
+   * resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Notice that this field is required in the saved query creation, and the
+   * `name` field of the `saved_query` will be ignored.
+   * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for savedQueryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSavedQueryIdBytes() { + java.lang.Object ref = savedQueryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + savedQueryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (savedQuery_ != null) { + output.writeMessage(2, getSavedQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedQueryId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedQueryId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (savedQuery_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSavedQuery()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedQueryId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedQueryId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.CreateSavedQueryRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.CreateSavedQueryRequest other = (com.google.cloud.asset.v1.CreateSavedQueryRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasSavedQuery() != other.hasSavedQuery()) return false; + if (hasSavedQuery()) { + if (!getSavedQuery() + .equals(other.getSavedQuery())) return false; + } + if (!getSavedQueryId() + .equals(other.getSavedQueryId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasSavedQuery()) { + hash = (37 * hash) + SAVED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getSavedQuery().hashCode(); + } + hash = (37 * hash) + SAVED_QUERY_ID_FIELD_NUMBER; + hash = (53 * hash) + getSavedQueryId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.CreateSavedQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to create a saved query.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.CreateSavedQueryRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.CreateSavedQueryRequest) + com.google.cloud.asset.v1.CreateSavedQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.CreateSavedQueryRequest.class, com.google.cloud.asset.v1.CreateSavedQueryRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.CreateSavedQueryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (savedQueryBuilder_ == null) { + savedQuery_ = null; + } else { + savedQuery_ = null; + savedQueryBuilder_ = null; + } + savedQueryId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateSavedQueryRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.CreateSavedQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateSavedQueryRequest build() { + com.google.cloud.asset.v1.CreateSavedQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateSavedQueryRequest buildPartial() { + com.google.cloud.asset.v1.CreateSavedQueryRequest result = new com.google.cloud.asset.v1.CreateSavedQueryRequest(this); + result.parent_ = parent_; + if (savedQueryBuilder_ == null) { + result.savedQuery_ = savedQuery_; + } else { + result.savedQuery_ = savedQueryBuilder_.build(); + } + result.savedQueryId_ = savedQueryId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.CreateSavedQueryRequest) { + return mergeFrom((com.google.cloud.asset.v1.CreateSavedQueryRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.CreateSavedQueryRequest other) { + if (other == com.google.cloud.asset.v1.CreateSavedQueryRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasSavedQuery()) { + mergeSavedQuery(other.getSavedQuery()); + } + if (!other.getSavedQueryId().isEmpty()) { + savedQueryId_ = other.savedQueryId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.CreateSavedQueryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.CreateSavedQueryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The name of the project/folder/organization where this
+     * saved_query should be created in. It can only be an organization number
+     * (such as "organizations/123"), a folder number (such as "folders/123"), a
+     * project ID (such as "projects/my-project-id")", or a project number (such
+     * as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the project/folder/organization where this
+     * saved_query should be created in. It can only be an organization number
+     * (such as "organizations/123"), a folder number (such as "folders/123"), a
+     * project ID (such as "projects/my-project-id")", or a project number (such
+     * as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the project/folder/organization where this
+     * saved_query should be created in. It can only be an organization number
+     * (such as "organizations/123"), a folder number (such as "folders/123"), a
+     * project ID (such as "projects/my-project-id")", or a project number (such
+     * as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the project/folder/organization where this
+     * saved_query should be created in. It can only be an organization number
+     * (such as "organizations/123"), a folder number (such as "folders/123"), a
+     * project ID (such as "projects/my-project-id")", or a project number (such
+     * as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the project/folder/organization where this
+     * saved_query should be created in. It can only be an organization number
+     * (such as "organizations/123"), a folder number (such as "folders/123"), a
+     * project ID (such as "projects/my-project-id")", or a project number (such
+     * as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.SavedQuery savedQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> savedQueryBuilder_; + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the savedQuery field is set. + */ + public boolean hasSavedQuery() { + return savedQueryBuilder_ != null || savedQuery_ != null; + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQuery. + */ + public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { + if (savedQueryBuilder_ == null) { + return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; + } else { + return savedQueryBuilder_.getMessage(); + } + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { + if (savedQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + savedQuery_ = value; + onChanged(); + } else { + savedQueryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSavedQuery( + com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { + if (savedQueryBuilder_ == null) { + savedQuery_ = builderForValue.build(); + onChanged(); + } else { + savedQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { + if (savedQueryBuilder_ == null) { + if (savedQuery_ != null) { + savedQuery_ = + com.google.cloud.asset.v1.SavedQuery.newBuilder(savedQuery_).mergeFrom(value).buildPartial(); + } else { + savedQuery_ = value; + } + onChanged(); + } else { + savedQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearSavedQuery() { + if (savedQueryBuilder_ == null) { + savedQuery_ = null; + onChanged(); + } else { + savedQuery_ = null; + savedQueryBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.SavedQuery.Builder getSavedQueryBuilder() { + + onChanged(); + return getSavedQueryFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { + if (savedQueryBuilder_ != null) { + return savedQueryBuilder_.getMessageOrBuilder(); + } else { + return savedQuery_ == null ? + com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; + } + } + /** + *
+     * Required. The saved_query details. The `name` field must be empty as it
+     * will be generated based on the parent and saved_query_id.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> + getSavedQueryFieldBuilder() { + if (savedQueryBuilder_ == null) { + savedQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder>( + getSavedQuery(), + getParentForChildren(), + isClean()); + savedQuery_ = null; + } + return savedQueryBuilder_; + } + + private java.lang.Object savedQueryId_ = ""; + /** + *
+     * Required. The ID to use for the saved query, which must be unique in the
+     * specified parent. It will become the final component of the saved query's
+     * resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Notice that this field is required in the saved query creation, and the
+     * `name` field of the `saved_query` will be ignored.
+     * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQueryId. + */ + public java.lang.String getSavedQueryId() { + java.lang.Object ref = savedQueryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + savedQueryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The ID to use for the saved query, which must be unique in the
+     * specified parent. It will become the final component of the saved query's
+     * resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Notice that this field is required in the saved query creation, and the
+     * `name` field of the `saved_query` will be ignored.
+     * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for savedQueryId. + */ + public com.google.protobuf.ByteString + getSavedQueryIdBytes() { + java.lang.Object ref = savedQueryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + savedQueryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The ID to use for the saved query, which must be unique in the
+     * specified parent. It will become the final component of the saved query's
+     * resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Notice that this field is required in the saved query creation, and the
+     * `name` field of the `saved_query` will be ignored.
+     * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The savedQueryId to set. + * @return This builder for chaining. + */ + public Builder setSavedQueryId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + savedQueryId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the saved query, which must be unique in the
+     * specified parent. It will become the final component of the saved query's
+     * resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Notice that this field is required in the saved query creation, and the
+     * `name` field of the `saved_query` will be ignored.
+     * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearSavedQueryId() { + + savedQueryId_ = getDefaultInstance().getSavedQueryId(); + onChanged(); + return this; + } + /** + *
+     * Required. The ID to use for the saved query, which must be unique in the
+     * specified parent. It will become the final component of the saved query's
+     * resource name.
+     * This value should be 4-63 characters, and valid characters
+     * are /[a-z][0-9]-/.
+     * Notice that this field is required in the saved query creation, and the
+     * `name` field of the `saved_query` will be ignored.
+     * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for savedQueryId to set. + * @return This builder for chaining. + */ + public Builder setSavedQueryIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + savedQueryId_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.CreateSavedQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.CreateSavedQueryRequest) + private static final com.google.cloud.asset.v1.CreateSavedQueryRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.CreateSavedQueryRequest(); + } + + public static com.google.cloud.asset.v1.CreateSavedQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSavedQueryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateSavedQueryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.CreateSavedQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java new file mode 100644 index 000000000000..4bba625d5991 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface CreateSavedQueryRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.CreateSavedQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the project/folder/organization where this
+   * saved_query should be created in. It can only be an organization number
+   * (such as "organizations/123"), a folder number (such as "folders/123"), a
+   * project ID (such as "projects/my-project-id")", or a project number (such
+   * as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The name of the project/folder/organization where this
+   * saved_query should be created in. It can only be an organization number
+   * (such as "organizations/123"), a folder number (such as "folders/123"), a
+   * project ID (such as "projects/my-project-id")", or a project number (such
+   * as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. The saved_query details. The `name` field must be empty as it
+   * will be generated based on the parent and saved_query_id.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the savedQuery field is set. + */ + boolean hasSavedQuery(); + /** + *
+   * Required. The saved_query details. The `name` field must be empty as it
+   * will be generated based on the parent and saved_query_id.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQuery. + */ + com.google.cloud.asset.v1.SavedQuery getSavedQuery(); + /** + *
+   * Required. The saved_query details. The `name` field must be empty as it
+   * will be generated based on the parent and saved_query_id.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder(); + + /** + *
+   * Required. The ID to use for the saved query, which must be unique in the
+   * specified parent. It will become the final component of the saved query's
+   * resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Notice that this field is required in the saved query creation, and the
+   * `name` field of the `saved_query` will be ignored.
+   * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQueryId. + */ + java.lang.String getSavedQueryId(); + /** + *
+   * Required. The ID to use for the saved query, which must be unique in the
+   * specified parent. It will become the final component of the saved query's
+   * resource name.
+   * This value should be 4-63 characters, and valid characters
+   * are /[a-z][0-9]-/.
+   * Notice that this field is required in the saved query creation, and the
+   * `name` field of the `saved_query` will be ignored.
+   * 
+ * + * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for savedQueryId. + */ + com.google.protobuf.ByteString + getSavedQueryIdBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java new file mode 100644 index 000000000000..952a6e51c3ad --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java @@ -0,0 +1,608 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * Protobuf type {@code google.cloud.asset.v1.DeleteFeedRequest} + */ +public final class DeleteFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.DeleteFeedRequest) + DeleteFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteFeedRequest.newBuilder() to construct. + private DeleteFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteFeedRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.DeleteFeedRequest.class, com.google.cloud.asset.v1.DeleteFeedRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.DeleteFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.DeleteFeedRequest other = (com.google.cloud.asset.v1.DeleteFeedRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.DeleteFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.cloud.asset.v1.DeleteFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.DeleteFeedRequest) + com.google.cloud.asset.v1.DeleteFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.DeleteFeedRequest.class, com.google.cloud.asset.v1.DeleteFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.DeleteFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.DeleteFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteFeedRequest build() { + com.google.cloud.asset.v1.DeleteFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteFeedRequest buildPartial() { + com.google.cloud.asset.v1.DeleteFeedRequest result = new com.google.cloud.asset.v1.DeleteFeedRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.DeleteFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1.DeleteFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.DeleteFeedRequest other) { + if (other == com.google.cloud.asset.v1.DeleteFeedRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.DeleteFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.DeleteFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.DeleteFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.DeleteFeedRequest) + private static final com.google.cloud.asset.v1.DeleteFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.DeleteFeedRequest(); + } + + public static com.google.cloud.asset.v1.DeleteFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java new file mode 100644 index 000000000000..cf666128a512 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface DeleteFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.DeleteFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java new file mode 100644 index 000000000000..a294340bebad --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java @@ -0,0 +1,623 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Request to delete a saved query.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.DeleteSavedQueryRequest} + */ +public final class DeleteSavedQueryRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.DeleteSavedQueryRequest) + DeleteSavedQueryRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteSavedQueryRequest.newBuilder() to construct. + private DeleteSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteSavedQueryRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteSavedQueryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteSavedQueryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.DeleteSavedQueryRequest.class, com.google.cloud.asset.v1.DeleteSavedQueryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the saved query to delete. It must be in the format
+   * of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the saved query to delete. It must be in the format
+   * of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.DeleteSavedQueryRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.DeleteSavedQueryRequest other = (com.google.cloud.asset.v1.DeleteSavedQueryRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.DeleteSavedQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to delete a saved query.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.DeleteSavedQueryRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.DeleteSavedQueryRequest) + com.google.cloud.asset.v1.DeleteSavedQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.DeleteSavedQueryRequest.class, com.google.cloud.asset.v1.DeleteSavedQueryRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.DeleteSavedQueryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteSavedQueryRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.DeleteSavedQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteSavedQueryRequest build() { + com.google.cloud.asset.v1.DeleteSavedQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteSavedQueryRequest buildPartial() { + com.google.cloud.asset.v1.DeleteSavedQueryRequest result = new com.google.cloud.asset.v1.DeleteSavedQueryRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.DeleteSavedQueryRequest) { + return mergeFrom((com.google.cloud.asset.v1.DeleteSavedQueryRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.DeleteSavedQueryRequest other) { + if (other == com.google.cloud.asset.v1.DeleteSavedQueryRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.DeleteSavedQueryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.DeleteSavedQueryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the saved query to delete. It must be in the format
+     * of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the saved query to delete. It must be in the format
+     * of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the saved query to delete. It must be in the format
+     * of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the saved query to delete. It must be in the format
+     * of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the saved query to delete. It must be in the format
+     * of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.DeleteSavedQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.DeleteSavedQueryRequest) + private static final com.google.cloud.asset.v1.DeleteSavedQueryRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.DeleteSavedQueryRequest(); + } + + public static com.google.cloud.asset.v1.DeleteSavedQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSavedQueryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteSavedQueryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.DeleteSavedQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java new file mode 100644 index 000000000000..80e6bbfad869 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface DeleteSavedQueryRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.DeleteSavedQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the saved query to delete. It must be in the format
+   * of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the saved query to delete. It must be in the format
+   * of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java new file mode 100644 index 000000000000..b17dc8289139 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java @@ -0,0 +1,2121 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Export asset request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportAssetsRequest} + */ +public final class ExportAssetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ExportAssetsRequest) + ExportAssetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExportAssetsRequest.newBuilder() to construct. + private ExportAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExportAssetsRequest() { + parent_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExportAssetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExportAssetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 42: { + com.google.cloud.asset.v1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.asset.v1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + relationshipTypes_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportAssetsRequest.class, com.google.cloud.asset.v1.ExportAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 4; + private int contentType_; + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1.OutputConfig outputConfig_; + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_; + } + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (readTime_ != null) { + output.writeMessage(2, getReadTime()); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, contentType_); + } + if (outputConfig_ != null) { + output.writeMessage(5, getOutputConfig()); + } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relationshipTypes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadTime()); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, contentType_); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getOutputConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ExportAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ExportAssetsRequest other = (com.google.cloud.asset.v1.ExportAssetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (contentType_ != other.contentType_) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!getRelationshipTypesList() + .equals(other.getRelationshipTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ExportAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Export asset request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportAssetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ExportAssetsRequest) + com.google.cloud.asset.v1.ExportAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportAssetsRequest.class, com.google.cloud.asset.v1.ExportAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ExportAssetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + contentType_ = 0; + + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ExportAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsRequest build() { + com.google.cloud.asset.v1.ExportAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsRequest buildPartial() { + com.google.cloud.asset.v1.ExportAssetsRequest result = new com.google.cloud.asset.v1.ExportAssetsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.contentType_ = contentType_; + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationshipTypes_ = relationshipTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ExportAssetsRequest) { + return mergeFrom((com.google.cloud.asset.v1.ExportAssetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ExportAssetsRequest other) { + if (other == com.google.cloud.asset.v1.ExportAssetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ExportAssetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ExportAssetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes( + java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationshipTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ExportAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ExportAssetsRequest) + private static final com.google.cloud.asset.v1.ExportAssetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ExportAssetsRequest(); + } + + public static com.google.cloud.asset.v1.ExportAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportAssetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..46cabddf1f1e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java @@ -0,0 +1,315 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ExportAssetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ExportAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + com.google.cloud.asset.v1.ContentType getContentType(); + + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + com.google.cloud.asset.v1.OutputConfig getOutputConfig(); + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return A list containing the relationshipTypes. + */ + java.util.List + getRelationshipTypesList(); + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString + getRelationshipTypesBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java new file mode 100644 index 000000000000..ea9e90077ba0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java @@ -0,0 +1,1193 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * The export asset response. This message is returned by the
+ * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+ * method in the returned
+ * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+ * field.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportAssetsResponse} + */ +public final class ExportAssetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ExportAssetsResponse) + ExportAssetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExportAssetsResponse.newBuilder() to construct. + private ExportAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExportAssetsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExportAssetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExportAssetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.asset.v1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.asset.v1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.cloud.asset.v1.OutputResult.Builder subBuilder = null; + if (outputResult_ != null) { + subBuilder = outputResult_.toBuilder(); + } + outputResult_ = input.readMessage(com.google.cloud.asset.v1.OutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputResult_); + outputResult_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportAssetsResponse.class, com.google.cloud.asset.v1.ExportAssetsResponse.Builder.class); + } + + public static final int READ_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.OutputConfig outputConfig_; + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.OutputResult outputResult_; + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + * @return Whether the outputResult field is set. + */ + @java.lang.Override + public boolean hasOutputResult() { + return outputResult_ != null; + } + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + * @return The outputResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1.OutputResult getOutputResult() { + return outputResult_ == null ? com.google.cloud.asset.v1.OutputResult.getDefaultInstance() : outputResult_; + } + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.OutputResultOrBuilder getOutputResultOrBuilder() { + return getOutputResult(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (readTime_ != null) { + output.writeMessage(1, getReadTime()); + } + if (outputConfig_ != null) { + output.writeMessage(2, getOutputConfig()); + } + if (outputResult_ != null) { + output.writeMessage(3, getOutputResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getReadTime()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOutputConfig()); + } + if (outputResult_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getOutputResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ExportAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ExportAssetsResponse other = (com.google.cloud.asset.v1.ExportAssetsResponse) obj; + + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (hasOutputResult() != other.hasOutputResult()) return false; + if (hasOutputResult()) { + if (!getOutputResult() + .equals(other.getOutputResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + if (hasOutputResult()) { + hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getOutputResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ExportAssetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The export asset response. This message is returned by the
+   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+   * method in the returned
+   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+   * field.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportAssetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ExportAssetsResponse) + com.google.cloud.asset.v1.ExportAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportAssetsResponse.class, com.google.cloud.asset.v1.ExportAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ExportAssetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + if (outputResultBuilder_ == null) { + outputResult_ = null; + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ExportAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsResponse build() { + com.google.cloud.asset.v1.ExportAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsResponse buildPartial() { + com.google.cloud.asset.v1.ExportAssetsResponse result = new com.google.cloud.asset.v1.ExportAssetsResponse(this); + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + if (outputResultBuilder_ == null) { + result.outputResult_ = outputResult_; + } else { + result.outputResult_ = outputResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ExportAssetsResponse) { + return mergeFrom((com.google.cloud.asset.v1.ExportAssetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ExportAssetsResponse other) { + if (other == com.google.cloud.asset.v1.ExportAssetsResponse.getDefaultInstance()) return this; + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (other.hasOutputResult()) { + mergeOutputResult(other.getOutputResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ExportAssetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ExportAssetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private com.google.cloud.asset.v1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + * @return The outputConfig. + */ + public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + public Builder mergeOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + public com.google.cloud.asset.v1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private com.google.cloud.asset.v1.OutputResult outputResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputResult, com.google.cloud.asset.v1.OutputResult.Builder, com.google.cloud.asset.v1.OutputResultOrBuilder> outputResultBuilder_; + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + * @return Whether the outputResult field is set. + */ + public boolean hasOutputResult() { + return outputResultBuilder_ != null || outputResult_ != null; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + * @return The outputResult. + */ + public com.google.cloud.asset.v1.OutputResult getOutputResult() { + if (outputResultBuilder_ == null) { + return outputResult_ == null ? com.google.cloud.asset.v1.OutputResult.getDefaultInstance() : outputResult_; + } else { + return outputResultBuilder_.getMessage(); + } + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + public Builder setOutputResult(com.google.cloud.asset.v1.OutputResult value) { + if (outputResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputResult_ = value; + onChanged(); + } else { + outputResultBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + public Builder setOutputResult( + com.google.cloud.asset.v1.OutputResult.Builder builderForValue) { + if (outputResultBuilder_ == null) { + outputResult_ = builderForValue.build(); + onChanged(); + } else { + outputResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + public Builder mergeOutputResult(com.google.cloud.asset.v1.OutputResult value) { + if (outputResultBuilder_ == null) { + if (outputResult_ != null) { + outputResult_ = + com.google.cloud.asset.v1.OutputResult.newBuilder(outputResult_).mergeFrom(value).buildPartial(); + } else { + outputResult_ = value; + } + onChanged(); + } else { + outputResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + public Builder clearOutputResult() { + if (outputResultBuilder_ == null) { + outputResult_ = null; + onChanged(); + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + public com.google.cloud.asset.v1.OutputResult.Builder getOutputResultBuilder() { + + onChanged(); + return getOutputResultFieldBuilder().getBuilder(); + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + public com.google.cloud.asset.v1.OutputResultOrBuilder getOutputResultOrBuilder() { + if (outputResultBuilder_ != null) { + return outputResultBuilder_.getMessageOrBuilder(); + } else { + return outputResult_ == null ? + com.google.cloud.asset.v1.OutputResult.getDefaultInstance() : outputResult_; + } + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputResult, com.google.cloud.asset.v1.OutputResult.Builder, com.google.cloud.asset.v1.OutputResultOrBuilder> + getOutputResultFieldBuilder() { + if (outputResultBuilder_ == null) { + outputResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.OutputResult, com.google.cloud.asset.v1.OutputResult.Builder, com.google.cloud.asset.v1.OutputResultOrBuilder>( + getOutputResult(), + getParentForChildren(), + isClean()); + outputResult_ = null; + } + return outputResultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ExportAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ExportAssetsResponse) + private static final com.google.cloud.asset.v1.ExportAssetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ExportAssetsResponse(); + } + + public static com.google.cloud.asset.v1.ExportAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportAssetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..e3a7e58899ba --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ExportAssetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ExportAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + * @return The outputConfig. + */ + com.google.cloud.asset.v1.OutputConfig getOutputConfig(); + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1.OutputConfig output_config = 2; + */ + com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + * @return Whether the outputResult field is set. + */ + boolean hasOutputResult(); + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + * @return The outputResult. + */ + com.google.cloud.asset.v1.OutputResult getOutputResult(); + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1.OutputResult output_result = 3; + */ + com.google.cloud.asset.v1.OutputResultOrBuilder getOutputResultOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java new file mode 100644 index 000000000000..ae225896ab30 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java @@ -0,0 +1,2446 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * An asset feed used to export asset updates to a destinations.
+ * An asset feed filter controls what updates are exported.
+ * The asset feed must be created within a project, organization, or
+ * folder. Supported destinations are:
+ * Pub/Sub topics.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.Feed} + */ +public final class Feed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.Feed) + FeedOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feed.newBuilder() to construct. + private Feed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feed() { + name_ = ""; + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feed(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feed( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetNames_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + assetTypes_.add(s); + break; + } + case 32: { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 42: { + com.google.cloud.asset.v1.FeedOutputConfig.Builder subBuilder = null; + if (feedOutputConfig_ != null) { + subBuilder = feedOutputConfig_.toBuilder(); + } + feedOutputConfig_ = input.readMessage(com.google.cloud.asset.v1.FeedOutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(feedOutputConfig_); + feedOutputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.type.Expr.Builder subBuilder = null; + if (condition_ != null) { + subBuilder = condition_.toBuilder(); + } + condition_ = input.readMessage(com.google.type.Expr.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(condition_); + condition_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + relationshipTypes_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetNames_ = assetNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.Feed.class, com.google.cloud.asset.v1.Feed.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList assetNames_; + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + public com.google.protobuf.ProtocolStringList + getAssetNamesList() { + return assetNames_; + } + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + public int getAssetNamesCount() { + return assetNames_.size(); + } + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + public java.lang.String getAssetNames(int index) { + return assetNames_.get(index); + } + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + public com.google.protobuf.ByteString + getAssetNamesBytes(int index) { + return assetNames_.getByteString(index); + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 4; + private int contentType_; + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + + public static final int FEED_OUTPUT_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1.FeedOutputConfig feedOutputConfig_; + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feedOutputConfig field is set. + */ + @java.lang.Override + public boolean hasFeedOutputConfig() { + return feedOutputConfig_ != null; + } + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedOutputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig() { + return feedOutputConfig_ == null ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; + } + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { + return getFeedOutputConfig(); + } + + public static final int CONDITION_FIELD_NUMBER = 6; + private com.google.type.Expr condition_; + /** + *
+   * A condition which determines whether an asset update should be published.
+   * If specified, an asset will be returned only when the expression evaluates
+   * to true.
+   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+   * (https://github.com/google/cel-spec) on a TemporalAsset with name
+   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+   * == true") will only publish Asset deletions. Other fields of `Expr` are
+   * optional.
+   * See our [user
+   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+   * for detailed instructions.
+   * 
+ * + * .google.type.Expr condition = 6; + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return condition_ != null; + } + /** + *
+   * A condition which determines whether an asset update should be published.
+   * If specified, an asset will be returned only when the expression evaluates
+   * to true.
+   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+   * (https://github.com/google/cel-spec) on a TemporalAsset with name
+   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+   * == true") will only publish Asset deletions. Other fields of `Expr` are
+   * optional.
+   * See our [user
+   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+   * for detailed instructions.
+   * 
+ * + * .google.type.Expr condition = 6; + * @return The condition. + */ + @java.lang.Override + public com.google.type.Expr getCondition() { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } + /** + *
+   * A condition which determines whether an asset update should be published.
+   * If specified, an asset will be returned only when the expression evaluates
+   * to true.
+   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+   * (https://github.com/google/cel-spec) on a TemporalAsset with name
+   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+   * == true") will only publish Asset deletions. Other fields of `Expr` are
+   * optional.
+   * See our [user
+   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+   * for detailed instructions.
+   * 
+ * + * .google.type.Expr condition = 6; + */ + @java.lang.Override + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + return getCondition(); + } + + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_; + } + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < assetNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i)); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, contentType_); + } + if (feedOutputConfig_ != null) { + output.writeMessage(5, getFeedOutputConfig()); + } + if (condition_ != null) { + output.writeMessage(6, getCondition()); + } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < assetNames_.size(); i++) { + dataSize += computeStringSizeNoTag(assetNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, contentType_); + } + if (feedOutputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getFeedOutputConfig()); + } + if (condition_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCondition()); + } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.Feed)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.Feed other = (com.google.cloud.asset.v1.Feed) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAssetNamesList() + .equals(other.getAssetNamesList())) return false; + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (contentType_ != other.contentType_) return false; + if (hasFeedOutputConfig() != other.hasFeedOutputConfig()) return false; + if (hasFeedOutputConfig()) { + if (!getFeedOutputConfig() + .equals(other.getFeedOutputConfig())) return false; + } + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition() + .equals(other.getCondition())) return false; + } + if (!getRelationshipTypesList() + .equals(other.getRelationshipTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getAssetNamesCount() > 0) { + hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAssetNamesList().hashCode(); + } + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + if (hasFeedOutputConfig()) { + hash = (37 * hash) + FEED_OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFeedOutputConfig().hashCode(); + } + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.Feed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Feed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Feed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Feed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Feed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Feed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Feed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Feed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.Feed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Feed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.Feed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Feed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.Feed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset feed used to export asset updates to a destinations.
+   * An asset feed filter controls what updates are exported.
+   * The asset feed must be created within a project, organization, or
+   * folder. Supported destinations are:
+   * Pub/Sub topics.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.Feed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.Feed) + com.google.cloud.asset.v1.FeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.Feed.class, com.google.cloud.asset.v1.Feed.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.Feed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + contentType_ = 0; + + if (feedOutputConfigBuilder_ == null) { + feedOutputConfig_ = null; + } else { + feedOutputConfig_ = null; + feedOutputConfigBuilder_ = null; + } + if (conditionBuilder_ == null) { + condition_ = null; + } else { + condition_ = null; + conditionBuilder_ = null; + } + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Feed getDefaultInstanceForType() { + return com.google.cloud.asset.v1.Feed.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.Feed build() { + com.google.cloud.asset.v1.Feed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Feed buildPartial() { + com.google.cloud.asset.v1.Feed result = new com.google.cloud.asset.v1.Feed(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + assetNames_ = assetNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetNames_ = assetNames_; + if (((bitField0_ & 0x00000002) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.assetTypes_ = assetTypes_; + result.contentType_ = contentType_; + if (feedOutputConfigBuilder_ == null) { + result.feedOutputConfig_ = feedOutputConfig_; + } else { + result.feedOutputConfig_ = feedOutputConfigBuilder_.build(); + } + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + if (((bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.relationshipTypes_ = relationshipTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.Feed) { + return mergeFrom((com.google.cloud.asset.v1.Feed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.Feed other) { + if (other == com.google.cloud.asset.v1.Feed.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.assetNames_.isEmpty()) { + if (assetNames_.isEmpty()) { + assetNames_ = other.assetNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetNamesIsMutable(); + assetNames_.addAll(other.assetNames_); + } + onChanged(); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.hasFeedOutputConfig()) { + mergeFeedOutputConfig(other.getFeedOutputConfig()); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.Feed parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.Feed) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + public com.google.protobuf.ProtocolStringList + getAssetNamesList() { + return assetNames_.getUnmodifiableView(); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + public int getAssetNamesCount() { + return assetNames_.size(); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + public java.lang.String getAssetNames(int index) { + return assetNames_.get(index); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + public com.google.protobuf.ByteString + getAssetNamesBytes(int index) { + return assetNames_.getByteString(index); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index to set the value at. + * @param value The assetNames to set. + * @return This builder for chaining. + */ + public Builder setAssetNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetNamesIsMutable(); + assetNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @param value The assetNames to add. + * @return This builder for chaining. + */ + public Builder addAssetNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetNamesIsMutable(); + assetNames_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @param values The assetNames to add. + * @return This builder for chaining. + */ + public Builder addAllAssetNames( + java.lang.Iterable values) { + ensureAssetNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetNames_); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @return This builder for chaining. + */ + public Builder clearAssetNames() { + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * For a list of the full names for supported asset types, see [Resource
+     * name format](/asset-inventory/docs/resource-name-format).
+     * 
+ * + * repeated string asset_names = 2; + * @param value The bytes of the assetNames to add. + * @return This builder for chaining. + */ + public Builder addAssetNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetNamesIsMutable(); + assetNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names or asset_types are exported to the feed.
+     * Example: `"compute.googleapis.com/Disk"`
+     * For a list of all supported asset types, see
+     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+     * 
+ * + * repeated string asset_types = 3; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.FeedOutputConfig feedOutputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.FeedOutputConfig, com.google.cloud.asset.v1.FeedOutputConfig.Builder, com.google.cloud.asset.v1.FeedOutputConfigOrBuilder> feedOutputConfigBuilder_; + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feedOutputConfig field is set. + */ + public boolean hasFeedOutputConfig() { + return feedOutputConfigBuilder_ != null || feedOutputConfig_ != null; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedOutputConfig. + */ + public com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig() { + if (feedOutputConfigBuilder_ == null) { + return feedOutputConfig_ == null ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; + } else { + return feedOutputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeedOutputConfig(com.google.cloud.asset.v1.FeedOutputConfig value) { + if (feedOutputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + feedOutputConfig_ = value; + onChanged(); + } else { + feedOutputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeedOutputConfig( + com.google.cloud.asset.v1.FeedOutputConfig.Builder builderForValue) { + if (feedOutputConfigBuilder_ == null) { + feedOutputConfig_ = builderForValue.build(); + onChanged(); + } else { + feedOutputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1.FeedOutputConfig value) { + if (feedOutputConfigBuilder_ == null) { + if (feedOutputConfig_ != null) { + feedOutputConfig_ = + com.google.cloud.asset.v1.FeedOutputConfig.newBuilder(feedOutputConfig_).mergeFrom(value).buildPartial(); + } else { + feedOutputConfig_ = value; + } + onChanged(); + } else { + feedOutputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFeedOutputConfig() { + if (feedOutputConfigBuilder_ == null) { + feedOutputConfig_ = null; + onChanged(); + } else { + feedOutputConfig_ = null; + feedOutputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.FeedOutputConfig.Builder getFeedOutputConfigBuilder() { + + onChanged(); + return getFeedOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { + if (feedOutputConfigBuilder_ != null) { + return feedOutputConfigBuilder_.getMessageOrBuilder(); + } else { + return feedOutputConfig_ == null ? + com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; + } + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.FeedOutputConfig, com.google.cloud.asset.v1.FeedOutputConfig.Builder, com.google.cloud.asset.v1.FeedOutputConfigOrBuilder> + getFeedOutputConfigFieldBuilder() { + if (feedOutputConfigBuilder_ == null) { + feedOutputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.FeedOutputConfig, com.google.cloud.asset.v1.FeedOutputConfig.Builder, com.google.cloud.asset.v1.FeedOutputConfigOrBuilder>( + getFeedOutputConfig(), + getParentForChildren(), + isClean()); + feedOutputConfig_ = null; + } + return feedOutputConfigBuilder_; + } + + private com.google.type.Expr condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> conditionBuilder_; + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return conditionBuilder_ != null || condition_ != null; + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + * @return The condition. + */ + public com.google.type.Expr getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + */ + public Builder setCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + */ + public Builder setCondition( + com.google.type.Expr.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + */ + public Builder mergeCondition(com.google.type.Expr value) { + if (conditionBuilder_ == null) { + if (condition_ != null) { + condition_ = + com.google.type.Expr.newBuilder(condition_).mergeFrom(value).buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + */ + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = null; + onChanged(); + } else { + condition_ = null; + conditionBuilder_ = null; + } + + return this; + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + */ + public com.google.type.Expr.Builder getConditionBuilder() { + + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + */ + public com.google.type.ExprOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null ? + com.google.type.Expr.getDefaultInstance() : condition_; + } + } + /** + *
+     * A condition which determines whether an asset update should be published.
+     * If specified, an asset will be returned only when the expression evaluates
+     * to true.
+     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+     * (https://github.com/google/cel-spec) on a TemporalAsset with name
+     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+     * == true") will only publish Asset deletions. Other fields of `Expr` are
+     * optional.
+     * See our [user
+     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+     * for detailed instructions.
+     * 
+ * + * .google.type.Expr condition = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( + getCondition(), + getParentForChildren(), + isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes( + java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationshipTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.Feed) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Feed) + private static final com.google.cloud.asset.v1.Feed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.Feed(); + } + + public static com.google.cloud.asset.v1.Feed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feed(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Feed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java new file mode 100644 index 000000000000..7257fbdabebd --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java @@ -0,0 +1,368 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FeedName implements ResourceName { + private static final PathTemplate PROJECT_FEED = + PathTemplate.createWithoutUrlEncoding("projects/{project}/feeds/{feed}"); + private static final PathTemplate FOLDER_FEED = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/feeds/{feed}"); + private static final PathTemplate ORGANIZATION_FEED = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/feeds/{feed}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String feed; + private final String folder; + private final String organization; + + @Deprecated + protected FeedName() { + project = null; + feed = null; + folder = null; + organization = null; + } + + private FeedName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + feed = Preconditions.checkNotNull(builder.getFeed()); + folder = null; + organization = null; + pathTemplate = PROJECT_FEED; + } + + private FeedName(FolderFeedBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + feed = Preconditions.checkNotNull(builder.getFeed()); + project = null; + organization = null; + pathTemplate = FOLDER_FEED; + } + + private FeedName(OrganizationFeedBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + feed = Preconditions.checkNotNull(builder.getFeed()); + project = null; + folder = null; + pathTemplate = ORGANIZATION_FEED; + } + + public String getProject() { + return project; + } + + public String getFeed() { + return feed; + } + + public String getFolder() { + return folder; + } + + public String getOrganization() { + return organization; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectFeedBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderFeedBuilder newFolderFeedBuilder() { + return new FolderFeedBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationFeedBuilder newOrganizationFeedBuilder() { + return new OrganizationFeedBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FeedName of(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeedName ofProjectFeedName(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeedName ofFolderFeedName(String folder, String feed) { + return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeedName ofOrganizationFeedName(String organization, String feed) { + return newOrganizationFeedBuilder().setOrganization(organization).setFeed(feed).build(); + } + + public static String format(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectFeedName(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderFeedName(String folder, String feed) { + return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationFeedName(String organization, String feed) { + return newOrganizationFeedBuilder() + .setOrganization(organization) + .setFeed(feed) + .build() + .toString(); + } + + public static FeedName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_FEED.matches(formattedString)) { + Map matchMap = PROJECT_FEED.match(formattedString); + return ofProjectFeedName(matchMap.get("project"), matchMap.get("feed")); + } else if (FOLDER_FEED.matches(formattedString)) { + Map matchMap = FOLDER_FEED.match(formattedString); + return ofFolderFeedName(matchMap.get("folder"), matchMap.get("feed")); + } else if (ORGANIZATION_FEED.matches(formattedString)) { + Map matchMap = ORGANIZATION_FEED.match(formattedString); + return ofOrganizationFeedName(matchMap.get("organization"), matchMap.get("feed")); + } + throw new ValidationException("FeedName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FeedName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_FEED.matches(formattedString) + || FOLDER_FEED.matches(formattedString) + || ORGANIZATION_FEED.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (feed != null) { + fieldMapBuilder.put("feed", feed); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + FeedName that = ((FeedName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.feed, that.feed) + && Objects.equals(this.folder, that.folder) + && Objects.equals(this.organization, that.organization); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(feed); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(organization); + return h; + } + + /** Builder for projects/{project}/feeds/{feed}. */ + public static class Builder { + private String project; + private String feed; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getFeed() { + return feed; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setFeed(String feed) { + this.feed = feed; + return this; + } + + private Builder(FeedName feedName) { + Preconditions.checkArgument( + Objects.equals(feedName.pathTemplate, PROJECT_FEED), + "toBuilder is only supported when FeedName has the pattern of projects/{project}/feeds/{feed}"); + this.project = feedName.project; + this.feed = feedName.feed; + } + + public FeedName build() { + return new FeedName(this); + } + } + + /** Builder for folders/{folder}/feeds/{feed}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderFeedBuilder { + private String folder; + private String feed; + + protected FolderFeedBuilder() {} + + public String getFolder() { + return folder; + } + + public String getFeed() { + return feed; + } + + public FolderFeedBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderFeedBuilder setFeed(String feed) { + this.feed = feed; + return this; + } + + public FeedName build() { + return new FeedName(this); + } + } + + /** Builder for organizations/{organization}/feeds/{feed}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationFeedBuilder { + private String organization; + private String feed; + + protected OrganizationFeedBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getFeed() { + return feed; + } + + public OrganizationFeedBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationFeedBuilder setFeed(String feed) { + this.feed = feed; + return this; + } + + public FeedName build() { + return new FeedName(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java new file mode 100644 index 000000000000..1086910dc923 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java @@ -0,0 +1,374 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface FeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.Feed) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + java.util.List + getAssetNamesList(); + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + int getAssetNamesCount(); + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + java.lang.String getAssetNames(int index); + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * For a list of the full names for supported asset types, see [Resource
+   * name format](/asset-inventory/docs/resource-name-format).
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + com.google.protobuf.ByteString + getAssetNamesBytes(int index); + + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names or asset_types are exported to the feed.
+   * Example: `"compute.googleapis.com/Disk"`
+   * For a list of all supported asset types, see
+   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + com.google.cloud.asset.v1.ContentType getContentType(); + + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feedOutputConfig field is set. + */ + boolean hasFeedOutputConfig(); + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedOutputConfig. + */ + com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig(); + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder(); + + /** + *
+   * A condition which determines whether an asset update should be published.
+   * If specified, an asset will be returned only when the expression evaluates
+   * to true.
+   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+   * (https://github.com/google/cel-spec) on a TemporalAsset with name
+   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+   * == true") will only publish Asset deletions. Other fields of `Expr` are
+   * optional.
+   * See our [user
+   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+   * for detailed instructions.
+   * 
+ * + * .google.type.Expr condition = 6; + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + *
+   * A condition which determines whether an asset update should be published.
+   * If specified, an asset will be returned only when the expression evaluates
+   * to true.
+   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+   * (https://github.com/google/cel-spec) on a TemporalAsset with name
+   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+   * == true") will only publish Asset deletions. Other fields of `Expr` are
+   * optional.
+   * See our [user
+   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+   * for detailed instructions.
+   * 
+ * + * .google.type.Expr condition = 6; + * @return The condition. + */ + com.google.type.Expr getCondition(); + /** + *
+   * A condition which determines whether an asset update should be published.
+   * If specified, an asset will be returned only when the expression evaluates
+   * to true.
+   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
+   * (https://github.com/google/cel-spec) on a TemporalAsset with name
+   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
+   * == true") will only publish Asset deletions. Other fields of `Expr` are
+   * optional.
+   * See our [user
+   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
+   * for detailed instructions.
+   * 
+ * + * .google.type.Expr condition = 6; + */ + com.google.type.ExprOrBuilder getConditionOrBuilder(); + + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return A list containing the relationshipTypes. + */ + java.util.List + getRelationshipTypesList(); + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString + getRelationshipTypesBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java new file mode 100644 index 000000000000..3d2fbe6ed4f3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Output configuration for asset feed destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.FeedOutputConfig} + */ +public final class FeedOutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.FeedOutputConfig) + FeedOutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use FeedOutputConfig.newBuilder() to construct. + private FeedOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeedOutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeedOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeedOutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.PubsubDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1.PubsubDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1.PubsubDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.PubsubDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.FeedOutputConfig.class, com.google.cloud.asset.v1.FeedOutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBSUB_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: return PUBSUB_DESTINATION; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int PUBSUB_DESTINATION_FIELD_NUMBER = 1; + /** + *
+   * Destination on Pub/Sub.
+   * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + * @return Whether the pubsubDestination field is set. + */ + @java.lang.Override + public boolean hasPubsubDestination() { + return destinationCase_ == 1; + } + /** + *
+   * Destination on Pub/Sub.
+   * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + * @return The pubsubDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestination getPubsubDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); + } + /** + *
+   * Destination on Pub/Sub.
+   * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1.PubsubDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1.PubsubDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.FeedOutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.FeedOutputConfig other = (com.google.cloud.asset.v1.FeedOutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getPubsubDestination() + .equals(other.getPubsubDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + PUBSUB_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getPubsubDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.FeedOutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output configuration for asset feed destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.FeedOutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.FeedOutputConfig) + com.google.cloud.asset.v1.FeedOutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.FeedOutputConfig.class, com.google.cloud.asset.v1.FeedOutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.FeedOutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.FeedOutputConfig build() { + com.google.cloud.asset.v1.FeedOutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.FeedOutputConfig buildPartial() { + com.google.cloud.asset.v1.FeedOutputConfig result = new com.google.cloud.asset.v1.FeedOutputConfig(this); + if (destinationCase_ == 1) { + if (pubsubDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = pubsubDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.FeedOutputConfig) { + return mergeFrom((com.google.cloud.asset.v1.FeedOutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.FeedOutputConfig other) { + if (other == com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case PUBSUB_DESTINATION: { + mergePubsubDestination(other.getPubsubDestination()); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.FeedOutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.FeedOutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.PubsubDestination, com.google.cloud.asset.v1.PubsubDestination.Builder, com.google.cloud.asset.v1.PubsubDestinationOrBuilder> pubsubDestinationBuilder_; + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + * @return Whether the pubsubDestination field is set. + */ + @java.lang.Override + public boolean hasPubsubDestination() { + return destinationCase_ == 1; + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + * @return The pubsubDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestination getPubsubDestination() { + if (pubsubDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return pubsubDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + public Builder setPubsubDestination(com.google.cloud.asset.v1.PubsubDestination value) { + if (pubsubDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + pubsubDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + public Builder setPubsubDestination( + com.google.cloud.asset.v1.PubsubDestination.Builder builderForValue) { + if (pubsubDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + pubsubDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + public Builder mergePubsubDestination(com.google.cloud.asset.v1.PubsubDestination value) { + if (pubsubDestinationBuilder_ == null) { + if (destinationCase_ == 1 && + destination_ != com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1.PubsubDestination.newBuilder((com.google.cloud.asset.v1.PubsubDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + pubsubDestinationBuilder_.mergeFrom(value); + } else { + pubsubDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + public Builder clearPubsubDestination() { + if (pubsubDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + pubsubDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + public com.google.cloud.asset.v1.PubsubDestination.Builder getPubsubDestinationBuilder() { + return getPubsubDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { + if ((destinationCase_ == 1) && (pubsubDestinationBuilder_ != null)) { + return pubsubDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Pub/Sub.
+     * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.PubsubDestination, com.google.cloud.asset.v1.PubsubDestination.Builder, com.google.cloud.asset.v1.PubsubDestinationOrBuilder> + getPubsubDestinationFieldBuilder() { + if (pubsubDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); + } + pubsubDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.PubsubDestination, com.google.cloud.asset.v1.PubsubDestination.Builder, com.google.cloud.asset.v1.PubsubDestinationOrBuilder>( + (com.google.cloud.asset.v1.PubsubDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged();; + return pubsubDestinationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.FeedOutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.FeedOutputConfig) + private static final com.google.cloud.asset.v1.FeedOutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.FeedOutputConfig(); + } + + public static com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeedOutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeedOutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java new file mode 100644 index 000000000000..ac8bae6335c6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface FeedOutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.FeedOutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Destination on Pub/Sub.
+   * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + * @return Whether the pubsubDestination field is set. + */ + boolean hasPubsubDestination(); + /** + *
+   * Destination on Pub/Sub.
+   * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + * @return The pubsubDestination. + */ + com.google.cloud.asset.v1.PubsubDestination getPubsubDestination(); + /** + *
+   * Destination on Pub/Sub.
+   * 
+ * + * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; + */ + com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder(); + + public com.google.cloud.asset.v1.FeedOutputConfig.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java new file mode 100644 index 000000000000..e4f3b3981b86 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FolderName implements ResourceName { + private static final PathTemplate FOLDER = + PathTemplate.createWithoutUrlEncoding("folders/{folder}"); + private volatile Map fieldValuesMap; + private final String folder; + + @Deprecated + protected FolderName() { + folder = null; + } + + private FolderName(Builder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + } + + public String getFolder() { + return folder; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FolderName of(String folder) { + return newBuilder().setFolder(folder).build(); + } + + public static String format(String folder) { + return newBuilder().setFolder(folder).build().toString(); + } + + public static FolderName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + FOLDER.validatedMatch( + formattedString, "FolderName.parse: formattedString not in valid format"); + return of(matchMap.get("folder")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FolderName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return FOLDER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return FOLDER.instantiate("folder", folder); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + FolderName that = ((FolderName) o); + return Objects.equals(this.folder, that.folder); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(folder); + return h; + } + + /** Builder for folders/{folder}. */ + public static class Builder { + private String folder; + + protected Builder() {} + + public String getFolder() { + return folder; + } + + public Builder setFolder(String folder) { + this.folder = folder; + return this; + } + + private Builder(FolderName folderName) { + this.folder = folderName.folder; + } + + public FolderName build() { + return new FolderName(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java new file mode 100644 index 000000000000..be616ac0aeb3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java @@ -0,0 +1,1065 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A Cloud Storage location.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GcsDestination} + */ +public final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GcsDestination) + GcsDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 1; + objectUri_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 2; + objectUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GcsDestination.class, com.google.cloud.asset.v1.GcsDestination.Builder.class); + } + + private int objectUriCase_ = 0; + private java.lang.Object objectUri_; + public enum ObjectUriCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + URI(1), + URI_PREFIX(2), + OBJECTURI_NOT_SET(0); + private final int value; + private ObjectUriCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ObjectUriCase valueOf(int value) { + return forNumber(value); + } + + public static ObjectUriCase forNumber(int value) { + switch (value) { + case 1: return URI; + case 2: return URI_PREFIX; + case 0: return OBJECTURI_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ObjectUriCase + getObjectUriCase() { + return ObjectUriCase.forNumber( + objectUriCase_); + } + + public static final int URI_FIELD_NUMBER = 1; + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * If the specified Cloud Storage object already exists and there is no
+   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+   * overwritten with the exported result.
+   * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return objectUriCase_ == 1; + } + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * If the specified Cloud Storage object already exists and there is no
+   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+   * overwritten with the exported result.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 1) { + objectUri_ = s; + } + return s; + } + } + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * If the specified Cloud Storage object already exists and there is no
+   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+   * overwritten with the exported result.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 1) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_PREFIX_FIELD_NUMBER = 2; + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return Whether the uriPrefix field is set. + */ + public boolean hasUriPrefix() { + return objectUriCase_ == 2; + } + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The uriPrefix. + */ + public java.lang.String getUriPrefix() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 2) { + objectUri_ = s; + } + return s; + } + } + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The bytes for uriPrefix. + */ + public com.google.protobuf.ByteString + getUriPrefixBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 2) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (objectUriCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); + } + if (objectUriCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (objectUriCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); + } + if (objectUriCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.GcsDestination other = (com.google.cloud.asset.v1.GcsDestination) obj; + + if (!getObjectUriCase().equals(other.getObjectUriCase())) return false; + switch (objectUriCase_) { + case 1: + if (!getUri() + .equals(other.getUri())) return false; + break; + case 2: + if (!getUriPrefix() + .equals(other.getUriPrefix())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (objectUriCase_) { + case 1: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 2: + hash = (37 * hash) + URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getUriPrefix().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Cloud Storage location.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GcsDestination) + com.google.cloud.asset.v1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GcsDestination.class, com.google.cloud.asset.v1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + objectUriCase_ = 0; + objectUri_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestination build() { + com.google.cloud.asset.v1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestination buildPartial() { + com.google.cloud.asset.v1.GcsDestination result = new com.google.cloud.asset.v1.GcsDestination(this); + if (objectUriCase_ == 1) { + result.objectUri_ = objectUri_; + } + if (objectUriCase_ == 2) { + result.objectUri_ = objectUri_; + } + result.objectUriCase_ = objectUriCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.GcsDestination) { + return mergeFrom((com.google.cloud.asset.v1.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.GcsDestination other) { + if (other == com.google.cloud.asset.v1.GcsDestination.getDefaultInstance()) return this; + switch (other.getObjectUriCase()) { + case URI: { + objectUriCase_ = 1; + objectUri_ = other.objectUri_; + onChanged(); + break; + } + case URI_PREFIX: { + objectUriCase_ = 2; + objectUri_ = other.objectUri_; + onChanged(); + break; + } + case OBJECTURI_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int objectUriCase_ = 0; + private java.lang.Object objectUri_; + public ObjectUriCase + getObjectUriCase() { + return ObjectUriCase.forNumber( + objectUriCase_); + } + + public Builder clearObjectUri() { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + return this; + } + + + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the exported result.
+     * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return objectUriCase_ == 1; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the exported result.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 1) { + objectUri_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the exported result.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 1) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the exported result.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + objectUriCase_ = 1; + objectUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the exported result.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + if (objectUriCase_ == 1) { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the exported result.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + objectUriCase_ = 1; + objectUri_ = value; + onChanged(); + return this; + } + + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return Whether the uriPrefix field is set. + */ + @java.lang.Override + public boolean hasUriPrefix() { + return objectUriCase_ == 2; + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return The uriPrefix. + */ + @java.lang.Override + public java.lang.String getUriPrefix() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 2) { + objectUri_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return The bytes for uriPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriPrefixBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 2) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @param value The uriPrefix to set. + * @return This builder for chaining. + */ + public Builder setUriPrefix( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + objectUriCase_ = 2; + objectUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return This builder for chaining. + */ + public Builder clearUriPrefix() { + if (objectUriCase_ == 2) { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @param value The bytes for uriPrefix to set. + * @return This builder for chaining. + */ + public Builder setUriPrefixBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + objectUriCase_ = 2; + objectUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GcsDestination) + private static final com.google.cloud.asset.v1.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GcsDestination(); + } + + public static com.google.cloud.asset.v1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..7fef46dc7c32 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * If the specified Cloud Storage object already exists and there is no
+   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+   * overwritten with the exported result.
+   * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + boolean hasUri(); + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * If the specified Cloud Storage object already exists and there is no
+   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+   * overwritten with the exported result.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * If the specified Cloud Storage object already exists and there is no
+   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+   * overwritten with the exported result.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return Whether the uriPrefix field is set. + */ + boolean hasUriPrefix(); + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The uriPrefix. + */ + java.lang.String getUriPrefix(); + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The bytes for uriPrefix. + */ + com.google.protobuf.ByteString + getUriPrefixBytes(); + + public com.google.cloud.asset.v1.GcsDestination.ObjectUriCase getObjectUriCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java new file mode 100644 index 000000000000..42618d6ddd9d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java @@ -0,0 +1,689 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A Cloud Storage output result.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GcsOutputResult} + */ +public final class GcsOutputResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GcsOutputResult) + GcsOutputResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsOutputResult.newBuilder() to construct. + private GcsOutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsOutputResult() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsOutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsOutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + uris_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + uris_ = uris_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GcsOutputResult.class, com.google.cloud.asset.v1.GcsOutputResult.Builder.class); + } + + public static final int URIS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList uris_; + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList + getUrisList() { + return uris_; + } + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString + getUrisBytes(int index) { + return uris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.GcsOutputResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.GcsOutputResult other = (com.google.cloud.asset.v1.GcsOutputResult) obj; + + if (!getUrisList() + .equals(other.getUrisList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.GcsOutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Cloud Storage output result.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GcsOutputResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GcsOutputResult) + com.google.cloud.asset.v1.GcsOutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GcsOutputResult.class, com.google.cloud.asset.v1.GcsOutputResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.GcsOutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResult build() { + com.google.cloud.asset.v1.GcsOutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResult buildPartial() { + com.google.cloud.asset.v1.GcsOutputResult result = new com.google.cloud.asset.v1.GcsOutputResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + uris_ = uris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.uris_ = uris_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.GcsOutputResult) { + return mergeFrom((com.google.cloud.asset.v1.GcsOutputResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.GcsOutputResult other) { + if (other == com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance()) return this; + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.GcsOutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.GcsOutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUrisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList + getUrisList() { + return uris_.getUnmodifiableView(); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString + getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris( + java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, uris_); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GcsOutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GcsOutputResult) + private static final com.google.cloud.asset.v1.GcsOutputResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GcsOutputResult(); + } + + public static com.google.cloud.asset.v1.GcsOutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsOutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsOutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java new file mode 100644 index 000000000000..bff599adbc7f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface GcsOutputResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GcsOutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return A list containing the uris. + */ + java.util.List + getUrisList(); + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return The count of uris. + */ + int getUrisCount(); + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString + getUrisBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java new file mode 100644 index 000000000000..5d64a43ee95d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java @@ -0,0 +1,616 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Get asset feed request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GetFeedRequest} + */ +public final class GetFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GetFeedRequest) + GetFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetFeedRequest.newBuilder() to construct. + private GetFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetFeedRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GetFeedRequest.class, com.google.cloud.asset.v1.GetFeedRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.GetFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.GetFeedRequest other = (com.google.cloud.asset.v1.GetFeedRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.GetFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Get asset feed request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GetFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GetFeedRequest) + com.google.cloud.asset.v1.GetFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GetFeedRequest.class, com.google.cloud.asset.v1.GetFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.GetFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.GetFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetFeedRequest build() { + com.google.cloud.asset.v1.GetFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetFeedRequest buildPartial() { + com.google.cloud.asset.v1.GetFeedRequest result = new com.google.cloud.asset.v1.GetFeedRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.GetFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1.GetFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.GetFeedRequest other) { + if (other == com.google.cloud.asset.v1.GetFeedRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.GetFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.GetFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GetFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GetFeedRequest) + private static final com.google.cloud.asset.v1.GetFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GetFeedRequest(); + } + + public static com.google.cloud.asset.v1.GetFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java new file mode 100644 index 000000000000..fb82dab2672d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface GetFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GetFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java new file mode 100644 index 000000000000..9a63451d78dc --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java @@ -0,0 +1,616 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Request to get a saved query.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GetSavedQueryRequest} + */ +public final class GetSavedQueryRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GetSavedQueryRequest) + GetSavedQueryRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSavedQueryRequest.newBuilder() to construct. + private GetSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSavedQueryRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetSavedQueryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetSavedQueryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GetSavedQueryRequest.class, com.google.cloud.asset.v1.GetSavedQueryRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the saved query and it must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the saved query and it must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.GetSavedQueryRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.GetSavedQueryRequest other = (com.google.cloud.asset.v1.GetSavedQueryRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.GetSavedQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to get a saved query.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.GetSavedQueryRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GetSavedQueryRequest) + com.google.cloud.asset.v1.GetSavedQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.GetSavedQueryRequest.class, com.google.cloud.asset.v1.GetSavedQueryRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.GetSavedQueryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetSavedQueryRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.GetSavedQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetSavedQueryRequest build() { + com.google.cloud.asset.v1.GetSavedQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetSavedQueryRequest buildPartial() { + com.google.cloud.asset.v1.GetSavedQueryRequest result = new com.google.cloud.asset.v1.GetSavedQueryRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.GetSavedQueryRequest) { + return mergeFrom((com.google.cloud.asset.v1.GetSavedQueryRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.GetSavedQueryRequest other) { + if (other == com.google.cloud.asset.v1.GetSavedQueryRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.GetSavedQueryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.GetSavedQueryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the saved query and it must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the saved query and it must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the saved query and it must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the saved query and it must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the saved query and it must be in the format of:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GetSavedQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GetSavedQueryRequest) + private static final com.google.cloud.asset.v1.GetSavedQueryRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GetSavedQueryRequest(); + } + + public static com.google.cloud.asset.v1.GetSavedQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSavedQueryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetSavedQueryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.GetSavedQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java new file mode 100644 index 000000000000..66de7ef847e8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface GetSavedQueryRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GetSavedQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the saved query and it must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the saved query and it must be in the format of:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java new file mode 100644 index 000000000000..c398706d67fb --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java @@ -0,0 +1,3147 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Output configuration for export IAM policy analysis destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} + */ +public final class IamPolicyAnalysisOutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + IamPolicyAnalysisOutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisOutputConfig.newBuilder() to construct. + private IamPolicyAnalysisOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IamPolicyAnalysisOutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IamPolicyAnalysisOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IamPolicyAnalysisOutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + case 18: { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder.class); + } + + public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The uri of the Cloud Storage object. It's the same uri that is
+     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the analysis result.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+     * Required. The uri of the Cloud Storage object. It's the same uri that is
+     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the analysis result.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + } + /** + *
+   * A Cloud Storage location.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination} + */ + public static final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + GcsDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + *
+     * Required. The uri of the Cloud Storage object. It's the same uri that is
+     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the analysis result.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + *
+     * Required. The uri of the Cloud Storage object. It's the same uri that is
+     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * If the specified Cloud Storage object already exists and there is no
+     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+     * overwritten with the analysis result.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination other = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) obj; + + if (!getUri() + .equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A Cloud Storage location.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination build() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination result = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination(this); + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + *
+       * Required. The uri of the Cloud Storage object. It's the same uri that is
+       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * If the specified Cloud Storage object already exists and there is no
+       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+       * overwritten with the analysis result.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The uri of the Cloud Storage object. It's the same uri that is
+       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * If the specified Cloud Storage object already exists and there is no
+       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+       * overwritten with the analysis result.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The uri of the Cloud Storage object. It's the same uri that is
+       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * If the specified Cloud Storage object already exists and there is no
+       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+       * overwritten with the analysis result.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The uri of the Cloud Storage object. It's the same uri that is
+       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * If the specified Cloud Storage object already exists and there is no
+       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+       * overwritten with the analysis result.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + *
+       * Required. The uri of the Cloud Storage object. It's the same uri that is
+       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * If the specified Cloud Storage object already exists and there is no
+       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
+       * overwritten with the analysis result.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BigQueryDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the analysis results
+     * should be exported. If this dataset does not exist, the export call will
+     * return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + java.lang.String getDataset(); + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the analysis results
+     * should be exported. If this dataset does not exist, the export call will
+     * return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString + getDatasetBytes(); + + /** + *
+     * Required. The prefix of the BigQuery tables to which the analysis results
+     * will be written. Tables will be created based on this table_prefix if not
+     * exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tablePrefix. + */ + java.lang.String getTablePrefix(); + /** + *
+     * Required. The prefix of the BigQuery tables to which the analysis results
+     * will be written. Tables will be created based on this table_prefix if not
+     * exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tablePrefix. + */ + com.google.protobuf.ByteString + getTablePrefixBytes(); + + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @return The enum numeric value on the wire for partitionKey. + */ + int getPartitionKeyValue(); + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @return The partitionKey. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey getPartitionKey(); + + /** + *
+     * Optional. Specifies the action that occurs if the destination table or
+     * partition already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The writeDisposition. + */ + java.lang.String getWriteDisposition(); + /** + *
+     * Optional. Specifies the action that occurs if the destination table or
+     * partition already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for writeDisposition. + */ + com.google.protobuf.ByteString + getWriteDispositionBytes(); + } + /** + *
+   * A BigQuery destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination} + */ + public static final class BigQueryDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + BigQueryDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryDestination.newBuilder() to construct. + private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryDestination() { + dataset_ = ""; + tablePrefix_ = ""; + partitionKey_ = 0; + writeDisposition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + tablePrefix_ = s; + break; + } + case 24: { + int rawValue = input.readEnum(); + + partitionKey_ = rawValue; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + writeDisposition_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder.class); + } + + /** + *
+     * This enum determines the partition key column for the bigquery tables.
+     * Partitioning can improve query performance and reduce query cost by
+     * filtering partitions. Refer to
+     * https://cloud.google.com/bigquery/docs/partitioned-tables for details.
+     * 
+ * + * Protobuf enum {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey} + */ + public enum PartitionKey + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Unspecified partition key. Tables won't be partitioned using this
+       * option.
+       * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + PARTITION_KEY_UNSPECIFIED(0), + /** + *
+       * The time when the request is received. If specified as partition key,
+       * the result table(s) is partitoned by the RequestTime column, an
+       * additional timestamp column representing when the request was received.
+       * 
+ * + * REQUEST_TIME = 1; + */ + REQUEST_TIME(1), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Unspecified partition key. Tables won't be partitioned using this
+       * option.
+       * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + public static final int PARTITION_KEY_UNSPECIFIED_VALUE = 0; + /** + *
+       * The time when the request is received. If specified as partition key,
+       * the result table(s) is partitoned by the RequestTime column, an
+       * additional timestamp column representing when the request was received.
+       * 
+ * + * REQUEST_TIME = 1; + */ + public static final int REQUEST_TIME_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PartitionKey valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PartitionKey forNumber(int value) { + switch (value) { + case 0: return PARTITION_KEY_UNSPECIFIED; + case 1: return REQUEST_TIME; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PartitionKey> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PartitionKey findValueByNumber(int number) { + return PartitionKey.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDescriptor().getEnumTypes().get(0); + } + + private static final PartitionKey[] VALUES = values(); + + public static PartitionKey valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PartitionKey(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey) + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the analysis results
+     * should be exported. If this dataset does not exist, the export call will
+     * return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the analysis results
+     * should be exported. If this dataset does not exist, the export call will
+     * return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_PREFIX_FIELD_NUMBER = 2; + private volatile java.lang.Object tablePrefix_; + /** + *
+     * Required. The prefix of the BigQuery tables to which the analysis results
+     * will be written. Tables will be created based on this table_prefix if not
+     * exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tablePrefix. + */ + @java.lang.Override + public java.lang.String getTablePrefix() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tablePrefix_ = s; + return s; + } + } + /** + *
+     * Required. The prefix of the BigQuery tables to which the analysis results
+     * will be written. Tables will be created based on this table_prefix if not
+     * exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tablePrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTablePrefixBytes() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tablePrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTITION_KEY_FIELD_NUMBER = 3; + private int partitionKey_; + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override public int getPartitionKeyValue() { + return partitionKey_; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @return The partitionKey. + */ + @java.lang.Override public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey result = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.valueOf(partitionKey_); + return result == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.UNRECOGNIZED : result; + } + + public static final int WRITE_DISPOSITION_FIELD_NUMBER = 4; + private volatile java.lang.Object writeDisposition_; + /** + *
+     * Optional. Specifies the action that occurs if the destination table or
+     * partition already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The writeDisposition. + */ + @java.lang.Override + public java.lang.String getWriteDisposition() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + writeDisposition_ = s; + return s; + } + } + /** + *
+     * Optional. Specifies the action that occurs if the destination table or
+     * partition already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for writeDisposition. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWriteDispositionBytes() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + writeDisposition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tablePrefix_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tablePrefix_); + } + if (partitionKey_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { + output.writeEnum(3, partitionKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, writeDisposition_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tablePrefix_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tablePrefix_); + } + if (partitionKey_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, partitionKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, writeDisposition_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination other = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) obj; + + if (!getDataset() + .equals(other.getDataset())) return false; + if (!getTablePrefix() + .equals(other.getTablePrefix())) return false; + if (partitionKey_ != other.partitionKey_) return false; + if (!getWriteDisposition() + .equals(other.getWriteDisposition())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TABLE_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getTablePrefix().hashCode(); + hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; + hash = (53 * hash) + partitionKey_; + hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER; + hash = (53 * hash) + getWriteDisposition().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A BigQuery destination.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + tablePrefix_ = ""; + + partitionKey_ = 0; + + writeDisposition_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination build() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination result = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination(this); + result.dataset_ = dataset_; + result.tablePrefix_ = tablePrefix_; + result.partitionKey_ = partitionKey_; + result.writeDisposition_ = writeDisposition_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getTablePrefix().isEmpty()) { + tablePrefix_ = other.tablePrefix_; + onChanged(); + } + if (other.partitionKey_ != 0) { + setPartitionKeyValue(other.getPartitionKeyValue()); + } + if (!other.getWriteDisposition().isEmpty()) { + writeDisposition_ = other.writeDisposition_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + *
+       * Required. The BigQuery dataset in format
+       * "projects/projectId/datasets/datasetId", to which the analysis results
+       * should be exported. If this dataset does not exist, the export call will
+       * return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The BigQuery dataset in format
+       * "projects/projectId/datasets/datasetId", to which the analysis results
+       * should be exported. If this dataset does not exist, the export call will
+       * return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The BigQuery dataset in format
+       * "projects/projectId/datasets/datasetId", to which the analysis results
+       * should be exported. If this dataset does not exist, the export call will
+       * return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The BigQuery dataset in format
+       * "projects/projectId/datasets/datasetId", to which the analysis results
+       * should be exported. If this dataset does not exist, the export call will
+       * return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + *
+       * Required. The BigQuery dataset in format
+       * "projects/projectId/datasets/datasetId", to which the analysis results
+       * should be exported. If this dataset does not exist, the export call will
+       * return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object tablePrefix_ = ""; + /** + *
+       * Required. The prefix of the BigQuery tables to which the analysis results
+       * will be written. Tables will be created based on this table_prefix if not
+       * exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The tablePrefix. + */ + public java.lang.String getTablePrefix() { + java.lang.Object ref = tablePrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tablePrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The prefix of the BigQuery tables to which the analysis results
+       * will be written. Tables will be created based on this table_prefix if not
+       * exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for tablePrefix. + */ + public com.google.protobuf.ByteString + getTablePrefixBytes() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tablePrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The prefix of the BigQuery tables to which the analysis results
+       * will be written. Tables will be created based on this table_prefix if not
+       * exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The tablePrefix to set. + * @return This builder for chaining. + */ + public Builder setTablePrefix( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tablePrefix_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The prefix of the BigQuery tables to which the analysis results
+       * will be written. Tables will be created based on this table_prefix if not
+       * exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTablePrefix() { + + tablePrefix_ = getDefaultInstance().getTablePrefix(); + onChanged(); + return this; + } + /** + *
+       * Required. The prefix of the BigQuery tables to which the analysis results
+       * will be written. Tables will be created based on this table_prefix if not
+       * exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for tablePrefix to set. + * @return This builder for chaining. + */ + public Builder setTablePrefixBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tablePrefix_ = value; + onChanged(); + return this; + } + + private int partitionKey_ = 0; + /** + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override public int getPartitionKeyValue() { + return partitionKey_; + } + /** + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @param value The enum numeric value on the wire for partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKeyValue(int value) { + + partitionKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @return The partitionKey. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey result = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.valueOf(partitionKey_); + return result == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.UNRECOGNIZED : result; + } + /** + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @param value The partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKey(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey value) { + if (value == null) { + throw new NullPointerException(); + } + + partitionKey_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * @return This builder for chaining. + */ + public Builder clearPartitionKey() { + + partitionKey_ = 0; + onChanged(); + return this; + } + + private java.lang.Object writeDisposition_ = ""; + /** + *
+       * Optional. Specifies the action that occurs if the destination table or
+       * partition already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The writeDisposition. + */ + public java.lang.String getWriteDisposition() { + java.lang.Object ref = writeDisposition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + writeDisposition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Optional. Specifies the action that occurs if the destination table or
+       * partition already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for writeDisposition. + */ + public com.google.protobuf.ByteString + getWriteDispositionBytes() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + writeDisposition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Optional. Specifies the action that occurs if the destination table or
+       * partition already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The writeDisposition to set. + * @return This builder for chaining. + */ + public Builder setWriteDisposition( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + writeDisposition_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. Specifies the action that occurs if the destination table or
+       * partition already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearWriteDisposition() { + + writeDisposition_ = getDefaultInstance().getWriteDisposition(); + onChanged(); + return this; + } + /** + *
+       * Optional. Specifies the action that occurs if the destination table or
+       * partition already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for writeDisposition to set. + * @return This builder for chaining. + */ + public Builder setWriteDispositionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + writeDisposition_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + BIGQUERY_DESTINATION(2), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: return GCS_DESTINATION; + case 2: return BIGQUERY_DESTINATION; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); + } + + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; + /** + *
+   * Destination on BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + *
+   * Destination on BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getBigqueryDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); + } + /** + *
+   * Destination on BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + output.writeMessage(2, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig other = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + break; + case 2: + if (!getBigqueryDestination() + .equals(other.getBigqueryDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 2: + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output configuration for export IAM policy analysis destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig build() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig result = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + if (destinationCase_ == 2) { + if (bigqueryDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = bigqueryDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case BIGQUERY_DESTINATION: { + mergeBigqueryDestination(other.getBigqueryDestination()); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 && + destination_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.newBuilder((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } else { + gcsDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder>( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged();; + return gcsDestinationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return bigqueryDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + public Builder mergeBigqueryDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2 && + destination_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.newBuilder((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + bigqueryDestinationBuilder_.mergeFrom(value); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + bigqueryDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder getBigqueryDestinationBuilder() { + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); + } + bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder>( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged();; + return bigqueryDestinationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisOutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisOutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java new file mode 100644 index 000000000000..044214c54096 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java @@ -0,0 +1,65 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface IamPolicyAnalysisOutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + *
+   * Destination on BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + boolean hasBigqueryDestination(); + /** + *
+   * Destination on BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getBigqueryDestination(); + /** + *
+   * Destination on BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); + + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java new file mode 100644 index 000000000000..ae9b40063086 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java @@ -0,0 +1,6302 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * IAM policy analysis query message.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} + */ +public final class IamPolicyAnalysisQuery extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) + IamPolicyAnalysisQueryOrBuilder { +private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisQuery.newBuilder() to construct. + private IamPolicyAnalysisQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IamPolicyAnalysisQuery() { + scope_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IamPolicyAnalysisQuery(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IamPolicyAnalysisQuery( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + case 18: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder subBuilder = null; + if (resourceSelector_ != null) { + subBuilder = resourceSelector_.toBuilder(); + } + resourceSelector_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceSelector_); + resourceSelector_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder subBuilder = null; + if (identitySelector_ != null) { + subBuilder = identitySelector_.toBuilder(); + } + identitySelector_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(identitySelector_); + identitySelector_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder subBuilder = null; + if (accessSelector_ != null) { + subBuilder = accessSelector_.toBuilder(); + } + accessSelector_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(accessSelector_); + accessSelector_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder subBuilder = null; + if (options_ != null) { + subBuilder = options_.toBuilder(); + } + options_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(options_); + options_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder subBuilder = null; + if (conditionContext_ != null) { + subBuilder = conditionContext_.toBuilder(); + } + conditionContext_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(conditionContext_); + conditionContext_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); + } + + public interface ResourceSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + *
+     * Required. The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString + getFullResourceNameBytes(); + } + /** + *
+   * Specifies the resource to analyze for access policies, which may be set
+   * directly on the resource, or on ancestors such as organizations, folders or
+   * projects.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} + */ + public static final class ResourceSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + ResourceSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceSelector.newBuilder() to construct. + private ResourceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceSelector() { + fullResourceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceSelector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResourceSelector( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fullResourceName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fullResourceName_; + /** + *
+     * Required. The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } + } + /** + *
+     * Required. The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) obj; + + if (!getFullResourceName() + .equals(other.getFullResourceName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Specifies the resource to analyze for access policies, which may be set
+     * directly on the resource, or on ancestors such as organizations, folders or
+     * projects.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + fullResourceName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(this); + result.fullResourceName_ = fullResourceName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance()) return this; + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object fullResourceName_ = ""; + /** + *
+       * Required. The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResourceName_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + *
+       * Required. The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResourceName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceSelector(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IdentitySelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The identity appear in the form of principals in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The identity. + */ + java.lang.String getIdentity(); + /** + *
+     * Required. The identity appear in the form of principals in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for identity. + */ + com.google.protobuf.ByteString + getIdentityBytes(); + } + /** + *
+   * Specifies an identity for which to determine resource access, based on
+   * roles assigned either directly to them or to the groups they belong to,
+   * directly or indirectly.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} + */ + public static final class IdentitySelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + IdentitySelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentitySelector.newBuilder() to construct. + private IdentitySelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IdentitySelector() { + identity_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IdentitySelector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IdentitySelector( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + identity_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); + } + + public static final int IDENTITY_FIELD_NUMBER = 1; + private volatile java.lang.Object identity_; + /** + *
+     * Required. The identity appear in the form of principals in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The identity. + */ + @java.lang.Override + public java.lang.String getIdentity() { + java.lang.Object ref = identity_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identity_ = s; + return s; + } + } + /** + *
+     * Required. The identity appear in the form of principals in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for identity. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdentityBytes() { + java.lang.Object ref = identity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + identity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identity_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identity_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) obj; + + if (!getIdentity() + .equals(other.getIdentity())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getIdentity().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Specifies an identity for which to determine resource access, based on
+     * roles assigned either directly to them or to the groups they belong to,
+     * directly or indirectly.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + identity_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(this); + result.identity_ = identity_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance()) return this; + if (!other.getIdentity().isEmpty()) { + identity_ = other.identity_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object identity_ = ""; + /** + *
+       * Required. The identity appear in the form of principals in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The identity. + */ + public java.lang.String getIdentity() { + java.lang.Object ref = identity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The identity appear in the form of principals in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for identity. + */ + public com.google.protobuf.ByteString + getIdentityBytes() { + java.lang.Object ref = identity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + identity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The identity appear in the form of principals in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The identity to set. + * @return This builder for chaining. + */ + public Builder setIdentity( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + identity_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The identity appear in the form of principals in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearIdentity() { + + identity_ = getDefaultInstance().getIdentity(); + onChanged(); + return this; + } + /** + *
+       * Required. The identity appear in the form of principals in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for identity to set. + * @return This builder for chaining. + */ + public Builder setIdentityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + identity_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentitySelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IdentitySelector(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccessSelectorOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the roles. + */ + java.util.List + getRolesList(); + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of roles. + */ + int getRolesCount(); + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The roles at the given index. + */ + java.lang.String getRoles(int index); + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the roles at the given index. + */ + com.google.protobuf.ByteString + getRolesBytes(int index); + + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the permissions. + */ + java.util.List + getPermissionsList(); + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of permissions. + */ + int getPermissionsCount(); + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + java.lang.String getPermissions(int index); + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + com.google.protobuf.ByteString + getPermissionsBytes(int index); + } + /** + *
+   * Specifies roles and/or permissions to analyze, to determine both the
+   * identities possessing them and the resources they control. If multiple
+   * values are specified, results will include roles or permissions matching
+   * any of them. The total number of roles and permissions should be equal or
+   * less than 10.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} + */ + public static final class AccessSelector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + AccessSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccessSelector.newBuilder() to construct. + private AccessSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AccessSelector() { + roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AccessSelector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AccessSelector( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + roles_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + roles_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + permissions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + roles_ = roles_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); + } + + public static final int ROLES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList roles_; + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the roles. + */ + public com.google.protobuf.ProtocolStringList + getRolesList() { + return roles_; + } + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of roles. + */ + public int getRolesCount() { + return roles_.size(); + } + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The roles at the given index. + */ + public java.lang.String getRoles(int index) { + return roles_.get(index); + } + /** + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the roles at the given index. + */ + public com.google.protobuf.ByteString + getRolesBytes(int index) { + return roles_.getByteString(index); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList permissions_; + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList + getPermissionsList() { + return permissions_; + } + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString + getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < roles_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, roles_.getRaw(i)); + } + for (int i = 0; i < permissions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < roles_.size(); i++) { + dataSize += computeStringSizeNoTag(roles_.getRaw(i)); + } + size += dataSize; + size += 1 * getRolesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < permissions_.size(); i++) { + dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPermissionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) obj; + + if (!getRolesList() + .equals(other.getRolesList())) return false; + if (!getPermissionsList() + .equals(other.getPermissionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRolesCount() > 0) { + hash = (37 * hash) + ROLES_FIELD_NUMBER; + hash = (53 * hash) + getRolesList().hashCode(); + } + if (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Specifies roles and/or permissions to analyze, to determine both the
+     * identities possessing them and the resources they control. If multiple
+     * values are specified, results will include roles or permissions matching
+     * any of them. The total number of roles and permissions should be equal or
+     * less than 10.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + roles_ = roles_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.roles_ = roles_; + if (((bitField0_ & 0x00000002) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.permissions_ = permissions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()) return this; + if (!other.roles_.isEmpty()) { + if (roles_.isEmpty()) { + roles_ = other.roles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRolesIsMutable(); + roles_.addAll(other.roles_); + } + onChanged(); + } + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRolesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + roles_ = new com.google.protobuf.LazyStringArrayList(roles_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the roles. + */ + public com.google.protobuf.ProtocolStringList + getRolesList() { + return roles_.getUnmodifiableView(); + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of roles. + */ + public int getRolesCount() { + return roles_.size(); + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The roles at the given index. + */ + public java.lang.String getRoles(int index) { + return roles_.get(index); + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the roles at the given index. + */ + public com.google.protobuf.ByteString + getRolesBytes(int index) { + return roles_.getByteString(index); + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index to set the value at. + * @param value The roles to set. + * @return This builder for chaining. + */ + public Builder setRoles( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The roles to add. + * @return This builder for chaining. + */ + public Builder addRoles( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.add(value); + onChanged(); + return this; + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param values The roles to add. + * @return This builder for chaining. + */ + public Builder addAllRoles( + java.lang.Iterable values) { + ensureRolesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, roles_); + onChanged(); + return this; + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearRoles() { + roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Optional. The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes of the roles to add. + * @return This builder for chaining. + */ + public Builder addRolesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRolesIsMutable(); + roles_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePermissionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList + getPermissionsList() { + return permissions_.getUnmodifiableView(); + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString + getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index to set the value at. + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + return this; + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param values The permissions to add. + * @return This builder for chaining. + */ + public Builder addAllPermissions( + java.lang.Iterable values) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, permissions_); + onChanged(); + return this; + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPermissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Optional. The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes of the permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccessSelector(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface OptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Optional. If true, the identities section of the result will expand any
+     * Google groups appearing in an IAM policy binding.
+     * If
+     * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+     * is specified, the identity in the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * If true, the default max expansion per group is 1000 for
+     * AssetService.AnalyzeIamPolicy][].
+     * Default is false.
+     * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandGroups. + */ + boolean getExpandGroups(); + + /** + *
+     * Optional. If true, the access section of result will expand any roles
+     * appearing in IAM policy bindings to include their permissions.
+     * If
+     * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+     * is specified, the access section of the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandRoles. + */ + boolean getExpandRoles(); + + /** + *
+     * Optional. If true and
+     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is not specified, the resource section of the result will expand any
+     * resource attached to an IAM policy to include resources lower in the
+     * resource hierarchy.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and the results include an IAM policy with P on a GCP
+     * folder, the results will also include resources in that folder with
+     * permission P.
+     * If true and
+     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is specified, the resource section of the result will expand the
+     * specified resource to include resources lower in the resource hierarchy.
+     * Only project or lower resources are supported. Folder and organization
+     * resource cannot be used together with this option.
+     * For example, if the request analyzes for which users have permission P on
+     * a GCP project with this option enabled, the results will include all
+     * users who have permission P on that project or any lower resource.
+     * If true, the default max expansion per resource is 1000 for
+     * AssetService.AnalyzeIamPolicy][] and 100000 for
+     * AssetService.AnalyzeIamPolicyLongrunning][].
+     * Default is false.
+     * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandResources. + */ + boolean getExpandResources(); + + /** + *
+     * Optional. If true, the result will output the relevant parent/child
+     * relationships between resources. Default is false.
+     * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputResourceEdges. + */ + boolean getOutputResourceEdges(); + + /** + *
+     * Optional. If true, the result will output the relevant membership
+     * relationships between groups and other groups, and between groups and
+     * principals. Default is false.
+     * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputGroupEdges. + */ + boolean getOutputGroupEdges(); + + /** + *
+     * Optional. If true, the response will include access analysis from
+     * identities to resources via service account impersonation. This is a very
+     * expensive operation, because many derived queries will be executed. We
+     * highly recommend you use
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc instead.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and there's an IAM policy states user A has
+     * iam.serviceAccounts.getAccessToken permission to a service account SA,
+     * and there's another IAM policy states service account SA has permission P
+     * to a GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Another example, if the request analyzes for who has
+     * permission P to a GCP folder F, and there's an IAM policy states user A
+     * has iam.serviceAccounts.actAs permission to a service account SA, and
+     * there's another IAM policy states service account SA has permission P to
+     * the GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Only the following permissions are considered in this analysis:
+     * * `iam.serviceAccounts.actAs`
+     * * `iam.serviceAccounts.signBlob`
+     * * `iam.serviceAccounts.signJwt`
+     * * `iam.serviceAccounts.getAccessToken`
+     * * `iam.serviceAccounts.getOpenIdToken`
+     * * `iam.serviceAccounts.implicitDelegation`
+     * Default is false.
+     * 
+ * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The analyzeServiceAccountImpersonation. + */ + boolean getAnalyzeServiceAccountImpersonation(); + } + /** + *
+   * Contains query options.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} + */ + public static final class Options extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + OptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Options.newBuilder() to construct. + private Options(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Options() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Options(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Options( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + expandGroups_ = input.readBool(); + break; + } + case 16: { + + expandRoles_ = input.readBool(); + break; + } + case 24: { + + expandResources_ = input.readBool(); + break; + } + case 32: { + + outputResourceEdges_ = input.readBool(); + break; + } + case 40: { + + outputGroupEdges_ = input.readBool(); + break; + } + case 48: { + + analyzeServiceAccountImpersonation_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); + } + + public static final int EXPAND_GROUPS_FIELD_NUMBER = 1; + private boolean expandGroups_; + /** + *
+     * Optional. If true, the identities section of the result will expand any
+     * Google groups appearing in an IAM policy binding.
+     * If
+     * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+     * is specified, the identity in the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * If true, the default max expansion per group is 1000 for
+     * AssetService.AnalyzeIamPolicy][].
+     * Default is false.
+     * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandGroups. + */ + @java.lang.Override + public boolean getExpandGroups() { + return expandGroups_; + } + + public static final int EXPAND_ROLES_FIELD_NUMBER = 2; + private boolean expandRoles_; + /** + *
+     * Optional. If true, the access section of result will expand any roles
+     * appearing in IAM policy bindings to include their permissions.
+     * If
+     * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+     * is specified, the access section of the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandRoles. + */ + @java.lang.Override + public boolean getExpandRoles() { + return expandRoles_; + } + + public static final int EXPAND_RESOURCES_FIELD_NUMBER = 3; + private boolean expandResources_; + /** + *
+     * Optional. If true and
+     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is not specified, the resource section of the result will expand any
+     * resource attached to an IAM policy to include resources lower in the
+     * resource hierarchy.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and the results include an IAM policy with P on a GCP
+     * folder, the results will also include resources in that folder with
+     * permission P.
+     * If true and
+     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is specified, the resource section of the result will expand the
+     * specified resource to include resources lower in the resource hierarchy.
+     * Only project or lower resources are supported. Folder and organization
+     * resource cannot be used together with this option.
+     * For example, if the request analyzes for which users have permission P on
+     * a GCP project with this option enabled, the results will include all
+     * users who have permission P on that project or any lower resource.
+     * If true, the default max expansion per resource is 1000 for
+     * AssetService.AnalyzeIamPolicy][] and 100000 for
+     * AssetService.AnalyzeIamPolicyLongrunning][].
+     * Default is false.
+     * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandResources. + */ + @java.lang.Override + public boolean getExpandResources() { + return expandResources_; + } + + public static final int OUTPUT_RESOURCE_EDGES_FIELD_NUMBER = 4; + private boolean outputResourceEdges_; + /** + *
+     * Optional. If true, the result will output the relevant parent/child
+     * relationships between resources. Default is false.
+     * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputResourceEdges. + */ + @java.lang.Override + public boolean getOutputResourceEdges() { + return outputResourceEdges_; + } + + public static final int OUTPUT_GROUP_EDGES_FIELD_NUMBER = 5; + private boolean outputGroupEdges_; + /** + *
+     * Optional. If true, the result will output the relevant membership
+     * relationships between groups and other groups, and between groups and
+     * principals. Default is false.
+     * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputGroupEdges. + */ + @java.lang.Override + public boolean getOutputGroupEdges() { + return outputGroupEdges_; + } + + public static final int ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER = 6; + private boolean analyzeServiceAccountImpersonation_; + /** + *
+     * Optional. If true, the response will include access analysis from
+     * identities to resources via service account impersonation. This is a very
+     * expensive operation, because many derived queries will be executed. We
+     * highly recommend you use
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc instead.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and there's an IAM policy states user A has
+     * iam.serviceAccounts.getAccessToken permission to a service account SA,
+     * and there's another IAM policy states service account SA has permission P
+     * to a GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Another example, if the request analyzes for who has
+     * permission P to a GCP folder F, and there's an IAM policy states user A
+     * has iam.serviceAccounts.actAs permission to a service account SA, and
+     * there's another IAM policy states service account SA has permission P to
+     * the GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Only the following permissions are considered in this analysis:
+     * * `iam.serviceAccounts.actAs`
+     * * `iam.serviceAccounts.signBlob`
+     * * `iam.serviceAccounts.signJwt`
+     * * `iam.serviceAccounts.getAccessToken`
+     * * `iam.serviceAccounts.getOpenIdToken`
+     * * `iam.serviceAccounts.implicitDelegation`
+     * Default is false.
+     * 
+ * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The analyzeServiceAccountImpersonation. + */ + @java.lang.Override + public boolean getAnalyzeServiceAccountImpersonation() { + return analyzeServiceAccountImpersonation_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (expandGroups_ != false) { + output.writeBool(1, expandGroups_); + } + if (expandRoles_ != false) { + output.writeBool(2, expandRoles_); + } + if (expandResources_ != false) { + output.writeBool(3, expandResources_); + } + if (outputResourceEdges_ != false) { + output.writeBool(4, outputResourceEdges_); + } + if (outputGroupEdges_ != false) { + output.writeBool(5, outputGroupEdges_); + } + if (analyzeServiceAccountImpersonation_ != false) { + output.writeBool(6, analyzeServiceAccountImpersonation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (expandGroups_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, expandGroups_); + } + if (expandRoles_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, expandRoles_); + } + if (expandResources_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, expandResources_); + } + if (outputResourceEdges_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, outputResourceEdges_); + } + if (outputGroupEdges_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, outputGroupEdges_); + } + if (analyzeServiceAccountImpersonation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, analyzeServiceAccountImpersonation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) obj; + + if (getExpandGroups() + != other.getExpandGroups()) return false; + if (getExpandRoles() + != other.getExpandRoles()) return false; + if (getExpandResources() + != other.getExpandResources()) return false; + if (getOutputResourceEdges() + != other.getOutputResourceEdges()) return false; + if (getOutputGroupEdges() + != other.getOutputGroupEdges()) return false; + if (getAnalyzeServiceAccountImpersonation() + != other.getAnalyzeServiceAccountImpersonation()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXPAND_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExpandGroups()); + hash = (37 * hash) + EXPAND_ROLES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExpandRoles()); + hash = (37 * hash) + EXPAND_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getExpandResources()); + hash = (37 * hash) + OUTPUT_RESOURCE_EDGES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOutputResourceEdges()); + hash = (37 * hash) + OUTPUT_GROUP_EDGES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOutputGroupEdges()); + hash = (37 * hash) + ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAnalyzeServiceAccountImpersonation()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Contains query options.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + expandGroups_ = false; + + expandRoles_ = false; + + expandResources_ = false; + + outputResourceEdges_ = false; + + outputGroupEdges_ = false; + + analyzeServiceAccountImpersonation_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(this); + result.expandGroups_ = expandGroups_; + result.expandRoles_ = expandRoles_; + result.expandResources_ = expandResources_; + result.outputResourceEdges_ = outputResourceEdges_; + result.outputGroupEdges_ = outputGroupEdges_; + result.analyzeServiceAccountImpersonation_ = analyzeServiceAccountImpersonation_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()) return this; + if (other.getExpandGroups() != false) { + setExpandGroups(other.getExpandGroups()); + } + if (other.getExpandRoles() != false) { + setExpandRoles(other.getExpandRoles()); + } + if (other.getExpandResources() != false) { + setExpandResources(other.getExpandResources()); + } + if (other.getOutputResourceEdges() != false) { + setOutputResourceEdges(other.getOutputResourceEdges()); + } + if (other.getOutputGroupEdges() != false) { + setOutputGroupEdges(other.getOutputGroupEdges()); + } + if (other.getAnalyzeServiceAccountImpersonation() != false) { + setAnalyzeServiceAccountImpersonation(other.getAnalyzeServiceAccountImpersonation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean expandGroups_ ; + /** + *
+       * Optional. If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If
+       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+       * is specified, the identity in the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * If true, the default max expansion per group is 1000 for
+       * AssetService.AnalyzeIamPolicy][].
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandGroups. + */ + @java.lang.Override + public boolean getExpandGroups() { + return expandGroups_; + } + /** + *
+       * Optional. If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If
+       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+       * is specified, the identity in the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * If true, the default max expansion per group is 1000 for
+       * AssetService.AnalyzeIamPolicy][].
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The expandGroups to set. + * @return This builder for chaining. + */ + public Builder setExpandGroups(boolean value) { + + expandGroups_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If
+       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+       * is specified, the identity in the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * If true, the default max expansion per group is 1000 for
+       * AssetService.AnalyzeIamPolicy][].
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearExpandGroups() { + + expandGroups_ = false; + onChanged(); + return this; + } + + private boolean expandRoles_ ; + /** + *
+       * Optional. If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If
+       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+       * is specified, the access section of the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandRoles. + */ + @java.lang.Override + public boolean getExpandRoles() { + return expandRoles_; + } + /** + *
+       * Optional. If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If
+       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+       * is specified, the access section of the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The expandRoles to set. + * @return This builder for chaining. + */ + public Builder setExpandRoles(boolean value) { + + expandRoles_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If
+       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+       * is specified, the access section of the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearExpandRoles() { + + expandRoles_ = false; + onChanged(); + return this; + } + + private boolean expandResources_ ; + /** + *
+       * Optional. If true and
+       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is not specified, the resource section of the result will expand any
+       * resource attached to an IAM policy to include resources lower in the
+       * resource hierarchy.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and the results include an IAM policy with P on a GCP
+       * folder, the results will also include resources in that folder with
+       * permission P.
+       * If true and
+       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is specified, the resource section of the result will expand the
+       * specified resource to include resources lower in the resource hierarchy.
+       * Only project or lower resources are supported. Folder and organization
+       * resource cannot be used together with this option.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP project with this option enabled, the results will include all
+       * users who have permission P on that project or any lower resource.
+       * If true, the default max expansion per resource is 1000 for
+       * AssetService.AnalyzeIamPolicy][] and 100000 for
+       * AssetService.AnalyzeIamPolicyLongrunning][].
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The expandResources. + */ + @java.lang.Override + public boolean getExpandResources() { + return expandResources_; + } + /** + *
+       * Optional. If true and
+       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is not specified, the resource section of the result will expand any
+       * resource attached to an IAM policy to include resources lower in the
+       * resource hierarchy.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and the results include an IAM policy with P on a GCP
+       * folder, the results will also include resources in that folder with
+       * permission P.
+       * If true and
+       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is specified, the resource section of the result will expand the
+       * specified resource to include resources lower in the resource hierarchy.
+       * Only project or lower resources are supported. Folder and organization
+       * resource cannot be used together with this option.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP project with this option enabled, the results will include all
+       * users who have permission P on that project or any lower resource.
+       * If true, the default max expansion per resource is 1000 for
+       * AssetService.AnalyzeIamPolicy][] and 100000 for
+       * AssetService.AnalyzeIamPolicyLongrunning][].
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The expandResources to set. + * @return This builder for chaining. + */ + public Builder setExpandResources(boolean value) { + + expandResources_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. If true and
+       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is not specified, the resource section of the result will expand any
+       * resource attached to an IAM policy to include resources lower in the
+       * resource hierarchy.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and the results include an IAM policy with P on a GCP
+       * folder, the results will also include resources in that folder with
+       * permission P.
+       * If true and
+       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is specified, the resource section of the result will expand the
+       * specified resource to include resources lower in the resource hierarchy.
+       * Only project or lower resources are supported. Folder and organization
+       * resource cannot be used together with this option.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP project with this option enabled, the results will include all
+       * users who have permission P on that project or any lower resource.
+       * If true, the default max expansion per resource is 1000 for
+       * AssetService.AnalyzeIamPolicy][] and 100000 for
+       * AssetService.AnalyzeIamPolicyLongrunning][].
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearExpandResources() { + + expandResources_ = false; + onChanged(); + return this; + } + + private boolean outputResourceEdges_ ; + /** + *
+       * Optional. If true, the result will output the relevant parent/child
+       * relationships between resources. Default is false.
+       * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputResourceEdges. + */ + @java.lang.Override + public boolean getOutputResourceEdges() { + return outputResourceEdges_; + } + /** + *
+       * Optional. If true, the result will output the relevant parent/child
+       * relationships between resources. Default is false.
+       * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The outputResourceEdges to set. + * @return This builder for chaining. + */ + public Builder setOutputResourceEdges(boolean value) { + + outputResourceEdges_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. If true, the result will output the relevant parent/child
+       * relationships between resources. Default is false.
+       * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOutputResourceEdges() { + + outputResourceEdges_ = false; + onChanged(); + return this; + } + + private boolean outputGroupEdges_ ; + /** + *
+       * Optional. If true, the result will output the relevant membership
+       * relationships between groups and other groups, and between groups and
+       * principals. Default is false.
+       * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputGroupEdges. + */ + @java.lang.Override + public boolean getOutputGroupEdges() { + return outputGroupEdges_; + } + /** + *
+       * Optional. If true, the result will output the relevant membership
+       * relationships between groups and other groups, and between groups and
+       * principals. Default is false.
+       * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The outputGroupEdges to set. + * @return This builder for chaining. + */ + public Builder setOutputGroupEdges(boolean value) { + + outputGroupEdges_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. If true, the result will output the relevant membership
+       * relationships between groups and other groups, and between groups and
+       * principals. Default is false.
+       * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOutputGroupEdges() { + + outputGroupEdges_ = false; + onChanged(); + return this; + } + + private boolean analyzeServiceAccountImpersonation_ ; + /** + *
+       * Optional. If true, the response will include access analysis from
+       * identities to resources via service account impersonation. This is a very
+       * expensive operation, because many derived queries will be executed. We
+       * highly recommend you use
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Another example, if the request analyzes for who has
+       * permission P to a GCP folder F, and there's an IAM policy states user A
+       * has iam.serviceAccounts.actAs permission to a service account SA, and
+       * there's another IAM policy states service account SA has permission P to
+       * the GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Only the following permissions are considered in this analysis:
+       * * `iam.serviceAccounts.actAs`
+       * * `iam.serviceAccounts.signBlob`
+       * * `iam.serviceAccounts.signJwt`
+       * * `iam.serviceAccounts.getAccessToken`
+       * * `iam.serviceAccounts.getOpenIdToken`
+       * * `iam.serviceAccounts.implicitDelegation`
+       * Default is false.
+       * 
+ * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The analyzeServiceAccountImpersonation. + */ + @java.lang.Override + public boolean getAnalyzeServiceAccountImpersonation() { + return analyzeServiceAccountImpersonation_; + } + /** + *
+       * Optional. If true, the response will include access analysis from
+       * identities to resources via service account impersonation. This is a very
+       * expensive operation, because many derived queries will be executed. We
+       * highly recommend you use
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Another example, if the request analyzes for who has
+       * permission P to a GCP folder F, and there's an IAM policy states user A
+       * has iam.serviceAccounts.actAs permission to a service account SA, and
+       * there's another IAM policy states service account SA has permission P to
+       * the GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Only the following permissions are considered in this analysis:
+       * * `iam.serviceAccounts.actAs`
+       * * `iam.serviceAccounts.signBlob`
+       * * `iam.serviceAccounts.signJwt`
+       * * `iam.serviceAccounts.getAccessToken`
+       * * `iam.serviceAccounts.getOpenIdToken`
+       * * `iam.serviceAccounts.implicitDelegation`
+       * Default is false.
+       * 
+ * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The analyzeServiceAccountImpersonation to set. + * @return This builder for chaining. + */ + public Builder setAnalyzeServiceAccountImpersonation(boolean value) { + + analyzeServiceAccountImpersonation_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional. If true, the response will include access analysis from
+       * identities to resources via service account impersonation. This is a very
+       * expensive operation, because many derived queries will be executed. We
+       * highly recommend you use
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Another example, if the request analyzes for who has
+       * permission P to a GCP folder F, and there's an IAM policy states user A
+       * has iam.serviceAccounts.actAs permission to a service account SA, and
+       * there's another IAM policy states service account SA has permission P to
+       * the GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Only the following permissions are considered in this analysis:
+       * * `iam.serviceAccounts.actAs`
+       * * `iam.serviceAccounts.signBlob`
+       * * `iam.serviceAccounts.signJwt`
+       * * `iam.serviceAccounts.getAccessToken`
+       * * `iam.serviceAccounts.getOpenIdToken`
+       * * `iam.serviceAccounts.implicitDelegation`
+       * Default is false.
+       * 
+ * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearAnalyzeServiceAccountImpersonation() { + + analyzeServiceAccountImpersonation_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Options parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Options(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConditionContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The hypothetical access timestamp to evaluate IAM conditions. Note that
+     * this value must not be earlier than the current time; otherwise, an
+     * INVALID_ARGUMENT error will be returned.
+     * 
+ * + * .google.protobuf.Timestamp access_time = 1; + * @return Whether the accessTime field is set. + */ + boolean hasAccessTime(); + /** + *
+     * The hypothetical access timestamp to evaluate IAM conditions. Note that
+     * this value must not be earlier than the current time; otherwise, an
+     * INVALID_ARGUMENT error will be returned.
+     * 
+ * + * .google.protobuf.Timestamp access_time = 1; + * @return The accessTime. + */ + com.google.protobuf.Timestamp getAccessTime(); + /** + *
+     * The hypothetical access timestamp to evaluate IAM conditions. Note that
+     * this value must not be earlier than the current time; otherwise, an
+     * INVALID_ARGUMENT error will be returned.
+     * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder(); + + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.TimeContextCase getTimeContextCase(); + } + /** + *
+   * The IAM conditions context.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} + */ + public static final class ConditionContext extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + ConditionContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConditionContext.newBuilder() to construct. + private ConditionContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConditionContext() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConditionContext(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ConditionContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timeContextCase_ == 1) { + subBuilder = ((com.google.protobuf.Timestamp) timeContext_).toBuilder(); + } + timeContext_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) timeContext_); + timeContext_ = subBuilder.buildPartial(); + } + timeContextCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); + } + + private int timeContextCase_ = 0; + private java.lang.Object timeContext_; + public enum TimeContextCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ACCESS_TIME(1), + TIMECONTEXT_NOT_SET(0); + private final int value; + private TimeContextCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TimeContextCase valueOf(int value) { + return forNumber(value); + } + + public static TimeContextCase forNumber(int value) { + switch (value) { + case 1: return ACCESS_TIME; + case 0: return TIMECONTEXT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TimeContextCase + getTimeContextCase() { + return TimeContextCase.forNumber( + timeContextCase_); + } + + public static final int ACCESS_TIME_FIELD_NUMBER = 1; + /** + *
+     * The hypothetical access timestamp to evaluate IAM conditions. Note that
+     * this value must not be earlier than the current time; otherwise, an
+     * INVALID_ARGUMENT error will be returned.
+     * 
+ * + * .google.protobuf.Timestamp access_time = 1; + * @return Whether the accessTime field is set. + */ + @java.lang.Override + public boolean hasAccessTime() { + return timeContextCase_ == 1; + } + /** + *
+     * The hypothetical access timestamp to evaluate IAM conditions. Note that
+     * this value must not be earlier than the current time; otherwise, an
+     * INVALID_ARGUMENT error will be returned.
+     * 
+ * + * .google.protobuf.Timestamp access_time = 1; + * @return The accessTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getAccessTime() { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + *
+     * The hypothetical access timestamp to evaluate IAM conditions. Note that
+     * this value must not be earlier than the current time; otherwise, an
+     * INVALID_ARGUMENT error will be returned.
+     * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timeContextCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Timestamp) timeContext_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeContextCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.protobuf.Timestamp) timeContext_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) obj; + + if (!getTimeContextCase().equals(other.getTimeContextCase())) return false; + switch (timeContextCase_) { + case 1: + if (!getAccessTime() + .equals(other.getAccessTime())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (timeContextCase_) { + case 1: + hash = (37 * hash) + ACCESS_TIME_FIELD_NUMBER; + hash = (53 * hash) + getAccessTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The IAM conditions context.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + timeContextCase_ = 0; + timeContext_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(this); + if (timeContextCase_ == 1) { + if (accessTimeBuilder_ == null) { + result.timeContext_ = timeContext_; + } else { + result.timeContext_ = accessTimeBuilder_.build(); + } + } + result.timeContextCase_ = timeContextCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance()) return this; + switch (other.getTimeContextCase()) { + case ACCESS_TIME: { + mergeAccessTime(other.getAccessTime()); + break; + } + case TIMECONTEXT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int timeContextCase_ = 0; + private java.lang.Object timeContext_; + public TimeContextCase + getTimeContextCase() { + return TimeContextCase.forNumber( + timeContextCase_); + } + + public Builder clearTimeContext() { + timeContextCase_ = 0; + timeContext_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> accessTimeBuilder_; + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + * @return Whether the accessTime field is set. + */ + @java.lang.Override + public boolean hasAccessTime() { + return timeContextCase_ == 1; + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + * @return The accessTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getAccessTime() { + if (accessTimeBuilder_ == null) { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (timeContextCase_ == 1) { + return accessTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder setAccessTime(com.google.protobuf.Timestamp value) { + if (accessTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeContext_ = value; + onChanged(); + } else { + accessTimeBuilder_.setMessage(value); + } + timeContextCase_ = 1; + return this; + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder setAccessTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (accessTimeBuilder_ == null) { + timeContext_ = builderForValue.build(); + onChanged(); + } else { + accessTimeBuilder_.setMessage(builderForValue.build()); + } + timeContextCase_ = 1; + return this; + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder mergeAccessTime(com.google.protobuf.Timestamp value) { + if (accessTimeBuilder_ == null) { + if (timeContextCase_ == 1 && + timeContext_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + timeContext_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) timeContext_) + .mergeFrom(value).buildPartial(); + } else { + timeContext_ = value; + } + onChanged(); + } else { + if (timeContextCase_ == 1) { + accessTimeBuilder_.mergeFrom(value); + } else { + accessTimeBuilder_.setMessage(value); + } + } + timeContextCase_ = 1; + return this; + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder clearAccessTime() { + if (accessTimeBuilder_ == null) { + if (timeContextCase_ == 1) { + timeContextCase_ = 0; + timeContext_ = null; + onChanged(); + } + } else { + if (timeContextCase_ == 1) { + timeContextCase_ = 0; + timeContext_ = null; + } + accessTimeBuilder_.clear(); + } + return this; + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getAccessTimeBuilder() { + return getAccessTimeFieldBuilder().getBuilder(); + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { + if ((timeContextCase_ == 1) && (accessTimeBuilder_ != null)) { + return accessTimeBuilder_.getMessageOrBuilder(); + } else { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+       * The hypothetical access timestamp to evaluate IAM conditions. Note that
+       * this value must not be earlier than the current time; otherwise, an
+       * INVALID_ARGUMENT error will be returned.
+       * 
+ * + * .google.protobuf.Timestamp access_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getAccessTimeFieldBuilder() { + if (accessTimeBuilder_ == null) { + if (!(timeContextCase_ == 1)) { + timeContext_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + accessTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) timeContext_, + getParentForChildren(), + isClean()); + timeContext_ = null; + } + timeContextCase_ = 1; + onChanged();; + return accessTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConditionContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + *
+   * Required. The relative name of the root asset. Only resources and IAM
+   * policies within the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + *
+   * Required. The relative name of the root asset. Only resources and IAM
+   * policies within the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; + /** + *
+   * Optional. Specifies a resource for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the resourceSelector field is set. + */ + @java.lang.Override + public boolean hasResourceSelector() { + return resourceSelector_ != null; + } + /** + *
+   * Optional. Specifies a resource for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The resourceSelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { + return resourceSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() : resourceSelector_; + } + /** + *
+   * Optional. Specifies a resource for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder() { + return getResourceSelector(); + } + + public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; + /** + *
+   * Optional. Specifies an identity for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the identitySelector field is set. + */ + @java.lang.Override + public boolean hasIdentitySelector() { + return identitySelector_ != null; + } + /** + *
+   * Optional. Specifies an identity for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The identitySelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { + return identitySelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() : identitySelector_; + } + /** + *
+   * Optional. Specifies an identity for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder() { + return getIdentitySelector(); + } + + public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; + /** + *
+   * Optional. Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the accessSelector field is set. + */ + @java.lang.Override + public boolean hasAccessSelector() { + return accessSelector_ != null; + } + /** + *
+   * Optional. Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The accessSelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { + return accessSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() : accessSelector_; + } + /** + *
+   * Optional. Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder() { + return getAccessSelector(); + } + + public static final int OPTIONS_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; + /** + *
+   * Optional. The query options.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return options_ != null; + } + /** + *
+   * Optional. The query options.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The options. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { + return options_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() : options_; + } + /** + *
+   * Optional. The query options.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { + return getOptions(); + } + + public static final int CONDITION_CONTEXT_FIELD_NUMBER = 6; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; + /** + *
+   * Optional. The hypothetical context for IAM conditions evaluation.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the conditionContext field is set. + */ + @java.lang.Override + public boolean hasConditionContext() { + return conditionContext_ != null; + } + /** + *
+   * Optional. The hypothetical context for IAM conditions evaluation.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The conditionContext. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { + return conditionContext_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() : conditionContext_; + } + /** + *
+   * Optional. The hypothetical context for IAM conditions evaluation.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder() { + return getConditionContext(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); + } + if (resourceSelector_ != null) { + output.writeMessage(2, getResourceSelector()); + } + if (identitySelector_ != null) { + output.writeMessage(3, getIdentitySelector()); + } + if (accessSelector_ != null) { + output.writeMessage(4, getAccessSelector()); + } + if (options_ != null) { + output.writeMessage(5, getOptions()); + } + if (conditionContext_ != null) { + output.writeMessage(6, getConditionContext()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); + } + if (resourceSelector_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResourceSelector()); + } + if (identitySelector_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getIdentitySelector()); + } + if (accessSelector_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getAccessSelector()); + } + if (options_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getOptions()); + } + if (conditionContext_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getConditionContext()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) obj; + + if (!getScope() + .equals(other.getScope())) return false; + if (hasResourceSelector() != other.hasResourceSelector()) return false; + if (hasResourceSelector()) { + if (!getResourceSelector() + .equals(other.getResourceSelector())) return false; + } + if (hasIdentitySelector() != other.hasIdentitySelector()) return false; + if (hasIdentitySelector()) { + if (!getIdentitySelector() + .equals(other.getIdentitySelector())) return false; + } + if (hasAccessSelector() != other.hasAccessSelector()) return false; + if (hasAccessSelector()) { + if (!getAccessSelector() + .equals(other.getAccessSelector())) return false; + } + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions() + .equals(other.getOptions())) return false; + } + if (hasConditionContext() != other.hasConditionContext()) return false; + if (hasConditionContext()) { + if (!getConditionContext() + .equals(other.getConditionContext())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + if (hasResourceSelector()) { + hash = (37 * hash) + RESOURCE_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getResourceSelector().hashCode(); + } + if (hasIdentitySelector()) { + hash = (37 * hash) + IDENTITY_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getIdentitySelector().hashCode(); + } + if (hasAccessSelector()) { + hash = (37 * hash) + ACCESS_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getAccessSelector().hashCode(); + } + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + if (hasConditionContext()) { + hash = (37 * hash) + CONDITION_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getConditionContext().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * IAM policy analysis query message.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + scope_ = ""; + + if (resourceSelectorBuilder_ == null) { + resourceSelector_ = null; + } else { + resourceSelector_ = null; + resourceSelectorBuilder_ = null; + } + if (identitySelectorBuilder_ == null) { + identitySelector_ = null; + } else { + identitySelector_ = null; + identitySelectorBuilder_ = null; + } + if (accessSelectorBuilder_ == null) { + accessSelector_ = null; + } else { + accessSelector_ = null; + accessSelectorBuilder_ = null; + } + if (optionsBuilder_ == null) { + options_ = null; + } else { + options_ = null; + optionsBuilder_ = null; + } + if (conditionContextBuilder_ == null) { + conditionContext_ = null; + } else { + conditionContext_ = null; + conditionContextBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(this); + result.scope_ = scope_; + if (resourceSelectorBuilder_ == null) { + result.resourceSelector_ = resourceSelector_; + } else { + result.resourceSelector_ = resourceSelectorBuilder_.build(); + } + if (identitySelectorBuilder_ == null) { + result.identitySelector_ = identitySelector_; + } else { + result.identitySelector_ = identitySelectorBuilder_.build(); + } + if (accessSelectorBuilder_ == null) { + result.accessSelector_ = accessSelector_; + } else { + result.accessSelector_ = accessSelectorBuilder_.build(); + } + if (optionsBuilder_ == null) { + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } + if (conditionContextBuilder_ == null) { + result.conditionContext_ = conditionContext_; + } else { + result.conditionContext_ = conditionContextBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance()) return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + onChanged(); + } + if (other.hasResourceSelector()) { + mergeResourceSelector(other.getResourceSelector()); + } + if (other.hasIdentitySelector()) { + mergeIdentitySelector(other.getIdentitySelector()); + } + if (other.hasAccessSelector()) { + mergeAccessSelector(other.getAccessSelector()); + } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + if (other.hasConditionContext()) { + mergeConditionContext(other.getConditionContext()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object scope_ = ""; + /** + *
+     * Required. The relative name of the root asset. Only resources and IAM
+     * policies within the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. Only resources and IAM
+     * policies within the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. Only resources and IAM
+     * policies within the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. Only resources and IAM
+     * policies within the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = getDefaultInstance().getScope(); + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. Only resources and IAM
+     * policies within the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scope_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> resourceSelectorBuilder_; + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the resourceSelector field is set. + */ + public boolean hasResourceSelector() { + return resourceSelectorBuilder_ != null || resourceSelector_ != null; + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The resourceSelector. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { + if (resourceSelectorBuilder_ == null) { + return resourceSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() : resourceSelector_; + } else { + return resourceSelectorBuilder_.getMessage(); + } + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setResourceSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { + if (resourceSelectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceSelector_ = value; + onChanged(); + } else { + resourceSelectorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setResourceSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder builderForValue) { + if (resourceSelectorBuilder_ == null) { + resourceSelector_ = builderForValue.build(); + onChanged(); + } else { + resourceSelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeResourceSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { + if (resourceSelectorBuilder_ == null) { + if (resourceSelector_ != null) { + resourceSelector_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.newBuilder(resourceSelector_).mergeFrom(value).buildPartial(); + } else { + resourceSelector_ = value; + } + onChanged(); + } else { + resourceSelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearResourceSelector() { + if (resourceSelectorBuilder_ == null) { + resourceSelector_ = null; + onChanged(); + } else { + resourceSelector_ = null; + resourceSelectorBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder getResourceSelectorBuilder() { + + onChanged(); + return getResourceSelectorFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder() { + if (resourceSelectorBuilder_ != null) { + return resourceSelectorBuilder_.getMessageOrBuilder(); + } else { + return resourceSelector_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() : resourceSelector_; + } + } + /** + *
+     * Optional. Specifies a resource for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> + getResourceSelectorFieldBuilder() { + if (resourceSelectorBuilder_ == null) { + resourceSelectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>( + getResourceSelector(), + getParentForChildren(), + isClean()); + resourceSelector_ = null; + } + return resourceSelectorBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> identitySelectorBuilder_; + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the identitySelector field is set. + */ + public boolean hasIdentitySelector() { + return identitySelectorBuilder_ != null || identitySelector_ != null; + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The identitySelector. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { + if (identitySelectorBuilder_ == null) { + return identitySelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() : identitySelector_; + } else { + return identitySelectorBuilder_.getMessage(); + } + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setIdentitySelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { + if (identitySelectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identitySelector_ = value; + onChanged(); + } else { + identitySelectorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setIdentitySelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder builderForValue) { + if (identitySelectorBuilder_ == null) { + identitySelector_ = builderForValue.build(); + onChanged(); + } else { + identitySelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeIdentitySelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { + if (identitySelectorBuilder_ == null) { + if (identitySelector_ != null) { + identitySelector_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.newBuilder(identitySelector_).mergeFrom(value).buildPartial(); + } else { + identitySelector_ = value; + } + onChanged(); + } else { + identitySelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearIdentitySelector() { + if (identitySelectorBuilder_ == null) { + identitySelector_ = null; + onChanged(); + } else { + identitySelector_ = null; + identitySelectorBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder getIdentitySelectorBuilder() { + + onChanged(); + return getIdentitySelectorFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder() { + if (identitySelectorBuilder_ != null) { + return identitySelectorBuilder_.getMessageOrBuilder(); + } else { + return identitySelector_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() : identitySelector_; + } + } + /** + *
+     * Optional. Specifies an identity for analysis.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> + getIdentitySelectorFieldBuilder() { + if (identitySelectorBuilder_ == null) { + identitySelectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>( + getIdentitySelector(), + getParentForChildren(), + isClean()); + identitySelector_ = null; + } + return identitySelectorBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> accessSelectorBuilder_; + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the accessSelector field is set. + */ + public boolean hasAccessSelector() { + return accessSelectorBuilder_ != null || accessSelector_ != null; + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The accessSelector. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { + if (accessSelectorBuilder_ == null) { + return accessSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() : accessSelector_; + } else { + return accessSelectorBuilder_.getMessage(); + } + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setAccessSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { + if (accessSelectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessSelector_ = value; + onChanged(); + } else { + accessSelectorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setAccessSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder builderForValue) { + if (accessSelectorBuilder_ == null) { + accessSelector_ = builderForValue.build(); + onChanged(); + } else { + accessSelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeAccessSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { + if (accessSelectorBuilder_ == null) { + if (accessSelector_ != null) { + accessSelector_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.newBuilder(accessSelector_).mergeFrom(value).buildPartial(); + } else { + accessSelector_ = value; + } + onChanged(); + } else { + accessSelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearAccessSelector() { + if (accessSelectorBuilder_ == null) { + accessSelector_ = null; + onChanged(); + } else { + accessSelector_ = null; + accessSelectorBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder getAccessSelectorBuilder() { + + onChanged(); + return getAccessSelectorFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder() { + if (accessSelectorBuilder_ != null) { + return accessSelectorBuilder_.getMessageOrBuilder(); + } else { + return accessSelector_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() : accessSelector_; + } + } + /** + *
+     * Optional. Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> + getAccessSelectorFieldBuilder() { + if (accessSelectorBuilder_ == null) { + accessSelectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>( + getAccessSelector(), + getParentForChildren(), + isClean()); + accessSelector_ = null; + } + return accessSelectorBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> optionsBuilder_; + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return optionsBuilder_ != null || options_ != null; + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The options. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { + if (optionsBuilder_ == null) { + return options_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + optionsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setOptions( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { + if (optionsBuilder_ == null) { + if (options_ != null) { + options_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.newBuilder(options_).mergeFrom(value).buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + optionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = null; + onChanged(); + } else { + options_ = null; + optionsBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder getOptionsBuilder() { + + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() : options_; + } + } + /** + *
+     * Optional. The query options.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder>( + getOptions(), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> conditionContextBuilder_; + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the conditionContext field is set. + */ + public boolean hasConditionContext() { + return conditionContextBuilder_ != null || conditionContext_ != null; + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The conditionContext. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { + if (conditionContextBuilder_ == null) { + return conditionContext_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() : conditionContext_; + } else { + return conditionContextBuilder_.getMessage(); + } + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setConditionContext(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { + if (conditionContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conditionContext_ = value; + onChanged(); + } else { + conditionContextBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setConditionContext( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder builderForValue) { + if (conditionContextBuilder_ == null) { + conditionContext_ = builderForValue.build(); + onChanged(); + } else { + conditionContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeConditionContext(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { + if (conditionContextBuilder_ == null) { + if (conditionContext_ != null) { + conditionContext_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.newBuilder(conditionContext_).mergeFrom(value).buildPartial(); + } else { + conditionContext_ = value; + } + onChanged(); + } else { + conditionContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearConditionContext() { + if (conditionContextBuilder_ == null) { + conditionContext_ = null; + onChanged(); + } else { + conditionContext_ = null; + conditionContextBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder getConditionContextBuilder() { + + onChanged(); + return getConditionContextFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder() { + if (conditionContextBuilder_ != null) { + return conditionContextBuilder_.getMessageOrBuilder(); + } else { + return conditionContext_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() : conditionContext_; + } + } + /** + *
+     * Optional. The hypothetical context for IAM conditions evaluation.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> + getConditionContextFieldBuilder() { + if (conditionContextBuilder_ == null) { + conditionContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder>( + getConditionContext(), + getParentForChildren(), + isClean()); + conditionContext_ = null; + } + return conditionContextBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisQuery(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java new file mode 100644 index 000000000000..ed674b9206e1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java @@ -0,0 +1,180 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface IamPolicyAnalysisQueryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative name of the root asset. Only resources and IAM
+   * policies within the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + java.lang.String getScope(); + /** + *
+   * Required. The relative name of the root asset. Only resources and IAM
+   * policies within the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + com.google.protobuf.ByteString + getScopeBytes(); + + /** + *
+   * Optional. Specifies a resource for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the resourceSelector field is set. + */ + boolean hasResourceSelector(); + /** + *
+   * Optional. Specifies a resource for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The resourceSelector. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector(); + /** + *
+   * Optional. Specifies a resource for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder(); + + /** + *
+   * Optional. Specifies an identity for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the identitySelector field is set. + */ + boolean hasIdentitySelector(); + /** + *
+   * Optional. Specifies an identity for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The identitySelector. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector(); + /** + *
+   * Optional. Specifies an identity for analysis.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder(); + + /** + *
+   * Optional. Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the accessSelector field is set. + */ + boolean hasAccessSelector(); + /** + *
+   * Optional. Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The accessSelector. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector(); + /** + *
+   * Optional. Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder(); + + /** + *
+   * Optional. The query options.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + *
+   * Optional. The query options.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The options. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions(); + /** + *
+   * Optional. The query options.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder(); + + /** + *
+   * Optional. The hypothetical context for IAM conditions evaluation.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the conditionContext field is set. + */ + boolean hasConditionContext(); + /** + *
+   * Optional. The hypothetical context for IAM conditions evaluation.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The conditionContext. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext(); + /** + *
+   * Optional. The hypothetical context for IAM conditions evaluation.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java new file mode 100644 index 000000000000..751df6709dc7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java @@ -0,0 +1,9843 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * IAM Policy analysis result, consisting of one IAM policy binding and derived
+ * access control lists.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult} + */ +public final class IamPolicyAnalysisResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult) + IamPolicyAnalysisResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisResult.newBuilder() to construct. + private IamPolicyAnalysisResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IamPolicyAnalysisResult() { + attachedResourceFullName_ = ""; + accessControlLists_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IamPolicyAnalysisResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IamPolicyAnalysisResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + attachedResourceFullName_ = s; + break; + } + case 18: { + com.google.iam.v1.Binding.Builder subBuilder = null; + if (iamBinding_ != null) { + subBuilder = iamBinding_.toBuilder(); + } + iamBinding_ = input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamBinding_); + iamBinding_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + accessControlLists_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.parser(), extensionRegistry)); + break; + } + case 34: { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder subBuilder = null; + if (identityList_ != null) { + subBuilder = identityList_.toBuilder(); + } + identityList_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(identityList_); + identityList_ = subBuilder.buildPartial(); + } + + break; + } + case 40: { + + fullyExplored_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = java.util.Collections.unmodifiableList(accessControlLists_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder.class); + } + + public interface ResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * 
+ * + * string full_resource_name = 1; + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * 
+ * + * string full_resource_name = 1; + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString + getFullResourceNameBytes(); + + /** + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return The analysisState. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); + /** + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); + } + /** + *
+   * A Google Cloud resource under analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Resource} + */ + public static final class Resource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + ResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Resource() { + fullResourceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Resource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fullResourceName_ = s; + break; + } + case 18: { + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisState_); + analysisState_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder.class); + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fullResourceName_; + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * 
+ * + * string full_resource_name = 1; + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * 
+ * + * string full_resource_name = 1; + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_STATE_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + /** + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return Whether the analysisState field is set. + */ + @java.lang.Override + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return The analysisState. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } + /** + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + return getAnalysisState(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); + } + if (analysisState_ != null) { + output.writeMessage(2, getAnalysisState()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); + } + if (analysisState_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAnalysisState()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) obj; + + if (!getFullResourceName() + .equals(other.getFullResourceName())) return false; + if (hasAnalysisState() != other.hasAnalysisState()) return false; + if (hasAnalysisState()) { + if (!getAnalysisState() + .equals(other.getAnalysisState())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + if (hasAnalysisState()) { + hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisState().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A Google Cloud resource under analysis.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Resource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + fullResourceName_ = ""; + + if (analysisStateBuilder_ == null) { + analysisState_ = null; + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource(this); + result.fullResourceName_ = fullResourceName_; + if (analysisStateBuilder_ == null) { + result.analysisState_ = analysisState_; + } else { + result.analysisState_ = analysisStateBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()) return this; + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + onChanged(); + } + if (other.hasAnalysisState()) { + mergeAnalysisState(other.getAnalysisState()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object fullResourceName_ = ""; + /** + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * 
+ * + * string full_resource_name = 1; + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * 
+ * + * string full_resource_name = 1; + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * 
+ * + * string full_resource_name = 1; + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResourceName_ = value; + onChanged(); + return this; + } + /** + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * 
+ * + * string full_resource_name = 1; + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * 
+ * + * string full_resource_name = 1; + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResourceName_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> analysisStateBuilder_; + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return The analysisState. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisState_ = value; + onChanged(); + } else { + analysisStateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_).mergeFrom(value).buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder clearAnalysisState() { + if (analysisStateBuilder_ == null) { + analysisState_ = null; + onChanged(); + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + + return this; + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } + } + /** + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + getAnalysisState(), + getParentForChildren(), + isClean()); + analysisState_ = null; + } + return analysisStateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccessOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The role.
+     * 
+ * + * string role = 1; + * @return Whether the role field is set. + */ + boolean hasRole(); + /** + *
+     * The role.
+     * 
+ * + * string role = 1; + * @return The role. + */ + java.lang.String getRole(); + /** + *
+     * The role.
+     * 
+ * + * string role = 1; + * @return The bytes for role. + */ + com.google.protobuf.ByteString + getRoleBytes(); + + /** + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * @return Whether the permission field is set. + */ + boolean hasPermission(); + /** + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * @return The permission. + */ + java.lang.String getPermission(); + /** + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * @return The bytes for permission. + */ + com.google.protobuf.ByteString + getPermissionBytes(); + + /** + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * @return The analysisState. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); + /** + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); + + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.OneofAccessCase getOneofAccessCase(); + } + /** + *
+   * An IAM role or permission under analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Access} + */ + public static final class Access extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + AccessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Access.newBuilder() to construct. + private Access(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Access() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Access(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Access( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + oneofAccessCase_ = 1; + oneofAccess_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + oneofAccessCase_ = 2; + oneofAccess_ = s; + break; + } + case 26: { + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisState_); + analysisState_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder.class); + } + + private int oneofAccessCase_ = 0; + private java.lang.Object oneofAccess_; + public enum OneofAccessCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ROLE(1), + PERMISSION(2), + ONEOFACCESS_NOT_SET(0); + private final int value; + private OneofAccessCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneofAccessCase valueOf(int value) { + return forNumber(value); + } + + public static OneofAccessCase forNumber(int value) { + switch (value) { + case 1: return ROLE; + case 2: return PERMISSION; + case 0: return ONEOFACCESS_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public OneofAccessCase + getOneofAccessCase() { + return OneofAccessCase.forNumber( + oneofAccessCase_); + } + + public static final int ROLE_FIELD_NUMBER = 1; + /** + *
+     * The role.
+     * 
+ * + * string role = 1; + * @return Whether the role field is set. + */ + public boolean hasRole() { + return oneofAccessCase_ == 1; + } + /** + *
+     * The role.
+     * 
+ * + * string role = 1; + * @return The role. + */ + public java.lang.String getRole() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneofAccessCase_ == 1) { + oneofAccess_ = s; + } + return s; + } + } + /** + *
+     * The role.
+     * 
+ * + * string role = 1; + * @return The bytes for role. + */ + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (oneofAccessCase_ == 1) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + /** + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * @return Whether the permission field is set. + */ + public boolean hasPermission() { + return oneofAccessCase_ == 2; + } + /** + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneofAccessCase_ == 2) { + oneofAccess_ = s; + } + return s; + } + } + /** + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (oneofAccessCase_ == 2) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_STATE_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + /** + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * @return Whether the analysisState field is set. + */ + @java.lang.Override + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * @return The analysisState. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } + /** + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + return getAnalysisState(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (oneofAccessCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, oneofAccess_); + } + if (oneofAccessCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, oneofAccess_); + } + if (analysisState_ != null) { + output.writeMessage(3, getAnalysisState()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oneofAccessCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, oneofAccess_); + } + if (oneofAccessCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, oneofAccess_); + } + if (analysisState_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAnalysisState()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) obj; + + if (hasAnalysisState() != other.hasAnalysisState()) return false; + if (hasAnalysisState()) { + if (!getAnalysisState() + .equals(other.getAnalysisState())) return false; + } + if (!getOneofAccessCase().equals(other.getOneofAccessCase())) return false; + switch (oneofAccessCase_) { + case 1: + if (!getRole() + .equals(other.getRole())) return false; + break; + case 2: + if (!getPermission() + .equals(other.getPermission())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnalysisState()) { + hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisState().hashCode(); + } + switch (oneofAccessCase_) { + case 1: + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + break; + case 2: + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * An IAM role or permission under analysis.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Access} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (analysisStateBuilder_ == null) { + analysisState_ = null; + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + oneofAccessCase_ = 0; + oneofAccess_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access(this); + if (oneofAccessCase_ == 1) { + result.oneofAccess_ = oneofAccess_; + } + if (oneofAccessCase_ == 2) { + result.oneofAccess_ = oneofAccess_; + } + if (analysisStateBuilder_ == null) { + result.analysisState_ = analysisState_; + } else { + result.analysisState_ = analysisStateBuilder_.build(); + } + result.oneofAccessCase_ = oneofAccessCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()) return this; + if (other.hasAnalysisState()) { + mergeAnalysisState(other.getAnalysisState()); + } + switch (other.getOneofAccessCase()) { + case ROLE: { + oneofAccessCase_ = 1; + oneofAccess_ = other.oneofAccess_; + onChanged(); + break; + } + case PERMISSION: { + oneofAccessCase_ = 2; + oneofAccess_ = other.oneofAccess_; + onChanged(); + break; + } + case ONEOFACCESS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int oneofAccessCase_ = 0; + private java.lang.Object oneofAccess_; + public OneofAccessCase + getOneofAccessCase() { + return OneofAccessCase.forNumber( + oneofAccessCase_); + } + + public Builder clearOneofAccess() { + oneofAccessCase_ = 0; + oneofAccess_ = null; + onChanged(); + return this; + } + + + /** + *
+       * The role.
+       * 
+ * + * string role = 1; + * @return Whether the role field is set. + */ + @java.lang.Override + public boolean hasRole() { + return oneofAccessCase_ == 1; + } + /** + *
+       * The role.
+       * 
+ * + * string role = 1; + * @return The role. + */ + @java.lang.Override + public java.lang.String getRole() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneofAccessCase_ == 1) { + oneofAccess_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The role.
+       * 
+ * + * string role = 1; + * @return The bytes for role. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRoleBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (oneofAccessCase_ == 1) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The role.
+       * 
+ * + * string role = 1; + * @param value The role to set. + * @return This builder for chaining. + */ + public Builder setRole( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oneofAccessCase_ = 1; + oneofAccess_ = value; + onChanged(); + return this; + } + /** + *
+       * The role.
+       * 
+ * + * string role = 1; + * @return This builder for chaining. + */ + public Builder clearRole() { + if (oneofAccessCase_ == 1) { + oneofAccessCase_ = 0; + oneofAccess_ = null; + onChanged(); + } + return this; + } + /** + *
+       * The role.
+       * 
+ * + * string role = 1; + * @param value The bytes for role to set. + * @return This builder for chaining. + */ + public Builder setRoleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oneofAccessCase_ = 1; + oneofAccess_ = value; + onChanged(); + return this; + } + + /** + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * @return Whether the permission field is set. + */ + @java.lang.Override + public boolean hasPermission() { + return oneofAccessCase_ == 2; + } + /** + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneofAccessCase_ == 2) { + oneofAccess_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPermissionBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (oneofAccessCase_ == 2) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oneofAccessCase_ = 2; + oneofAccess_ = value; + onChanged(); + return this; + } + /** + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * @return This builder for chaining. + */ + public Builder clearPermission() { + if (oneofAccessCase_ == 2) { + oneofAccessCase_ = 0; + oneofAccess_ = null; + onChanged(); + } + return this; + } + /** + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oneofAccessCase_ = 2; + oneofAccess_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> analysisStateBuilder_; + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * @return The analysisState. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisState_ = value; + onChanged(); + } else { + analysisStateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_).mergeFrom(value).buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder clearAnalysisState() { + if (analysisStateBuilder_ == null) { + analysisState_ = null; + onChanged(); + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + + return this; + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } + } + /** + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + getAnalysisState(), + getParentForChildren(), + isClean()); + analysisState_ = null; + } + return analysisStateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Access parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Access(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IdentityOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return The analysisState. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); + /** + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); + } + /** + *
+   * An identity under analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Identity} + */ + public static final class Identity extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + IdentityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Identity.newBuilder() to construct. + private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Identity() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Identity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Identity( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisState_); + analysisState_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_STATE_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + /** + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return Whether the analysisState field is set. + */ + @java.lang.Override + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return The analysisState. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } + /** + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + return getAnalysisState(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (analysisState_ != null) { + output.writeMessage(2, getAnalysisState()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (analysisState_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAnalysisState()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasAnalysisState() != other.hasAnalysisState()) return false; + if (hasAnalysisState()) { + if (!getAnalysisState() + .equals(other.getAnalysisState())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasAnalysisState()) { + hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisState().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * An identity under analysis.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Identity} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (analysisStateBuilder_ == null) { + analysisState_ = null; + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity(this); + result.name_ = name_; + if (analysisStateBuilder_ == null) { + result.analysisState_ = analysisState_; + } else { + result.analysisState_ = analysisStateBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasAnalysisState()) { + mergeAnalysisState(other.getAnalysisState()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> analysisStateBuilder_; + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * @return The analysisState. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisState_ = value; + onChanged(); + } else { + analysisStateBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_).mergeFrom(value).buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder clearAnalysisState() { + if (analysisStateBuilder_ == null) { + analysisState_ = null; + onChanged(); + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + + return this; + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; + } + } + /** + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + getAnalysisState(), + getParentForChildren(), + isClean()); + analysisState_ = null; + } + return analysisStateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Identity(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface EdgeOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * @return The sourceNode. + */ + java.lang.String getSourceNode(); + /** + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * @return The bytes for sourceNode. + */ + com.google.protobuf.ByteString + getSourceNodeBytes(); + + /** + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * @return The targetNode. + */ + java.lang.String getTargetNode(); + /** + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * @return The bytes for targetNode. + */ + com.google.protobuf.ByteString + getTargetNodeBytes(); + } + /** + *
+   * A directional edge.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Edge} + */ + public static final class Edge extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + EdgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Edge.newBuilder() to construct. + private Edge(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Edge() { + sourceNode_ = ""; + targetNode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Edge(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Edge( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + sourceNode_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + targetNode_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder.class); + } + + public static final int SOURCE_NODE_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceNode_; + /** + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * @return The sourceNode. + */ + @java.lang.Override + public java.lang.String getSourceNode() { + java.lang.Object ref = sourceNode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceNode_ = s; + return s; + } + } + /** + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * @return The bytes for sourceNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceNodeBytes() { + java.lang.Object ref = sourceNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_NODE_FIELD_NUMBER = 2; + private volatile java.lang.Object targetNode_; + /** + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * @return The targetNode. + */ + @java.lang.Override + public java.lang.String getTargetNode() { + java.lang.Object ref = targetNode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetNode_ = s; + return s; + } + } + /** + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * @return The bytes for targetNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetNodeBytes() { + java.lang.Object ref = targetNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceNode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetNode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetNode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceNode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceNode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetNode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetNode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) obj; + + if (!getSourceNode() + .equals(other.getSourceNode())) return false; + if (!getTargetNode() + .equals(other.getTargetNode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SOURCE_NODE_FIELD_NUMBER; + hash = (53 * hash) + getSourceNode().hashCode(); + hash = (37 * hash) + TARGET_NODE_FIELD_NUMBER; + hash = (53 * hash) + getTargetNode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * A directional edge.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Edge} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + sourceNode_ = ""; + + targetNode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge(this); + result.sourceNode_ = sourceNode_; + result.targetNode_ = targetNode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()) return this; + if (!other.getSourceNode().isEmpty()) { + sourceNode_ = other.sourceNode_; + onChanged(); + } + if (!other.getTargetNode().isEmpty()) { + targetNode_ = other.targetNode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sourceNode_ = ""; + /** + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * @return The sourceNode. + */ + public java.lang.String getSourceNode() { + java.lang.Object ref = sourceNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * @return The bytes for sourceNode. + */ + public com.google.protobuf.ByteString + getSourceNodeBytes() { + java.lang.Object ref = sourceNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * @param value The sourceNode to set. + * @return This builder for chaining. + */ + public Builder setSourceNode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceNode_ = value; + onChanged(); + return this; + } + /** + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * @return This builder for chaining. + */ + public Builder clearSourceNode() { + + sourceNode_ = getDefaultInstance().getSourceNode(); + onChanged(); + return this; + } + /** + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * @param value The bytes for sourceNode to set. + * @return This builder for chaining. + */ + public Builder setSourceNodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceNode_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetNode_ = ""; + /** + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * @return The targetNode. + */ + public java.lang.String getTargetNode() { + java.lang.Object ref = targetNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * @return The bytes for targetNode. + */ + public com.google.protobuf.ByteString + getTargetNodeBytes() { + java.lang.Object ref = targetNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * @param value The targetNode to set. + * @return This builder for chaining. + */ + public Builder setTargetNode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetNode_ = value; + onChanged(); + return this; + } + /** + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * @return This builder for chaining. + */ + public Builder clearTargetNode() { + + targetNode_ = getDefaultInstance().getTargetNode(); + onChanged(); + return this; + } + /** + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * @param value The bytes for targetNode to set. + * @return This builder for chaining. + */ + public Builder setTargetNodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetNode_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Edge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Edge(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccessControlListOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + java.util.List + getResourcesList(); + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index); + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + int getResourcesCount(); + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + java.util.List + getResourcesOrBuilderList(); + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder getResourcesOrBuilder( + int index); + + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + java.util.List + getAccessesList(); + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index); + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + int getAccessesCount(); + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + java.util.List + getAccessesOrBuilderList(); + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( + int index); + + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + java.util.List + getResourceEdgesList(); + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index); + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + int getResourceEdgesCount(); + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + java.util.List + getResourceEdgesOrBuilderList(); + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( + int index); + + /** + *
+     * Condition evaluation for this AccessControlList, if there is a condition
+     * defined in the above IAM policy binding.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * @return Whether the conditionEvaluation field is set. + */ + boolean hasConditionEvaluation(); + /** + *
+     * Condition evaluation for this AccessControlList, if there is a condition
+     * defined in the above IAM policy binding.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * @return The conditionEvaluation. + */ + com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation(); + /** + *
+     * Condition evaluation for this AccessControlList, if there is a condition
+     * defined in the above IAM policy binding.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + com.google.cloud.asset.v1.ConditionEvaluationOrBuilder getConditionEvaluationOrBuilder(); + } + /** + *
+   * An access control list, derived from the above IAM policy binding, which
+   * contains a set of resources and accesses. May include one
+   * item from each set to compose an access control entry.
+   * NOTICE that there could be multiple access control lists for one IAM policy
+   * binding. The access control lists are created based on resource and access
+   * combinations.
+   * For example, assume we have the following cases in one IAM policy binding:
+   * - Permission P1 and P2 apply to resource R1 and R2;
+   * - Permission P3 applies to resource R2 and R3;
+   * This will result in the following access control lists:
+   * - AccessControlList 1: [R1, R2], [P1, P2]
+   * - AccessControlList 2: [R2, R3], [P3]
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList} + */ + public static final class AccessControlList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + AccessControlListOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccessControlList.newBuilder() to construct. + private AccessControlList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AccessControlList() { + resources_ = java.util.Collections.emptyList(); + accesses_ = java.util.Collections.emptyList(); + resourceEdges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AccessControlList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AccessControlList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + accesses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + accesses_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.parser(), extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + resourceEdges_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.parser(), extensionRegistry)); + break; + } + case 34: { + com.google.cloud.asset.v1.ConditionEvaluation.Builder subBuilder = null; + if (conditionEvaluation_ != null) { + subBuilder = conditionEvaluation_.toBuilder(); + } + conditionEvaluation_ = input.readMessage(com.google.cloud.asset.v1.ConditionEvaluation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(conditionEvaluation_); + conditionEvaluation_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + accesses_ = java.util.Collections.unmodifiableList(accesses_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = java.util.Collections.unmodifiableList(resourceEdges_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder.class); + } + + public static final int RESOURCES_FIELD_NUMBER = 1; + private java.util.List resources_; + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public java.util.List getResourcesList() { + return resources_; + } + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public java.util.List + getResourcesOrBuilderList() { + return resources_; + } + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public int getResourcesCount() { + return resources_.size(); + } + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index) { + return resources_.get(index); + } + /** + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder getResourcesOrBuilder( + int index) { + return resources_.get(index); + } + + public static final int ACCESSES_FIELD_NUMBER = 2; + private java.util.List accesses_; + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public java.util.List getAccessesList() { + return accesses_; + } + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public java.util.List + getAccessesOrBuilderList() { + return accesses_; + } + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public int getAccessesCount() { + return accesses_.size(); + } + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index) { + return accesses_.get(index); + } + /** + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( + int index) { + return accesses_.get(index); + } + + public static final int RESOURCE_EDGES_FIELD_NUMBER = 3; + private java.util.List resourceEdges_; + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public java.util.List getResourceEdgesList() { + return resourceEdges_; + } + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public java.util.List + getResourceEdgesOrBuilderList() { + return resourceEdges_; + } + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public int getResourceEdgesCount() { + return resourceEdges_.size(); + } + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index) { + return resourceEdges_.get(index); + } + /** + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains the full resource name of a parent resource and
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( + int index) { + return resourceEdges_.get(index); + } + + public static final int CONDITION_EVALUATION_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.ConditionEvaluation conditionEvaluation_; + /** + *
+     * Condition evaluation for this AccessControlList, if there is a condition
+     * defined in the above IAM policy binding.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * @return Whether the conditionEvaluation field is set. + */ + @java.lang.Override + public boolean hasConditionEvaluation() { + return conditionEvaluation_ != null; + } + /** + *
+     * Condition evaluation for this AccessControlList, if there is a condition
+     * defined in the above IAM policy binding.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * @return The conditionEvaluation. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation() { + return conditionEvaluation_ == null ? com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() : conditionEvaluation_; + } + /** + *
+     * Condition evaluation for this AccessControlList, if there is a condition
+     * defined in the above IAM policy binding.
+     * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluationOrBuilder getConditionEvaluationOrBuilder() { + return getConditionEvaluation(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < resources_.size(); i++) { + output.writeMessage(1, resources_.get(i)); + } + for (int i = 0; i < accesses_.size(); i++) { + output.writeMessage(2, accesses_.get(i)); + } + for (int i = 0; i < resourceEdges_.size(); i++) { + output.writeMessage(3, resourceEdges_.get(i)); + } + if (conditionEvaluation_ != null) { + output.writeMessage(4, getConditionEvaluation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, resources_.get(i)); + } + for (int i = 0; i < accesses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, accesses_.get(i)); + } + for (int i = 0; i < resourceEdges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, resourceEdges_.get(i)); + } + if (conditionEvaluation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getConditionEvaluation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) obj; + + if (!getResourcesList() + .equals(other.getResourcesList())) return false; + if (!getAccessesList() + .equals(other.getAccessesList())) return false; + if (!getResourceEdgesList() + .equals(other.getResourceEdgesList())) return false; + if (hasConditionEvaluation() != other.hasConditionEvaluation()) return false; + if (hasConditionEvaluation()) { + if (!getConditionEvaluation() + .equals(other.getConditionEvaluation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + if (getAccessesCount() > 0) { + hash = (37 * hash) + ACCESSES_FIELD_NUMBER; + hash = (53 * hash) + getAccessesList().hashCode(); + } + if (getResourceEdgesCount() > 0) { + hash = (37 * hash) + RESOURCE_EDGES_FIELD_NUMBER; + hash = (53 * hash) + getResourceEdgesList().hashCode(); + } + if (hasConditionEvaluation()) { + hash = (37 * hash) + CONDITION_EVALUATION_FIELD_NUMBER; + hash = (53 * hash) + getConditionEvaluation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * An access control list, derived from the above IAM policy binding, which
+     * contains a set of resources and accesses. May include one
+     * item from each set to compose an access control entry.
+     * NOTICE that there could be multiple access control lists for one IAM policy
+     * binding. The access control lists are created based on resource and access
+     * combinations.
+     * For example, assume we have the following cases in one IAM policy binding:
+     * - Permission P1 and P2 apply to resource R1 and R2;
+     * - Permission P3 applies to resource R2 and R3;
+     * This will result in the following access control lists:
+     * - AccessControlList 1: [R1, R2], [P1, P2]
+     * - AccessControlList 2: [R2, R3], [P3]
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResourcesFieldBuilder(); + getAccessesFieldBuilder(); + getResourceEdgesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourcesBuilder_.clear(); + } + if (accessesBuilder_ == null) { + accesses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + accessesBuilder_.clear(); + } + if (resourceEdgesBuilder_ == null) { + resourceEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + resourceEdgesBuilder_.clear(); + } + if (conditionEvaluationBuilder_ == null) { + conditionEvaluation_ = null; + } else { + conditionEvaluation_ = null; + conditionEvaluationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList(this); + int from_bitField0_ = bitField0_; + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + if (accessesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + accesses_ = java.util.Collections.unmodifiableList(accesses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.accesses_ = accesses_; + } else { + result.accesses_ = accessesBuilder_.build(); + } + if (resourceEdgesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = java.util.Collections.unmodifiableList(resourceEdges_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.resourceEdges_ = resourceEdges_; + } else { + result.resourceEdges_ = resourceEdgesBuilder_.build(); + } + if (conditionEvaluationBuilder_ == null) { + result.conditionEvaluation_ = conditionEvaluation_; + } else { + result.conditionEvaluation_ = conditionEvaluationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance()) return this; + if (resourcesBuilder_ == null) { + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + } else { + if (!other.resources_.isEmpty()) { + if (resourcesBuilder_.isEmpty()) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + resourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResourcesFieldBuilder() : null; + } else { + resourcesBuilder_.addAllMessages(other.resources_); + } + } + } + if (accessesBuilder_ == null) { + if (!other.accesses_.isEmpty()) { + if (accesses_.isEmpty()) { + accesses_ = other.accesses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAccessesIsMutable(); + accesses_.addAll(other.accesses_); + } + onChanged(); + } + } else { + if (!other.accesses_.isEmpty()) { + if (accessesBuilder_.isEmpty()) { + accessesBuilder_.dispose(); + accessesBuilder_ = null; + accesses_ = other.accesses_; + bitField0_ = (bitField0_ & ~0x00000002); + accessesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAccessesFieldBuilder() : null; + } else { + accessesBuilder_.addAllMessages(other.accesses_); + } + } + } + if (resourceEdgesBuilder_ == null) { + if (!other.resourceEdges_.isEmpty()) { + if (resourceEdges_.isEmpty()) { + resourceEdges_ = other.resourceEdges_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureResourceEdgesIsMutable(); + resourceEdges_.addAll(other.resourceEdges_); + } + onChanged(); + } + } else { + if (!other.resourceEdges_.isEmpty()) { + if (resourceEdgesBuilder_.isEmpty()) { + resourceEdgesBuilder_.dispose(); + resourceEdgesBuilder_ = null; + resourceEdges_ = other.resourceEdges_; + bitField0_ = (bitField0_ & ~0x00000004); + resourceEdgesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResourceEdgesFieldBuilder() : null; + } else { + resourceEdgesBuilder_.addAllMessages(other.resourceEdges_); + } + } + } + if (other.hasConditionEvaluation()) { + mergeConditionEvaluation(other.getConditionEvaluation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List resources_ = + java.util.Collections.emptyList(); + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = new java.util.ArrayList(resources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> resourcesBuilder_; + + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public java.util.List getResourcesList() { + if (resourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resources_); + } else { + return resourcesBuilder_.getMessageList(); + } + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public int getResourcesCount() { + if (resourcesBuilder_ == null) { + return resources_.size(); + } else { + return resourcesBuilder_.getCount(); + } + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessage(index); + } + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder setResources( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder setResources( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.set(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder addResources(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + } else { + resourcesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder addResources( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(index, value); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder addResources( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder addResources( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder addAllResources( + java.lang.Iterable values) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resources_); + onChanged(); + } else { + resourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourcesBuilder_.clear(); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public Builder removeResources(int index) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.remove(index); + onChanged(); + } else { + resourcesBuilder_.remove(index); + } + return this; + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder getResourcesBuilder( + int index) { + return getResourcesFieldBuilder().getBuilder(index); + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder getResourcesOrBuilder( + int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); } else { + return resourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public java.util.List + getResourcesOrBuilderList() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resources_); + } + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder addResourcesBuilder() { + return getResourcesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()); + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder addResourcesBuilder( + int index) { + return getResourcesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()); + } + /** + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + public java.util.List + getResourcesBuilderList() { + return getResourcesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder>( + resources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.util.List accesses_ = + java.util.Collections.emptyList(); + private void ensureAccessesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + accesses_ = new java.util.ArrayList(accesses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> accessesBuilder_; + + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public java.util.List getAccessesList() { + if (accessesBuilder_ == null) { + return java.util.Collections.unmodifiableList(accesses_); + } else { + return accessesBuilder_.getMessageList(); + } + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public int getAccessesCount() { + if (accessesBuilder_ == null) { + return accesses_.size(); + } else { + return accessesBuilder_.getCount(); + } + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index) { + if (accessesBuilder_ == null) { + return accesses_.get(index); + } else { + return accessesBuilder_.getMessage(index); + } + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder setAccesses( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { + if (accessesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessesIsMutable(); + accesses_.set(index, value); + onChanged(); + } else { + accessesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder setAccesses( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.set(index, builderForValue.build()); + onChanged(); + } else { + accessesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { + if (accessesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessesIsMutable(); + accesses_.add(value); + onChanged(); + } else { + accessesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { + if (accessesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessesIsMutable(); + accesses_.add(index, value); + onChanged(); + } else { + accessesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.add(builderForValue.build()); + onChanged(); + } else { + accessesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.add(index, builderForValue.build()); + onChanged(); + } else { + accessesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAllAccesses( + java.lang.Iterable values) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, accesses_); + onChanged(); + } else { + accessesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder clearAccesses() { + if (accessesBuilder_ == null) { + accesses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + accessesBuilder_.clear(); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder removeAccesses(int index) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.remove(index); + onChanged(); + } else { + accessesBuilder_.remove(index); + } + return this; + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder getAccessesBuilder( + int index) { + return getAccessesFieldBuilder().getBuilder(index); + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( + int index) { + if (accessesBuilder_ == null) { + return accesses_.get(index); } else { + return accessesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public java.util.List + getAccessesOrBuilderList() { + if (accessesBuilder_ != null) { + return accessesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accesses_); + } + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder addAccessesBuilder() { + return getAccessesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()); + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder addAccessesBuilder( + int index) { + return getAccessesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()); + } + /** + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public java.util.List + getAccessesBuilderList() { + return getAccessesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> + getAccessesFieldBuilder() { + if (accessesBuilder_ == null) { + accessesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder>( + accesses_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + accesses_ = null; + } + return accessesBuilder_; + } + + private java.util.List resourceEdges_ = + java.util.Collections.emptyList(); + private void ensureResourceEdgesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = new java.util.ArrayList(resourceEdges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> resourceEdgesBuilder_; + + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public java.util.List getResourceEdgesList() { + if (resourceEdgesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceEdges_); + } else { + return resourceEdgesBuilder_.getMessageList(); + } + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public int getResourceEdgesCount() { + if (resourceEdgesBuilder_ == null) { + return resourceEdges_.size(); + } else { + return resourceEdgesBuilder_.getCount(); + } + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index) { + if (resourceEdgesBuilder_ == null) { + return resourceEdges_.get(index); + } else { + return resourceEdgesBuilder_.getMessage(index); + } + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder setResourceEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (resourceEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceEdgesIsMutable(); + resourceEdges_.set(index, value); + onChanged(); + } else { + resourceEdgesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder setResourceEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceEdgesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder addResourceEdges(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (resourceEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceEdgesIsMutable(); + resourceEdges_.add(value); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder addResourceEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (resourceEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceEdgesIsMutable(); + resourceEdges_.add(index, value); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder addResourceEdges( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.add(builderForValue.build()); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder addResourceEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder addAllResourceEdges( + java.lang.Iterable values) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, resourceEdges_); + onChanged(); + } else { + resourceEdgesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder clearResourceEdges() { + if (resourceEdgesBuilder_ == null) { + resourceEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + resourceEdgesBuilder_.clear(); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public Builder removeResourceEdges(int index) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.remove(index); + onChanged(); + } else { + resourceEdgesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder getResourceEdgesBuilder( + int index) { + return getResourceEdgesFieldBuilder().getBuilder(index); + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( + int index) { + if (resourceEdgesBuilder_ == null) { + return resourceEdges_.get(index); } else { + return resourceEdgesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public java.util.List + getResourceEdgesOrBuilderList() { + if (resourceEdgesBuilder_ != null) { + return resourceEdgesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceEdges_); + } + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addResourceEdgesBuilder() { + return getResourceEdgesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addResourceEdgesBuilder( + int index) { + return getResourceEdgesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains the full resource name of a parent resource and
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + public java.util.List + getResourceEdgesBuilderList() { + return getResourceEdgesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + getResourceEdgesFieldBuilder() { + if (resourceEdgesBuilder_ == null) { + resourceEdgesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder>( + resourceEdges_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + resourceEdges_ = null; + } + return resourceEdgesBuilder_; + } + + private com.google.cloud.asset.v1.ConditionEvaluation conditionEvaluation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.ConditionEvaluation, com.google.cloud.asset.v1.ConditionEvaluation.Builder, com.google.cloud.asset.v1.ConditionEvaluationOrBuilder> conditionEvaluationBuilder_; + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * @return Whether the conditionEvaluation field is set. + */ + public boolean hasConditionEvaluation() { + return conditionEvaluationBuilder_ != null || conditionEvaluation_ != null; + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * @return The conditionEvaluation. + */ + public com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation() { + if (conditionEvaluationBuilder_ == null) { + return conditionEvaluation_ == null ? com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() : conditionEvaluation_; + } else { + return conditionEvaluationBuilder_.getMessage(); + } + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder setConditionEvaluation(com.google.cloud.asset.v1.ConditionEvaluation value) { + if (conditionEvaluationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conditionEvaluation_ = value; + onChanged(); + } else { + conditionEvaluationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder setConditionEvaluation( + com.google.cloud.asset.v1.ConditionEvaluation.Builder builderForValue) { + if (conditionEvaluationBuilder_ == null) { + conditionEvaluation_ = builderForValue.build(); + onChanged(); + } else { + conditionEvaluationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder mergeConditionEvaluation(com.google.cloud.asset.v1.ConditionEvaluation value) { + if (conditionEvaluationBuilder_ == null) { + if (conditionEvaluation_ != null) { + conditionEvaluation_ = + com.google.cloud.asset.v1.ConditionEvaluation.newBuilder(conditionEvaluation_).mergeFrom(value).buildPartial(); + } else { + conditionEvaluation_ = value; + } + onChanged(); + } else { + conditionEvaluationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder clearConditionEvaluation() { + if (conditionEvaluationBuilder_ == null) { + conditionEvaluation_ = null; + onChanged(); + } else { + conditionEvaluation_ = null; + conditionEvaluationBuilder_ = null; + } + + return this; + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public com.google.cloud.asset.v1.ConditionEvaluation.Builder getConditionEvaluationBuilder() { + + onChanged(); + return getConditionEvaluationFieldBuilder().getBuilder(); + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public com.google.cloud.asset.v1.ConditionEvaluationOrBuilder getConditionEvaluationOrBuilder() { + if (conditionEvaluationBuilder_ != null) { + return conditionEvaluationBuilder_.getMessageOrBuilder(); + } else { + return conditionEvaluation_ == null ? + com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() : conditionEvaluation_; + } + } + /** + *
+       * Condition evaluation for this AccessControlList, if there is a condition
+       * defined in the above IAM policy binding.
+       * 
+ * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.ConditionEvaluation, com.google.cloud.asset.v1.ConditionEvaluation.Builder, com.google.cloud.asset.v1.ConditionEvaluationOrBuilder> + getConditionEvaluationFieldBuilder() { + if (conditionEvaluationBuilder_ == null) { + conditionEvaluationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.ConditionEvaluation, com.google.cloud.asset.v1.ConditionEvaluation.Builder, com.google.cloud.asset.v1.ConditionEvaluationOrBuilder>( + getConditionEvaluation(), + getParentForChildren(), + isClean()); + conditionEvaluation_ = null; + } + return conditionEvaluationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessControlList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccessControlList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IdentityListOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + java.util.List + getIdentitiesList(); + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index); + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + int getIdentitiesCount(); + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + java.util.List + getIdentitiesOrBuilderList(); + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder getIdentitiesOrBuilder( + int index); + + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + java.util.List + getGroupEdgesList(); + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index); + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + int getGroupEdgesCount(); + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + java.util.List + getGroupEdgesOrBuilderList(); + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( + int index); + } + /** + *
+   * The identities and group edges.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList} + */ + public static final class IdentityList extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + IdentityListOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentityList.newBuilder() to construct. + private IdentityList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IdentityList() { + identities_ = java.util.Collections.emptyList(); + groupEdges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IdentityList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IdentityList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + identities_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + identities_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + groupEdges_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + groupEdges_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + identities_ = java.util.Collections.unmodifiableList(identities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + groupEdges_ = java.util.Collections.unmodifiableList(groupEdges_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder.class); + } + + public static final int IDENTITIES_FIELD_NUMBER = 1; + private java.util.List identities_; + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public java.util.List getIdentitiesList() { + return identities_; + } + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public java.util.List + getIdentitiesOrBuilderList() { + return identities_; + } + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public int getIdentitiesCount() { + return identities_.size(); + } + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index) { + return identities_.get(index); + } + /** + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder getIdentitiesOrBuilder( + int index) { + return identities_.get(index); + } + + public static final int GROUP_EDGES_FIELD_NUMBER = 2; + private java.util.List groupEdges_; + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public java.util.List getGroupEdgesList() { + return groupEdges_; + } + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public java.util.List + getGroupEdgesOrBuilderList() { + return groupEdges_; + } + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public int getGroupEdgesCount() { + return groupEdges_.size(); + } + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index) { + return groupEdges_.get(index); + } + /** + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the
+     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+     * The
+     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+     * contains a member of the group, such as `group:child@google.com` or
+     * `user:foo@google.com`. This field is present only if the
+     * output_group_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( + int index) { + return groupEdges_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < identities_.size(); i++) { + output.writeMessage(1, identities_.get(i)); + } + for (int i = 0; i < groupEdges_.size(); i++) { + output.writeMessage(2, groupEdges_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < identities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, identities_.get(i)); + } + for (int i = 0; i < groupEdges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, groupEdges_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) obj; + + if (!getIdentitiesList() + .equals(other.getIdentitiesList())) return false; + if (!getGroupEdgesList() + .equals(other.getGroupEdgesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIdentitiesCount() > 0) { + hash = (37 * hash) + IDENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getIdentitiesList().hashCode(); + } + if (getGroupEdgesCount() > 0) { + hash = (37 * hash) + GROUP_EDGES_FIELD_NUMBER; + hash = (53 * hash) + getGroupEdgesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The identities and group edges.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getIdentitiesFieldBuilder(); + getGroupEdgesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (identitiesBuilder_ == null) { + identities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + identitiesBuilder_.clear(); + } + if (groupEdgesBuilder_ == null) { + groupEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + groupEdgesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList(this); + int from_bitField0_ = bitField0_; + if (identitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identities_ = java.util.Collections.unmodifiableList(identities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identities_ = identities_; + } else { + result.identities_ = identitiesBuilder_.build(); + } + if (groupEdgesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + groupEdges_ = java.util.Collections.unmodifiableList(groupEdges_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.groupEdges_ = groupEdges_; + } else { + result.groupEdges_ = groupEdgesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance()) return this; + if (identitiesBuilder_ == null) { + if (!other.identities_.isEmpty()) { + if (identities_.isEmpty()) { + identities_ = other.identities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentitiesIsMutable(); + identities_.addAll(other.identities_); + } + onChanged(); + } + } else { + if (!other.identities_.isEmpty()) { + if (identitiesBuilder_.isEmpty()) { + identitiesBuilder_.dispose(); + identitiesBuilder_ = null; + identities_ = other.identities_; + bitField0_ = (bitField0_ & ~0x00000001); + identitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIdentitiesFieldBuilder() : null; + } else { + identitiesBuilder_.addAllMessages(other.identities_); + } + } + } + if (groupEdgesBuilder_ == null) { + if (!other.groupEdges_.isEmpty()) { + if (groupEdges_.isEmpty()) { + groupEdges_ = other.groupEdges_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGroupEdgesIsMutable(); + groupEdges_.addAll(other.groupEdges_); + } + onChanged(); + } + } else { + if (!other.groupEdges_.isEmpty()) { + if (groupEdgesBuilder_.isEmpty()) { + groupEdgesBuilder_.dispose(); + groupEdgesBuilder_ = null; + groupEdges_ = other.groupEdges_; + bitField0_ = (bitField0_ & ~0x00000002); + groupEdgesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGroupEdgesFieldBuilder() : null; + } else { + groupEdgesBuilder_.addAllMessages(other.groupEdges_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List identities_ = + java.util.Collections.emptyList(); + private void ensureIdentitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identities_ = new java.util.ArrayList(identities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> identitiesBuilder_; + + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public java.util.List getIdentitiesList() { + if (identitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(identities_); + } else { + return identitiesBuilder_.getMessageList(); + } + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public int getIdentitiesCount() { + if (identitiesBuilder_ == null) { + return identities_.size(); + } else { + return identitiesBuilder_.getCount(); + } + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index) { + if (identitiesBuilder_ == null) { + return identities_.get(index); + } else { + return identitiesBuilder_.getMessage(index); + } + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder setIdentities( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { + if (identitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentitiesIsMutable(); + identities_.set(index, value); + onChanged(); + } else { + identitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder setIdentities( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.set(index, builderForValue.build()); + onChanged(); + } else { + identitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder addIdentities(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { + if (identitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentitiesIsMutable(); + identities_.add(value); + onChanged(); + } else { + identitiesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder addIdentities( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { + if (identitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentitiesIsMutable(); + identities_.add(index, value); + onChanged(); + } else { + identitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder addIdentities( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.add(builderForValue.build()); + onChanged(); + } else { + identitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder addIdentities( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.add(index, builderForValue.build()); + onChanged(); + } else { + identitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder addAllIdentities( + java.lang.Iterable values) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, identities_); + onChanged(); + } else { + identitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder clearIdentities() { + if (identitiesBuilder_ == null) { + identities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identitiesBuilder_.clear(); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public Builder removeIdentities(int index) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.remove(index); + onChanged(); + } else { + identitiesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder getIdentitiesBuilder( + int index) { + return getIdentitiesFieldBuilder().getBuilder(index); + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder getIdentitiesOrBuilder( + int index) { + if (identitiesBuilder_ == null) { + return identities_.get(index); } else { + return identitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public java.util.List + getIdentitiesOrBuilderList() { + if (identitiesBuilder_ != null) { + return identitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identities_); + } + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder addIdentitiesBuilder() { + return getIdentitiesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()); + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder addIdentitiesBuilder( + int index) { + return getIdentitiesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()); + } + /** + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + public java.util.List + getIdentitiesBuilderList() { + return getIdentitiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> + getIdentitiesFieldBuilder() { + if (identitiesBuilder_ == null) { + identitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder>( + identities_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + identities_ = null; + } + return identitiesBuilder_; + } + + private java.util.List groupEdges_ = + java.util.Collections.emptyList(); + private void ensureGroupEdgesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + groupEdges_ = new java.util.ArrayList(groupEdges_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> groupEdgesBuilder_; + + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public java.util.List getGroupEdgesList() { + if (groupEdgesBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupEdges_); + } else { + return groupEdgesBuilder_.getMessageList(); + } + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public int getGroupEdgesCount() { + if (groupEdgesBuilder_ == null) { + return groupEdges_.size(); + } else { + return groupEdgesBuilder_.getCount(); + } + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index) { + if (groupEdgesBuilder_ == null) { + return groupEdges_.get(index); + } else { + return groupEdgesBuilder_.getMessage(index); + } + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder setGroupEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (groupEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupEdgesIsMutable(); + groupEdges_.set(index, value); + onChanged(); + } else { + groupEdgesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder setGroupEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.set(index, builderForValue.build()); + onChanged(); + } else { + groupEdgesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (groupEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupEdgesIsMutable(); + groupEdges_.add(value); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (groupEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupEdgesIsMutable(); + groupEdges_.add(index, value); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.add(builderForValue.build()); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.add(index, builderForValue.build()); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addAllGroupEdges( + java.lang.Iterable values) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, groupEdges_); + onChanged(); + } else { + groupEdgesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder clearGroupEdges() { + if (groupEdgesBuilder_ == null) { + groupEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + groupEdgesBuilder_.clear(); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder removeGroupEdges(int index) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.remove(index); + onChanged(); + } else { + groupEdgesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder getGroupEdgesBuilder( + int index) { + return getGroupEdgesFieldBuilder().getBuilder(index); + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( + int index) { + if (groupEdgesBuilder_ == null) { + return groupEdges_.get(index); } else { + return groupEdgesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public java.util.List + getGroupEdgesOrBuilderList() { + if (groupEdgesBuilder_ != null) { + return groupEdgesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupEdges_); + } + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addGroupEdgesBuilder() { + return getGroupEdgesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addGroupEdgesBuilder( + int index) { + return getGroupEdgesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the
+       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
+       * The
+       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
+       * contains a member of the group, such as `group:child@google.com` or
+       * `user:foo@google.com`. This field is present only if the
+       * output_group_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public java.util.List + getGroupEdgesBuilderList() { + return getGroupEdgesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + getGroupEdgesFieldBuilder() { + if (groupEdgesBuilder_ == null) { + groupEdgesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder>( + groupEdges_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + groupEdges_ = null; + } + return groupEdgesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentityList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IdentityList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int ATTACHED_RESOURCE_FULL_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object attachedResourceFullName_; + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * policy attaches.
+   * 
+ * + * string attached_resource_full_name = 1; + * @return The attachedResourceFullName. + */ + @java.lang.Override + public java.lang.String getAttachedResourceFullName() { + java.lang.Object ref = attachedResourceFullName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attachedResourceFullName_ = s; + return s; + } + } + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * policy attaches.
+   * 
+ * + * string attached_resource_full_name = 1; + * @return The bytes for attachedResourceFullName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttachedResourceFullNameBytes() { + java.lang.Object ref = attachedResourceFullName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attachedResourceFullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IAM_BINDING_FIELD_NUMBER = 2; + private com.google.iam.v1.Binding iamBinding_; + /** + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * @return Whether the iamBinding field is set. + */ + @java.lang.Override + public boolean hasIamBinding() { + return iamBinding_ != null; + } + /** + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * @return The iamBinding. + */ + @java.lang.Override + public com.google.iam.v1.Binding getIamBinding() { + return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; + } + /** + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + @java.lang.Override + public com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder() { + return getIamBinding(); + } + + public static final int ACCESS_CONTROL_LISTS_FIELD_NUMBER = 3; + private java.util.List accessControlLists_; + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + @java.lang.Override + public java.util.List getAccessControlListsList() { + return accessControlLists_; + } + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + @java.lang.Override + public java.util.List + getAccessControlListsOrBuilderList() { + return accessControlLists_; + } + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + @java.lang.Override + public int getAccessControlListsCount() { + return accessControlLists_.size(); + } + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists(int index) { + return accessControlLists_.get(index); + } + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder getAccessControlListsOrBuilder( + int index) { + return accessControlLists_.get(index); + } + + public static final int IDENTITY_LIST_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identityList_; + /** + *
+   * The identity list derived from members of the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * @return Whether the identityList field is set. + */ + @java.lang.Override + public boolean hasIdentityList() { + return identityList_ != null; + } + /** + *
+   * The identity list derived from members of the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * @return The identityList. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList() { + return identityList_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() : identityList_; + } + /** + *
+   * The identity list derived from members of the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder getIdentityListOrBuilder() { + return getIdentityList(); + } + + public static final int FULLY_EXPLORED_FIELD_NUMBER = 5; + private boolean fullyExplored_; + /** + *
+   * Represents whether all analyses on the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * have successfully finished.
+   * 
+ * + * bool fully_explored = 5; + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResourceFullName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachedResourceFullName_); + } + if (iamBinding_ != null) { + output.writeMessage(2, getIamBinding()); + } + for (int i = 0; i < accessControlLists_.size(); i++) { + output.writeMessage(3, accessControlLists_.get(i)); + } + if (identityList_ != null) { + output.writeMessage(4, getIdentityList()); + } + if (fullyExplored_ != false) { + output.writeBool(5, fullyExplored_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResourceFullName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachedResourceFullName_); + } + if (iamBinding_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getIamBinding()); + } + for (int i = 0; i < accessControlLists_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, accessControlLists_.get(i)); + } + if (identityList_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIdentityList()); + } + if (fullyExplored_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, fullyExplored_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult) obj; + + if (!getAttachedResourceFullName() + .equals(other.getAttachedResourceFullName())) return false; + if (hasIamBinding() != other.hasIamBinding()) return false; + if (hasIamBinding()) { + if (!getIamBinding() + .equals(other.getIamBinding())) return false; + } + if (!getAccessControlListsList() + .equals(other.getAccessControlListsList())) return false; + if (hasIdentityList() != other.hasIdentityList()) return false; + if (hasIdentityList()) { + if (!getIdentityList() + .equals(other.getIdentityList())) return false; + } + if (getFullyExplored() + != other.getFullyExplored()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTACHED_RESOURCE_FULL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAttachedResourceFullName().hashCode(); + if (hasIamBinding()) { + hash = (37 * hash) + IAM_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getIamBinding().hashCode(); + } + if (getAccessControlListsCount() > 0) { + hash = (37 * hash) + ACCESS_CONTROL_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getAccessControlListsList().hashCode(); + } + if (hasIdentityList()) { + hash = (37 * hash) + IDENTITY_LIST_FIELD_NUMBER; + hash = (53 * hash) + getIdentityList().hashCode(); + } + hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFullyExplored()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * IAM Policy analysis result, consisting of one IAM policy binding and derived
+   * access control lists.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult) + com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAccessControlListsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + attachedResourceFullName_ = ""; + + if (iamBindingBuilder_ == null) { + iamBinding_ = null; + } else { + iamBinding_ = null; + iamBindingBuilder_ = null; + } + if (accessControlListsBuilder_ == null) { + accessControlLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + accessControlListsBuilder_.clear(); + } + if (identityListBuilder_ == null) { + identityList_ = null; + } else { + identityList_ = null; + identityListBuilder_ = null; + } + fullyExplored_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult(this); + int from_bitField0_ = bitField0_; + result.attachedResourceFullName_ = attachedResourceFullName_; + if (iamBindingBuilder_ == null) { + result.iamBinding_ = iamBinding_; + } else { + result.iamBinding_ = iamBindingBuilder_.build(); + } + if (accessControlListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = java.util.Collections.unmodifiableList(accessControlLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.accessControlLists_ = accessControlLists_; + } else { + result.accessControlLists_ = accessControlListsBuilder_.build(); + } + if (identityListBuilder_ == null) { + result.identityList_ = identityList_; + } else { + result.identityList_ = identityListBuilder_.build(); + } + result.fullyExplored_ = fullyExplored_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()) return this; + if (!other.getAttachedResourceFullName().isEmpty()) { + attachedResourceFullName_ = other.attachedResourceFullName_; + onChanged(); + } + if (other.hasIamBinding()) { + mergeIamBinding(other.getIamBinding()); + } + if (accessControlListsBuilder_ == null) { + if (!other.accessControlLists_.isEmpty()) { + if (accessControlLists_.isEmpty()) { + accessControlLists_ = other.accessControlLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAccessControlListsIsMutable(); + accessControlLists_.addAll(other.accessControlLists_); + } + onChanged(); + } + } else { + if (!other.accessControlLists_.isEmpty()) { + if (accessControlListsBuilder_.isEmpty()) { + accessControlListsBuilder_.dispose(); + accessControlListsBuilder_ = null; + accessControlLists_ = other.accessControlLists_; + bitField0_ = (bitField0_ & ~0x00000001); + accessControlListsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAccessControlListsFieldBuilder() : null; + } else { + accessControlListsBuilder_.addAllMessages(other.accessControlLists_); + } + } + } + if (other.hasIdentityList()) { + mergeIdentityList(other.getIdentityList()); + } + if (other.getFullyExplored() != false) { + setFullyExplored(other.getFullyExplored()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object attachedResourceFullName_ = ""; + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * policy attaches.
+     * 
+ * + * string attached_resource_full_name = 1; + * @return The attachedResourceFullName. + */ + public java.lang.String getAttachedResourceFullName() { + java.lang.Object ref = attachedResourceFullName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attachedResourceFullName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * policy attaches.
+     * 
+ * + * string attached_resource_full_name = 1; + * @return The bytes for attachedResourceFullName. + */ + public com.google.protobuf.ByteString + getAttachedResourceFullNameBytes() { + java.lang.Object ref = attachedResourceFullName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attachedResourceFullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * policy attaches.
+     * 
+ * + * string attached_resource_full_name = 1; + * @param value The attachedResourceFullName to set. + * @return This builder for chaining. + */ + public Builder setAttachedResourceFullName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + attachedResourceFullName_ = value; + onChanged(); + return this; + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * policy attaches.
+     * 
+ * + * string attached_resource_full_name = 1; + * @return This builder for chaining. + */ + public Builder clearAttachedResourceFullName() { + + attachedResourceFullName_ = getDefaultInstance().getAttachedResourceFullName(); + onChanged(); + return this; + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * policy attaches.
+     * 
+ * + * string attached_resource_full_name = 1; + * @param value The bytes for attachedResourceFullName to set. + * @return This builder for chaining. + */ + public Builder setAttachedResourceFullNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + attachedResourceFullName_ = value; + onChanged(); + return this; + } + + private com.google.iam.v1.Binding iamBinding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Binding, com.google.iam.v1.Binding.Builder, com.google.iam.v1.BindingOrBuilder> iamBindingBuilder_; + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * @return Whether the iamBinding field is set. + */ + public boolean hasIamBinding() { + return iamBindingBuilder_ != null || iamBinding_ != null; + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * @return The iamBinding. + */ + public com.google.iam.v1.Binding getIamBinding() { + if (iamBindingBuilder_ == null) { + return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; + } else { + return iamBindingBuilder_.getMessage(); + } + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder setIamBinding(com.google.iam.v1.Binding value) { + if (iamBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamBinding_ = value; + onChanged(); + } else { + iamBindingBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder setIamBinding( + com.google.iam.v1.Binding.Builder builderForValue) { + if (iamBindingBuilder_ == null) { + iamBinding_ = builderForValue.build(); + onChanged(); + } else { + iamBindingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder mergeIamBinding(com.google.iam.v1.Binding value) { + if (iamBindingBuilder_ == null) { + if (iamBinding_ != null) { + iamBinding_ = + com.google.iam.v1.Binding.newBuilder(iamBinding_).mergeFrom(value).buildPartial(); + } else { + iamBinding_ = value; + } + onChanged(); + } else { + iamBindingBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder clearIamBinding() { + if (iamBindingBuilder_ == null) { + iamBinding_ = null; + onChanged(); + } else { + iamBinding_ = null; + iamBindingBuilder_ = null; + } + + return this; + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public com.google.iam.v1.Binding.Builder getIamBindingBuilder() { + + onChanged(); + return getIamBindingFieldBuilder().getBuilder(); + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder() { + if (iamBindingBuilder_ != null) { + return iamBindingBuilder_.getMessageOrBuilder(); + } else { + return iamBinding_ == null ? + com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; + } + } + /** + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Binding, com.google.iam.v1.Binding.Builder, com.google.iam.v1.BindingOrBuilder> + getIamBindingFieldBuilder() { + if (iamBindingBuilder_ == null) { + iamBindingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Binding, com.google.iam.v1.Binding.Builder, com.google.iam.v1.BindingOrBuilder>( + getIamBinding(), + getParentForChildren(), + isClean()); + iamBinding_ = null; + } + return iamBindingBuilder_; + } + + private java.util.List accessControlLists_ = + java.util.Collections.emptyList(); + private void ensureAccessControlListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = new java.util.ArrayList(accessControlLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> accessControlListsBuilder_; + + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public java.util.List getAccessControlListsList() { + if (accessControlListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accessControlLists_); + } else { + return accessControlListsBuilder_.getMessageList(); + } + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public int getAccessControlListsCount() { + if (accessControlListsBuilder_ == null) { + return accessControlLists_.size(); + } else { + return accessControlListsBuilder_.getCount(); + } + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists(int index) { + if (accessControlListsBuilder_ == null) { + return accessControlLists_.get(index); + } else { + return accessControlListsBuilder_.getMessage(index); + } + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder setAccessControlLists( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { + if (accessControlListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessControlListsIsMutable(); + accessControlLists_.set(index, value); + onChanged(); + } else { + accessControlListsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder setAccessControlLists( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder builderForValue) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.set(index, builderForValue.build()); + onChanged(); + } else { + accessControlListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder addAccessControlLists(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { + if (accessControlListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessControlListsIsMutable(); + accessControlLists_.add(value); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder addAccessControlLists( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { + if (accessControlListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessControlListsIsMutable(); + accessControlLists_.add(index, value); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder addAccessControlLists( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder builderForValue) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.add(builderForValue.build()); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder addAccessControlLists( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder builderForValue) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.add(index, builderForValue.build()); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder addAllAccessControlLists( + java.lang.Iterable values) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, accessControlLists_); + onChanged(); + } else { + accessControlListsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder clearAccessControlLists() { + if (accessControlListsBuilder_ == null) { + accessControlLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + accessControlListsBuilder_.clear(); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public Builder removeAccessControlLists(int index) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.remove(index); + onChanged(); + } else { + accessControlListsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder getAccessControlListsBuilder( + int index) { + return getAccessControlListsFieldBuilder().getBuilder(index); + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder getAccessControlListsOrBuilder( + int index) { + if (accessControlListsBuilder_ == null) { + return accessControlLists_.get(index); } else { + return accessControlListsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public java.util.List + getAccessControlListsOrBuilderList() { + if (accessControlListsBuilder_ != null) { + return accessControlListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accessControlLists_); + } + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder addAccessControlListsBuilder() { + return getAccessControlListsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance()); + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder addAccessControlListsBuilder( + int index) { + return getAccessControlListsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance()); + } + /** + *
+     * The access control lists derived from the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match resource and access selectors specified in
+     * the request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + public java.util.List + getAccessControlListsBuilderList() { + return getAccessControlListsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsFieldBuilder() { + if (accessControlListsBuilder_ == null) { + accessControlListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder>( + accessControlLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + accessControlLists_ = null; + } + return accessControlListsBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identityList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder> identityListBuilder_; + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * @return Whether the identityList field is set. + */ + public boolean hasIdentityList() { + return identityListBuilder_ != null || identityList_ != null; + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * @return The identityList. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList() { + if (identityListBuilder_ == null) { + return identityList_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() : identityList_; + } else { + return identityListBuilder_.getMessage(); + } + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder setIdentityList(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList value) { + if (identityListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identityList_ = value; + onChanged(); + } else { + identityListBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder setIdentityList( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder builderForValue) { + if (identityListBuilder_ == null) { + identityList_ = builderForValue.build(); + onChanged(); + } else { + identityListBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder mergeIdentityList(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList value) { + if (identityListBuilder_ == null) { + if (identityList_ != null) { + identityList_ = + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.newBuilder(identityList_).mergeFrom(value).buildPartial(); + } else { + identityList_ = value; + } + onChanged(); + } else { + identityListBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder clearIdentityList() { + if (identityListBuilder_ == null) { + identityList_ = null; + onChanged(); + } else { + identityList_ = null; + identityListBuilder_ = null; + } + + return this; + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder getIdentityListBuilder() { + + onChanged(); + return getIdentityListFieldBuilder().getBuilder(); + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder getIdentityListOrBuilder() { + if (identityListBuilder_ != null) { + return identityListBuilder_.getMessageOrBuilder(); + } else { + return identityList_ == null ? + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() : identityList_; + } + } + /** + *
+     * The identity list derived from members of the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder> + getIdentityListFieldBuilder() { + if (identityListBuilder_ == null) { + identityListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder>( + getIdentityList(), + getParentForChildren(), + isClean()); + identityList_ = null; + } + return identityListBuilder_; + } + + private boolean fullyExplored_ ; + /** + *
+     * Represents whether all analyses on the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * have successfully finished.
+     * 
+ * + * bool fully_explored = 5; + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + *
+     * Represents whether all analyses on the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * have successfully finished.
+     * 
+ * + * bool fully_explored = 5; + * @param value The fullyExplored to set. + * @return This builder for chaining. + */ + public Builder setFullyExplored(boolean value) { + + fullyExplored_ = value; + onChanged(); + return this; + } + /** + *
+     * Represents whether all analyses on the
+     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+     * have successfully finished.
+     * 
+ * + * bool fully_explored = 5; + * @return This builder for chaining. + */ + public Builder clearFullyExplored() { + + fullyExplored_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java new file mode 100644 index 000000000000..bea6a4a1378e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java @@ -0,0 +1,168 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface IamPolicyAnalysisResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * policy attaches.
+   * 
+ * + * string attached_resource_full_name = 1; + * @return The attachedResourceFullName. + */ + java.lang.String getAttachedResourceFullName(); + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * policy attaches.
+   * 
+ * + * string attached_resource_full_name = 1; + * @return The bytes for attachedResourceFullName. + */ + com.google.protobuf.ByteString + getAttachedResourceFullNameBytes(); + + /** + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * @return Whether the iamBinding field is set. + */ + boolean hasIamBinding(); + /** + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * @return The iamBinding. + */ + com.google.iam.v1.Binding getIamBinding(); + /** + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder(); + + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + java.util.List + getAccessControlListsList(); + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists(int index); + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + int getAccessControlListsCount(); + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + java.util.List + getAccessControlListsOrBuilderList(); + /** + *
+   * The access control lists derived from the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match resource and access selectors specified in
+   * the request.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder getAccessControlListsOrBuilder( + int index); + + /** + *
+   * The identity list derived from members of the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * @return Whether the identityList field is set. + */ + boolean hasIdentityList(); + /** + *
+   * The identity list derived from members of the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * @return The identityList. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList(); + /** + *
+   * The identity list derived from members of the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder getIdentityListOrBuilder(); + + /** + *
+   * Represents whether all analyses on the
+   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
+   * have successfully finished.
+   * 
+ * + * bool fully_explored = 5; + * @return The fullyExplored. + */ + boolean getFullyExplored(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java new file mode 100644 index 000000000000..adf8f9efae81 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java @@ -0,0 +1,756 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Represents the detailed state of an entity under analysis, such as a
+ * resource, an identity or an access.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState} + */ +public final class IamPolicyAnalysisState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisState) + IamPolicyAnalysisStateOrBuilder { +private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisState.newBuilder() to construct. + private IamPolicyAnalysisState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IamPolicyAnalysisState() { + code_ = 0; + cause_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IamPolicyAnalysisState(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IamPolicyAnalysisState( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + code_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + cause_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisState.class, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_; + /** + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override public int getCodeValue() { + return code_; + } + /** + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * @return The code. + */ + @java.lang.Override public com.google.rpc.Code getCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + + public static final int CAUSE_FIELD_NUMBER = 2; + private volatile java.lang.Object cause_; + /** + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * @return The cause. + */ + @java.lang.Override + public java.lang.String getCause() { + java.lang.Object ref = cause_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cause_ = s; + return s; + } + } + /** + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * @return The bytes for cause. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cause_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != com.google.rpc.Code.OK.getNumber()) { + output.writeEnum(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cause_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != com.google.rpc.Code.OK.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cause_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisState)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisState other = (com.google.cloud.asset.v1.IamPolicyAnalysisState) obj; + + if (code_ != other.code_) return false; + if (!getCause() + .equals(other.getCause())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + hash = (37 * hash) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + getCause().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Represents the detailed state of an entity under analysis, such as a
+   * resource, an identity or an access.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisState) + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisState.class, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + code_ = 0; + + cause_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState build() { + com.google.cloud.asset.v1.IamPolicyAnalysisState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisState result = new com.google.cloud.asset.v1.IamPolicyAnalysisState(this); + result.code_ = code_; + result.cause_ = cause_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisState) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisState other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()) return this; + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + if (!other.getCause().isEmpty()) { + cause_ = other.cause_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisState parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisState) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int code_ = 0; + /** + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override public int getCodeValue() { + return code_; + } + /** + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + + code_ = value; + onChanged(); + return this; + } + /** + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * @return The code. + */ + @java.lang.Override + public com.google.rpc.Code getCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + /** + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(com.google.rpc.Code value) { + if (value == null) { + throw new NullPointerException(); + } + + code_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * @return This builder for chaining. + */ + public Builder clearCode() { + + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object cause_ = ""; + /** + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * @return The cause. + */ + public java.lang.String getCause() { + java.lang.Object ref = cause_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cause_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * @return The bytes for cause. + */ + public com.google.protobuf.ByteString + getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cause_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value; + onChanged(); + return this; + } + /** + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = getDefaultInstance().getCause(); + onChanged(); + return this; + } + /** + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * @param value The bytes for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cause_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisState) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisState) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisState(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisState(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java new file mode 100644 index 000000000000..6208f59f108b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface IamPolicyAnalysisStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisState) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + /** + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * @return The code. + */ + com.google.rpc.Code getCode(); + + /** + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * @return The cause. + */ + java.lang.String getCause(); + /** + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * @return The bytes for cause. + */ + com.google.protobuf.ByteString + getCauseBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java new file mode 100644 index 000000000000..1d71cd11bfab --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java @@ -0,0 +1,3817 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A result of IAM Policy search, containing information of an IAM policy.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult} + */ +public final class IamPolicySearchResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicySearchResult) + IamPolicySearchResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use IamPolicySearchResult.newBuilder() to construct. + private IamPolicySearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IamPolicySearchResult() { + resource_ = ""; + assetType_ = ""; + project_ = ""; + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + organization_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IamPolicySearchResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IamPolicySearchResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 26: { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (policy_ != null) { + subBuilder = policy_.toBuilder(); + } + policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policy_); + policy_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder subBuilder = null; + if (explanation_ != null) { + subBuilder = explanation_.toBuilder(); + } + explanation_ = input.readMessage(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(explanation_); + explanation_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + folders_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + folders_.add(s); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + organization_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + folders_ = folders_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicySearchResult.class, com.google.cloud.asset.v1.IamPolicySearchResult.Builder.class); + } + + public interface ExplanationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicySearchResult.Explanation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + int getMatchedPermissionsCount(); + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + boolean containsMatchedPermissions( + java.lang.String key); + /** + * Use {@link #getMatchedPermissionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMatchedPermissions(); + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + java.util.Map + getMatchedPermissionsMap(); + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + + /* nullable */ +com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions defaultValue); + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrThrow( + java.lang.String key); + } + /** + *
+   * Explanation about the IAM policy search result.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation} + */ + public static final class Explanation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation) + ExplanationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Explanation.newBuilder() to construct. + private Explanation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Explanation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Explanation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Explanation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + matchedPermissions_ = com.google.protobuf.MapField.newMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + matchedPermissions__ = input.readMessage( + MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + matchedPermissions_.getMutableMap().put( + matchedPermissions__.getKey(), matchedPermissions__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMatchedPermissions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder.class); + } + + public interface PermissionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @return A list containing the permissions. + */ + java.util.List + getPermissionsList(); + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @return The count of permissions. + */ + int getPermissionsCount(); + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + java.lang.String getPermissions(int index); + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + com.google.protobuf.ByteString + getPermissionsBytes(int index); + } + /** + *
+     * IAM permissions
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions} + */ + public static final class Permissions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) + PermissionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Permissions.newBuilder() to construct. + private Permissions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Permissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Permissions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Permissions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + permissions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.Builder.class); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList permissions_; + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList + getPermissionsList() { + return permissions_; + } + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + *
+       * A list of permissions. A sample permission string: `compute.disk.get`.
+       * 
+ * + * repeated string permissions = 1; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString + getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < permissions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < permissions_.size(); i++) { + dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPermissionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions other = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) obj; + + if (!getPermissionsList() + .equals(other.getPermissionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+       * IAM permissions
+       * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.PermissionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions build() { + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions buildPartial() { + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions result = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.permissions_ = permissions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions other) { + if (other == com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.getDefaultInstance()) return this; + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePermissionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList + getPermissionsList() { + return permissions_.getUnmodifiableView(); + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString + getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @param index The index to set the value at. + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + onChanged(); + return this; + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @param value The permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + return this; + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @param values The permissions to add. + * @return This builder for chaining. + */ + public Builder addAllPermissions( + java.lang.Iterable values) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, permissions_); + onChanged(); + return this; + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @return This builder for chaining. + */ + public Builder clearPermissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+         * A list of permissions. A sample permission string: `compute.disk.get`.
+         * 
+ * + * repeated string permissions = 1; + * @param value The bytes of the permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) + private static final com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions(); + } + + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Permissions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Permissions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int MATCHED_PERMISSIONS_FIELD_NUMBER = 1; + private static final class MatchedPermissionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matchedPermissions_; + private com.google.protobuf.MapField + internalGetMatchedPermissions() { + if (matchedPermissions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + } + return matchedPermissions_; + } + + public int getMatchedPermissionsCount() { + return internalGetMatchedPermissions().getMap().size(); + } + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + + @java.lang.Override + public boolean containsMatchedPermissions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMatchedPermissions().getMap().containsKey(key); + } + /** + * Use {@link #getMatchedPermissionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMatchedPermissions() { + return getMatchedPermissionsMap(); + } + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public java.util.Map getMatchedPermissionsMap() { + return internalGetMatchedPermissions().getMap(); + } + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrDefault( + java.lang.String key, + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The map from roles to their included permissions that match the
+     * permission query (i.e., a query containing `policy.role.permissions:`).
+     * Example: if query `policy.role.permissions:compute.disk.get`
+     * matches a policy binding that contains owner role, the
+     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+     * roles can also be found in the returned `policy` bindings. Note that the
+     * map is populated only for requests with permission queries.
+     * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMatchedPermissions(), + MatchedPermissionsDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetMatchedPermissions().getMap().entrySet()) { + com.google.protobuf.MapEntry + matchedPermissions__ = MatchedPermissionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, matchedPermissions__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation other = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation) obj; + + if (!internalGetMatchedPermissions().equals( + other.internalGetMatchedPermissions())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetMatchedPermissions().getMap().isEmpty()) { + hash = (37 * hash) + MATCHED_PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetMatchedPermissions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Explanation about the IAM policy search result.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation) + com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMatchedPermissions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableMatchedPermissions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableMatchedPermissions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation build() { + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation buildPartial() { + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation result = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation(this); + int from_bitField0_ = bitField0_; + result.matchedPermissions_ = internalGetMatchedPermissions(); + result.matchedPermissions_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicySearchResult.Explanation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation other) { + if (other == com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance()) return this; + internalGetMutableMatchedPermissions().mergeFrom( + other.internalGetMatchedPermissions()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matchedPermissions_; + private com.google.protobuf.MapField + internalGetMatchedPermissions() { + if (matchedPermissions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + } + return matchedPermissions_; + } + private com.google.protobuf.MapField + internalGetMutableMatchedPermissions() { + onChanged();; + if (matchedPermissions_ == null) { + matchedPermissions_ = com.google.protobuf.MapField.newMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + } + if (!matchedPermissions_.isMutable()) { + matchedPermissions_ = matchedPermissions_.copy(); + } + return matchedPermissions_; + } + + public int getMatchedPermissionsCount() { + return internalGetMatchedPermissions().getMap().size(); + } + /** + *
+       * The map from roles to their included permissions that match the
+       * permission query (i.e., a query containing `policy.role.permissions:`).
+       * Example: if query `policy.role.permissions:compute.disk.get`
+       * matches a policy binding that contains owner role, the
+       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+       * roles can also be found in the returned `policy` bindings. Note that the
+       * map is populated only for requests with permission queries.
+       * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + + @java.lang.Override + public boolean containsMatchedPermissions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMatchedPermissions().getMap().containsKey(key); + } + /** + * Use {@link #getMatchedPermissionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMatchedPermissions() { + return getMatchedPermissionsMap(); + } + /** + *
+       * The map from roles to their included permissions that match the
+       * permission query (i.e., a query containing `policy.role.permissions:`).
+       * Example: if query `policy.role.permissions:compute.disk.get`
+       * matches a policy binding that contains owner role, the
+       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+       * roles can also be found in the returned `policy` bindings. Note that the
+       * map is populated only for requests with permission queries.
+       * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public java.util.Map getMatchedPermissionsMap() { + return internalGetMatchedPermissions().getMap(); + } + /** + *
+       * The map from roles to their included permissions that match the
+       * permission query (i.e., a query containing `policy.role.permissions:`).
+       * Example: if query `policy.role.permissions:compute.disk.get`
+       * matches a policy binding that contains owner role, the
+       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+       * roles can also be found in the returned `policy` bindings. Note that the
+       * map is populated only for requests with permission queries.
+       * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrDefault( + java.lang.String key, + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The map from roles to their included permissions that match the
+       * permission query (i.e., a query containing `policy.role.permissions:`).
+       * Example: if query `policy.role.permissions:compute.disk.get`
+       * matches a policy binding that contains owner role, the
+       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+       * roles can also be found in the returned `policy` bindings. Note that the
+       * map is populated only for requests with permission queries.
+       * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMatchedPermissions() { + internalGetMutableMatchedPermissions().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The map from roles to their included permissions that match the
+       * permission query (i.e., a query containing `policy.role.permissions:`).
+       * Example: if query `policy.role.permissions:compute.disk.get`
+       * matches a policy binding that contains owner role, the
+       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+       * roles can also be found in the returned `policy` bindings. Note that the
+       * map is populated only for requests with permission queries.
+       * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + + public Builder removeMatchedPermissions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMatchedPermissions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMatchedPermissions() { + return internalGetMutableMatchedPermissions().getMutableMap(); + } + /** + *
+       * The map from roles to their included permissions that match the
+       * permission query (i.e., a query containing `policy.role.permissions:`).
+       * Example: if query `policy.role.permissions:compute.disk.get`
+       * matches a policy binding that contains owner role, the
+       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+       * roles can also be found in the returned `policy` bindings. Note that the
+       * map is populated only for requests with permission queries.
+       * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + public Builder putMatchedPermissions( + java.lang.String key, + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableMatchedPermissions().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The map from roles to their included permissions that match the
+       * permission query (i.e., a query containing `policy.role.permissions:`).
+       * Example: if query `policy.role.permissions:compute.disk.get`
+       * matches a policy binding that contains owner role, the
+       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
+       * roles can also be found in the returned `policy` bindings. Note that the
+       * map is populated only for requests with permission queries.
+       * 
+ * + * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; + */ + + public Builder putAllMatchedPermissions( + java.util.Map values) { + internalGetMutableMatchedPermissions().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation) + private static final com.google.cloud.asset.v1.IamPolicySearchResult.Explanation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation(); + } + + public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Explanation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Explanation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + *
+   * The full resource name of the resource associated with this IAM policy.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `resource`:
+   * * use a field query. Example: `resource:organizations/123`
+   * 
+ * + * string resource = 1; + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + *
+   * The full resource name of the resource associated with this IAM policy.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `resource`:
+   * * use a field query. Example: `resource:organizations/123`
+   * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 5; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of the resource associated with this IAM policy. Example:
+   * `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_types` field in your search request.
+   * 
+ * + * string asset_type = 5; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of the resource associated with this IAM policy. Example:
+   * `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_types` field in your search request.
+   * 
+ * + * string asset_type = 5; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_FIELD_NUMBER = 2; + private volatile java.lang.Object project_; + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, this field will be empty.
+   * To search against the `project`:
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 2; + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, this field will be empty.
+   * To search against the `project`:
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 2; + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FOLDERS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList folders_; + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @return A list containing the folders. + */ + public com.google.protobuf.ProtocolStringList + getFoldersList() { + return folders_; + } + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @return The count of folders. + */ + public int getFoldersCount() { + return folders_.size(); + } + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @param index The index of the element to return. + * @return The folders at the given index. + */ + public java.lang.String getFolders(int index) { + return folders_.get(index); + } + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + public com.google.protobuf.ByteString + getFoldersBytes(int index) { + return folders_.getByteString(index); + } + + public static final int ORGANIZATION_FIELD_NUMBER = 7; + private volatile java.lang.Object organization_; + /** + *
+   * The organization that the IAM policy belongs to, in the form
+   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * IAM policy belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 7; + * @return The organization. + */ + @java.lang.Override + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } + } + /** + *
+   * The organization that the IAM policy belongs to, in the form
+   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * IAM policy belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 7; + * @return The bytes for organization. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_FIELD_NUMBER = 3; + private com.google.iam.v1.Policy policy_; + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g., an empty query), this contains all the bindings.
+   * To search against the `policy` bindings:
+   * * use a field query:
+   *     - query by the policy contained members. Example:
+   *       `policy:amy@gmail.com`
+   *     - query by the policy contained roles. Example:
+   *       `policy:roles/compute.admin`
+   *     - query by the policy contained roles' included permissions. Example:
+   *       `policy.role.permissions:compute.instances.create`
+   * 
+ * + * .google.iam.v1.Policy policy = 3; + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return policy_ != null; + } + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g., an empty query), this contains all the bindings.
+   * To search against the `policy` bindings:
+   * * use a field query:
+   *     - query by the policy contained members. Example:
+   *       `policy:amy@gmail.com`
+   *     - query by the policy contained roles. Example:
+   *       `policy:roles/compute.admin`
+   *     - query by the policy contained roles' included permissions. Example:
+   *       `policy.role.permissions:compute.instances.create`
+   * 
+ * + * .google.iam.v1.Policy policy = 3; + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getPolicy() { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g., an empty query), this contains all the bindings.
+   * To search against the `policy` bindings:
+   * * use a field query:
+   *     - query by the policy contained members. Example:
+   *       `policy:amy@gmail.com`
+   *     - query by the policy contained roles. Example:
+   *       `policy:roles/compute.admin`
+   *     - query by the policy contained roles' included permissions. Example:
+   *       `policy.role.permissions:compute.instances.create`
+   * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + return getPolicy(); + } + + public static final int EXPLANATION_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation_; + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + * @return Whether the explanation field is set. + */ + @java.lang.Override + public boolean hasExplanation() { + return explanation_ != null; + } + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + * @return The explanation. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getExplanation() { + return explanation_ == null ? com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; + } + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { + return getExplanation(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_); + } + if (policy_ != null) { + output.writeMessage(3, getPolicy()); + } + if (explanation_ != null) { + output.writeMessage(4, getExplanation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, assetType_); + } + for (int i = 0; i < folders_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, folders_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, organization_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_); + } + if (policy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPolicy()); + } + if (explanation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getExplanation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, assetType_); + } + { + int dataSize = 0; + for (int i = 0; i < folders_.size(); i++) { + dataSize += computeStringSizeNoTag(folders_.getRaw(i)); + } + size += dataSize; + size += 1 * getFoldersList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, organization_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicySearchResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicySearchResult other = (com.google.cloud.asset.v1.IamPolicySearchResult) obj; + + if (!getResource() + .equals(other.getResource())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (!getProject() + .equals(other.getProject())) return false; + if (!getFoldersList() + .equals(other.getFoldersList())) return false; + if (!getOrganization() + .equals(other.getOrganization())) return false; + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy() + .equals(other.getPolicy())) return false; + } + if (hasExplanation() != other.hasExplanation()) return false; + if (hasExplanation()) { + if (!getExplanation() + .equals(other.getExplanation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + if (getFoldersCount() > 0) { + hash = (37 * hash) + FOLDERS_FIELD_NUMBER; + hash = (53 * hash) + getFoldersList().hashCode(); + } + hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; + hash = (53 * hash) + getOrganization().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + if (hasExplanation()) { + hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; + hash = (53 * hash) + getExplanation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicySearchResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A result of IAM Policy search, containing information of an IAM policy.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicySearchResult) + com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicySearchResult.class, com.google.cloud.asset.v1.IamPolicySearchResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resource_ = ""; + + assetType_ = ""; + + project_ = ""; + + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + organization_ = ""; + + if (policyBuilder_ == null) { + policy_ = null; + } else { + policy_ = null; + policyBuilder_ = null; + } + if (explanationBuilder_ == null) { + explanation_ = null; + } else { + explanation_ = null; + explanationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult build() { + com.google.cloud.asset.v1.IamPolicySearchResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult buildPartial() { + com.google.cloud.asset.v1.IamPolicySearchResult result = new com.google.cloud.asset.v1.IamPolicySearchResult(this); + int from_bitField0_ = bitField0_; + result.resource_ = resource_; + result.assetType_ = assetType_; + result.project_ = project_; + if (((bitField0_ & 0x00000001) != 0)) { + folders_ = folders_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.folders_ = folders_; + result.organization_ = organization_; + if (policyBuilder_ == null) { + result.policy_ = policy_; + } else { + result.policy_ = policyBuilder_.build(); + } + if (explanationBuilder_ == null) { + result.explanation_ = explanation_; + } else { + result.explanation_ = explanationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.IamPolicySearchResult) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicySearchResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult other) { + if (other == com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + if (!other.folders_.isEmpty()) { + if (folders_.isEmpty()) { + folders_ = other.folders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFoldersIsMutable(); + folders_.addAll(other.folders_); + } + onChanged(); + } + if (!other.getOrganization().isEmpty()) { + organization_ = other.organization_; + onChanged(); + } + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + if (other.hasExplanation()) { + mergeExplanation(other.getExplanation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicySearchResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicySearchResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object resource_ = ""; + /** + *
+     * The full resource name of the resource associated with this IAM policy.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `resource`:
+     * * use a field query. Example: `resource:organizations/123`
+     * 
+ * + * string resource = 1; + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full resource name of the resource associated with this IAM policy.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `resource`:
+     * * use a field query. Example: `resource:organizations/123`
+     * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full resource name of the resource associated with this IAM policy.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `resource`:
+     * * use a field query. Example: `resource:organizations/123`
+     * 
+ * + * string resource = 1; + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + *
+     * The full resource name of the resource associated with this IAM policy.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `resource`:
+     * * use a field query. Example: `resource:organizations/123`
+     * 
+ * + * string resource = 1; + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + *
+     * The full resource name of the resource associated with this IAM policy.
+     * Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `resource`:
+     * * use a field query. Example: `resource:organizations/123`
+     * 
+ * + * string resource = 1; + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of the resource associated with this IAM policy. Example:
+     * `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_types` field in your search request.
+     * 
+ * + * string asset_type = 5; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the resource associated with this IAM policy. Example:
+     * `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_types` field in your search request.
+     * 
+ * + * string asset_type = 5; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the resource associated with this IAM policy. Example:
+     * `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_types` field in your search request.
+     * 
+ * + * string asset_type = 5; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the resource associated with this IAM policy. Example:
+     * `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_types` field in your search request.
+     * 
+ * + * string asset_type = 5; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of the resource associated with this IAM policy. Example:
+     * `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_types` field in your search request.
+     * 
+ * + * string asset_type = 5; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private java.lang.Object project_ = ""; + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, this field will be empty.
+     * To search against the `project`:
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 2; + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, this field will be empty.
+     * To search against the `project`:
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 2; + * @return The bytes for project. + */ + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, this field will be empty.
+     * To search against the `project`:
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 2; + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, this field will be empty.
+     * To search against the `project`:
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 2; + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, this field will be empty.
+     * To search against the `project`:
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 2; + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureFoldersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + folders_ = new com.google.protobuf.LazyStringArrayList(folders_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @return A list containing the folders. + */ + public com.google.protobuf.ProtocolStringList + getFoldersList() { + return folders_.getUnmodifiableView(); + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @return The count of folders. + */ + public int getFoldersCount() { + return folders_.size(); + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @param index The index of the element to return. + * @return The folders at the given index. + */ + public java.lang.String getFolders(int index) { + return folders_.get(index); + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + public com.google.protobuf.ByteString + getFoldersBytes(int index) { + return folders_.getByteString(index); + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @param index The index to set the value at. + * @param value The folders to set. + * @return This builder for chaining. + */ + public Builder setFolders( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFoldersIsMutable(); + folders_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @param value The folders to add. + * @return This builder for chaining. + */ + public Builder addFolders( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFoldersIsMutable(); + folders_.add(value); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @param values The folders to add. + * @return This builder for chaining. + */ + public Builder addAllFolders( + java.lang.Iterable values) { + ensureFoldersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, folders_); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @return This builder for chaining. + */ + public Builder clearFolders() { + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that the IAM policy belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 6; + * @param value The bytes of the folders to add. + * @return This builder for chaining. + */ + public Builder addFoldersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFoldersIsMutable(); + folders_.add(value); + onChanged(); + return this; + } + + private java.lang.Object organization_ = ""; + /** + *
+     * The organization that the IAM policy belongs to, in the form
+     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * IAM policy belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 7; + * @return The organization. + */ + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The organization that the IAM policy belongs to, in the form
+     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * IAM policy belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 7; + * @return The bytes for organization. + */ + public com.google.protobuf.ByteString + getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The organization that the IAM policy belongs to, in the form
+     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * IAM policy belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 7; + * @param value The organization to set. + * @return This builder for chaining. + */ + public Builder setOrganization( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + organization_ = value; + onChanged(); + return this; + } + /** + *
+     * The organization that the IAM policy belongs to, in the form
+     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * IAM policy belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 7; + * @return This builder for chaining. + */ + public Builder clearOrganization() { + + organization_ = getDefaultInstance().getOrganization(); + onChanged(); + return this; + } + /** + *
+     * The organization that the IAM policy belongs to, in the form
+     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * IAM policy belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 7; + * @param value The bytes for organization to set. + * @return This builder for chaining. + */ + public Builder setOrganizationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + organization_ = value; + onChanged(); + return this; + } + + private com.google.iam.v1.Policy policy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> policyBuilder_; + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return policyBuilder_ != null || policy_ != null; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + * @return The policy. + */ + public com.google.iam.v1.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + public Builder setPolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + onChanged(); + } else { + policyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + public Builder setPolicy( + com.google.iam.v1.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + onChanged(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + public Builder mergePolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (policy_ != null) { + policy_ = + com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); + } else { + policy_ = value; + } + onChanged(); + } else { + policyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + public Builder clearPolicy() { + if (policyBuilder_ == null) { + policy_ = null; + onChanged(); + } else { + policy_ = null; + policyBuilder_ = null; + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + public com.google.iam.v1.Policy.Builder getPolicyBuilder() { + + onChanged(); + return getPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? + com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g., an empty query), this contains all the bindings.
+     * To search against the `policy` bindings:
+     * * use a field query:
+     *     - query by the policy contained members. Example:
+     *       `policy:amy@gmail.com`
+     *     - query by the policy contained roles. Example:
+     *       `policy:roles/compute.admin`
+     *     - query by the policy contained roles' included permissions. Example:
+     *       `policy.role.permissions:compute.instances.create`
+     * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> + getPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( + getPolicy(), + getParentForChildren(), + isClean()); + policy_ = null; + } + return policyBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder> explanationBuilder_; + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + * @return Whether the explanation field is set. + */ + public boolean hasExplanation() { + return explanationBuilder_ != null || explanation_ != null; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + * @return The explanation. + */ + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getExplanation() { + if (explanationBuilder_ == null) { + return explanation_ == null ? com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; + } else { + return explanationBuilder_.getMessage(); + } + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + public Builder setExplanation(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation value) { + if (explanationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + explanation_ = value; + onChanged(); + } else { + explanationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + public Builder setExplanation( + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder builderForValue) { + if (explanationBuilder_ == null) { + explanation_ = builderForValue.build(); + onChanged(); + } else { + explanationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + public Builder mergeExplanation(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation value) { + if (explanationBuilder_ == null) { + if (explanation_ != null) { + explanation_ = + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.newBuilder(explanation_).mergeFrom(value).buildPartial(); + } else { + explanation_ = value; + } + onChanged(); + } else { + explanationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + public Builder clearExplanation() { + if (explanationBuilder_ == null) { + explanation_ = null; + onChanged(); + } else { + explanation_ = null; + explanationBuilder_ = null; + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder getExplanationBuilder() { + + onChanged(); + return getExplanationFieldBuilder().getBuilder(); + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + public com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { + if (explanationBuilder_ != null) { + return explanationBuilder_.getMessageOrBuilder(); + } else { + return explanation_ == null ? + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; + } + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder> + getExplanationFieldBuilder() { + if (explanationBuilder_ == null) { + explanationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder>( + getExplanation(), + getParentForChildren(), + isClean()); + explanation_ = null; + } + return explanationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicySearchResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult) + private static final com.google.cloud.asset.v1.IamPolicySearchResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicySearchResult(); + } + + public static com.google.cloud.asset.v1.IamPolicySearchResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicySearchResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicySearchResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java new file mode 100644 index 000000000000..6958f7f88c6c --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java @@ -0,0 +1,288 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface IamPolicySearchResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicySearchResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The full resource name of the resource associated with this IAM policy.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `resource`:
+   * * use a field query. Example: `resource:organizations/123`
+   * 
+ * + * string resource = 1; + * @return The resource. + */ + java.lang.String getResource(); + /** + *
+   * The full resource name of the resource associated with this IAM policy.
+   * Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `resource`:
+   * * use a field query. Example: `resource:organizations/123`
+   * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + com.google.protobuf.ByteString + getResourceBytes(); + + /** + *
+   * The type of the resource associated with this IAM policy. Example:
+   * `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_types` field in your search request.
+   * 
+ * + * string asset_type = 5; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of the resource associated with this IAM policy. Example:
+   * `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_types` field in your search request.
+   * 
+ * + * string asset_type = 5; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, this field will be empty.
+   * To search against the `project`:
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 2; + * @return The project. + */ + java.lang.String getProject(); + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, this field will be empty.
+   * To search against the `project`:
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 2; + * @return The bytes for project. + */ + com.google.protobuf.ByteString + getProjectBytes(); + + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @return A list containing the folders. + */ + java.util.List + getFoldersList(); + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @return The count of folders. + */ + int getFoldersCount(); + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @param index The index of the element to return. + * @return The folders at the given index. + */ + java.lang.String getFolders(int index); + /** + *
+   * The folder(s) that the IAM policy belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 6; + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + com.google.protobuf.ByteString + getFoldersBytes(int index); + + /** + *
+   * The organization that the IAM policy belongs to, in the form
+   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * IAM policy belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 7; + * @return The organization. + */ + java.lang.String getOrganization(); + /** + *
+   * The organization that the IAM policy belongs to, in the form
+   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * IAM policy belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 7; + * @return The bytes for organization. + */ + com.google.protobuf.ByteString + getOrganizationBytes(); + + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g., an empty query), this contains all the bindings.
+   * To search against the `policy` bindings:
+   * * use a field query:
+   *     - query by the policy contained members. Example:
+   *       `policy:amy@gmail.com`
+   *     - query by the policy contained roles. Example:
+   *       `policy:roles/compute.admin`
+   *     - query by the policy contained roles' included permissions. Example:
+   *       `policy.role.permissions:compute.instances.create`
+   * 
+ * + * .google.iam.v1.Policy policy = 3; + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g., an empty query), this contains all the bindings.
+   * To search against the `policy` bindings:
+   * * use a field query:
+   *     - query by the policy contained members. Example:
+   *       `policy:amy@gmail.com`
+   *     - query by the policy contained roles. Example:
+   *       `policy:roles/compute.admin`
+   *     - query by the policy contained roles' included permissions. Example:
+   *       `policy.role.permissions:compute.instances.create`
+   * 
+ * + * .google.iam.v1.Policy policy = 3; + * @return The policy. + */ + com.google.iam.v1.Policy getPolicy(); + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g., an empty query), this contains all the bindings.
+   * To search against the `policy` bindings:
+   * * use a field query:
+   *     - query by the policy contained members. Example:
+   *       `policy:amy@gmail.com`
+   *     - query by the policy contained roles. Example:
+   *       `policy:roles/compute.admin`
+   *     - query by the policy contained roles' included permissions. Example:
+   *       `policy.role.permissions:compute.instances.create`
+   * 
+ * + * .google.iam.v1.Policy policy = 3; + */ + com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); + + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + * @return Whether the explanation field is set. + */ + boolean hasExplanation(); + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + * @return The explanation. + */ + com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getExplanation(); + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; + */ + com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java new file mode 100644 index 000000000000..f3b5c589a243 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java @@ -0,0 +1,2144 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * ListAssets request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsRequest} + */ +public final class ListAssetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListAssetsRequest) + ListAssetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAssetsRequest.newBuilder() to construct. + private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAssetsRequest() { + parent_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + pageToken_ = ""; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAssetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListAssetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 40: { + + pageSize_ = input.readInt32(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + relationshipTypes_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsRequest.class, com.google.cloud.asset.v1.ListAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Name of the organization, folder, or project the assets belong
+   * to. Format: "organizations/[organization-number]" (such as
+   * "organizations/123"), "projects/[project-id]" (such as
+   * "projects/my-project-id"), "projects/[project-number]" (such as
+   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Name of the organization, folder, or project the assets belong
+   * to. Format: "organizations/[organization-number]" (such as
+   * "organizations/123"), "projects/[project-id]" (such as
+   * "projects/my-project-id"), "projects/[project-number]" (such as
+   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 4; + private int contentType_; + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 5; + private int pageSize_; + /** + *
+   * The maximum number of assets to be returned in a single response. Default
+   * is 100, minimum is 1, and maximum is 1000.
+   * 
+ * + * int32 page_size = 5; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object pageToken_; + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_; + } + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (readTime_ != null) { + output.writeMessage(2, getReadTime()); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, contentType_); + } + if (pageSize_ != 0) { + output.writeInt32(5, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadTime()); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, contentType_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListAssetsRequest other = (com.google.cloud.asset.v1.ListAssetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (contentType_ != other.contentType_) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getRelationshipTypesList() + .equals(other.getRelationshipTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ListAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * ListAssets request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListAssetsRequest) + com.google.cloud.asset.v1.ListAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsRequest.class, com.google.cloud.asset.v1.ListAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListAssetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + contentType_ = 0; + + pageSize_ = 0; + + pageToken_ = ""; + + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest build() { + com.google.cloud.asset.v1.ListAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest buildPartial() { + com.google.cloud.asset.v1.ListAssetsRequest result = new com.google.cloud.asset.v1.ListAssetsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.contentType_ = contentType_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationshipTypes_ = relationshipTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ListAssetsRequest) { + return mergeFrom((com.google.cloud.asset.v1.ListAssetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsRequest other) { + if (other == com.google.cloud.asset.v1.ListAssetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListAssetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListAssetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Name of the organization, folder, or project the assets belong
+     * to. Format: "organizations/[organization-number]" (such as
+     * "organizations/123"), "projects/[project-id]" (such as
+     * "projects/my-project-id"), "projects/[project-number]" (such as
+     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Name of the organization, folder, or project the assets belong
+     * to. Format: "organizations/[organization-number]" (such as
+     * "organizations/123"), "projects/[project-id]" (such as
+     * "projects/my-project-id"), "projects/[project-number]" (such as
+     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Name of the organization, folder, or project the assets belong
+     * to. Format: "organizations/[organization-number]" (such as
+     * "organizations/123"), "projects/[project-id]" (such as
+     * "projects/my-project-id"), "projects/[project-number]" (such as
+     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Name of the organization, folder, or project the assets belong
+     * to. Format: "organizations/[organization-number]" (such as
+     * "organizations/123"), "projects/[project-id]" (such as
+     * "projects/my-project-id"), "projects/[project-number]" (such as
+     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Name of the organization, folder, or project the assets belong
+     * to. Format: "organizations/[organization-number]" (such as
+     * "organizations/123"), "projects/[project-id]" (such as
+     * "projects/my-project-id"), "projects/[project-number]" (such as
+     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expression is also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of assets to be returned in a single response. Default
+     * is 100, minimum is 1, and maximum is 1000.
+     * 
+ * + * int32 page_size = 5; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of assets to be returned in a single response. Default
+     * is 100, minimum is 1, and maximum is 1000.
+     * 
+ * + * int32 page_size = 5; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of assets to be returned in a single response. Default
+     * is 100, minimum is 1, and maximum is 1000.
+     * 
+ * + * int32 page_size = 5; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes( + java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationshipTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListAssetsRequest) + private static final com.google.cloud.asset.v1.ListAssetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListAssetsRequest(); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAssetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..570a4d9a58ea --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java @@ -0,0 +1,322 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListAssetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Name of the organization, folder, or project the assets belong
+   * to. Format: "organizations/[organization-number]" (such as
+   * "organizations/123"), "projects/[project-id]" (such as
+   * "projects/my-project-id"), "projects/[project-number]" (such as
+   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Name of the organization, folder, or project the assets belong
+   * to. Format: "organizations/[organization-number]" (such as
+   * "organizations/123"), "projects/[project-id]" (such as
+   * "projects/my-project-id"), "projects/[project-number]" (such as
+   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expression is also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1.ContentType content_type = 4; + * @return The contentType. + */ + com.google.cloud.asset.v1.ContentType getContentType(); + + /** + *
+   * The maximum number of assets to be returned in a single response. Default
+   * is 100, minimum is 1, and maximum is 1000.
+   * 
+ * + * int32 page_size = 5; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return A list containing the relationshipTypes. + */ + java.util.List + getRelationshipTypesList(); + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString + getRelationshipTypesBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java new file mode 100644 index 000000000000..b2c378da5fa2 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java @@ -0,0 +1,1288 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * ListAssets response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsResponse} + */ +public final class ListAssetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListAssetsResponse) + ListAssetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAssetsResponse.newBuilder() to construct. + private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAssetsResponse() { + assets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAssetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListAssetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assets_.add( + input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry)); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsResponse.class, com.google.cloud.asset.v1.ListAssetsResponse.Builder.class); + } + + public static final int READ_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSETS_FIELD_NUMBER = 2; + private java.util.List assets_; + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.Asset getAssets(int index) { + return assets_.get(index); + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder( + int index) { + return assets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results. It expires 72 hours after the
+   * page token for the first page is generated. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results. It expires 72 hours after the
+   * page token for the first page is generated. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (readTime_ != null) { + output.writeMessage(1, getReadTime()); + } + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(2, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getReadTime()); + } + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListAssetsResponse other = (com.google.cloud.asset.v1.ListAssetsResponse) obj; + + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (!getAssetsList() + .equals(other.getAssetsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ListAssetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * ListAssets response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListAssetsResponse) + com.google.cloud.asset.v1.ListAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsResponse.class, com.google.cloud.asset.v1.ListAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListAssetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAssetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + assetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse build() { + com.google.cloud.asset.v1.ListAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse buildPartial() { + com.google.cloud.asset.v1.ListAssetsResponse result = new com.google.cloud.asset.v1.ListAssetsResponse(this); + int from_bitField0_ = bitField0_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ListAssetsResponse) { + return mergeFrom((com.google.cloud.asset.v1.ListAssetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsResponse other) { + if (other == com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance()) return this; + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssetsFieldBuilder() : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListAssetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListAssetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private java.util.List assets_ = + java.util.Collections.emptyList(); + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> assetsBuilder_; + + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets( + com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset.Builder getAssetsBuilder( + int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder( + int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.Asset.getDefaultInstance()); + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset.Builder addAssetsBuilder( + int index) { + return getAssetsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.Asset.getDefaultInstance()); + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public java.util.List + getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder>( + assets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results. It expires 72 hours after the
+     * page token for the first page is generated. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results. It expires 72 hours after the
+     * page token for the first page is generated. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results. It expires 72 hours after the
+     * page token for the first page is generated. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results. It expires 72 hours after the
+     * page token for the first page is generated. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results. It expires 72 hours after the
+     * page token for the first page is generated. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListAssetsResponse) + private static final com.google.cloud.asset.v1.ListAssetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListAssetsResponse(); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAssetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..788d4a5158c7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java @@ -0,0 +1,104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListAssetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + java.util.List + getAssetsList(); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + com.google.cloud.asset.v1.Asset getAssets(int index); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + int getAssetsCount(); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + java.util.List + getAssetsOrBuilderList(); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results. It expires 72 hours after the
+   * page token for the first page is generated. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results. It expires 72 hours after the
+   * page token for the first page is generated. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java new file mode 100644 index 000000000000..85f46daa9639 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * List asset feeds request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListFeedsRequest} + */ +public final class ListFeedsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListFeedsRequest) + ListFeedsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFeedsRequest.newBuilder() to construct. + private ListFeedsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFeedsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFeedsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListFeedsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListFeedsRequest.class, com.google.cloud.asset.v1.ListFeedsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListFeedsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListFeedsRequest other = (com.google.cloud.asset.v1.ListFeedsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ListFeedsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List asset feeds request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListFeedsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListFeedsRequest) + com.google.cloud.asset.v1.ListFeedsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListFeedsRequest.class, com.google.cloud.asset.v1.ListFeedsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListFeedsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListFeedsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsRequest build() { + com.google.cloud.asset.v1.ListFeedsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsRequest buildPartial() { + com.google.cloud.asset.v1.ListFeedsRequest result = new com.google.cloud.asset.v1.ListFeedsRequest(this); + result.parent_ = parent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ListFeedsRequest) { + return mergeFrom((com.google.cloud.asset.v1.ListFeedsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListFeedsRequest other) { + if (other == com.google.cloud.asset.v1.ListFeedsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListFeedsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListFeedsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListFeedsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListFeedsRequest) + private static final com.google.cloud.asset.v1.ListFeedsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListFeedsRequest(); + } + + public static com.google.cloud.asset.v1.ListFeedsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeedsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFeedsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java new file mode 100644 index 000000000000..be5ab6097189 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListFeedsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListFeedsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java new file mode 100644 index 000000000000..6efb29139425 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java @@ -0,0 +1,864 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * Protobuf type {@code google.cloud.asset.v1.ListFeedsResponse} + */ +public final class ListFeedsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListFeedsResponse) + ListFeedsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFeedsResponse.newBuilder() to construct. + private ListFeedsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFeedsResponse() { + feeds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFeedsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListFeedsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + feeds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + feeds_.add( + input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + feeds_ = java.util.Collections.unmodifiableList(feeds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListFeedsResponse.class, com.google.cloud.asset.v1.ListFeedsResponse.Builder.class); + } + + public static final int FEEDS_FIELD_NUMBER = 1; + private java.util.List feeds_; + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + @java.lang.Override + public java.util.List getFeedsList() { + return feeds_; + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + @java.lang.Override + public java.util.List + getFeedsOrBuilderList() { + return feeds_; + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + @java.lang.Override + public int getFeedsCount() { + return feeds_.size(); + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.Feed getFeeds(int index) { + return feeds_.get(index); + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.FeedOrBuilder getFeedsOrBuilder( + int index) { + return feeds_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < feeds_.size(); i++) { + output.writeMessage(1, feeds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < feeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, feeds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListFeedsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListFeedsResponse other = (com.google.cloud.asset.v1.ListFeedsResponse) obj; + + if (!getFeedsList() + .equals(other.getFeedsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFeedsCount() > 0) { + hash = (37 * hash) + FEEDS_FIELD_NUMBER; + hash = (53 * hash) + getFeedsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ListFeedsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.cloud.asset.v1.ListFeedsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListFeedsResponse) + com.google.cloud.asset.v1.ListFeedsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListFeedsResponse.class, com.google.cloud.asset.v1.ListFeedsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListFeedsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeedsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (feedsBuilder_ == null) { + feeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + feedsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListFeedsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsResponse build() { + com.google.cloud.asset.v1.ListFeedsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsResponse buildPartial() { + com.google.cloud.asset.v1.ListFeedsResponse result = new com.google.cloud.asset.v1.ListFeedsResponse(this); + int from_bitField0_ = bitField0_; + if (feedsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + feeds_ = java.util.Collections.unmodifiableList(feeds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.feeds_ = feeds_; + } else { + result.feeds_ = feedsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ListFeedsResponse) { + return mergeFrom((com.google.cloud.asset.v1.ListFeedsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListFeedsResponse other) { + if (other == com.google.cloud.asset.v1.ListFeedsResponse.getDefaultInstance()) return this; + if (feedsBuilder_ == null) { + if (!other.feeds_.isEmpty()) { + if (feeds_.isEmpty()) { + feeds_ = other.feeds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeedsIsMutable(); + feeds_.addAll(other.feeds_); + } + onChanged(); + } + } else { + if (!other.feeds_.isEmpty()) { + if (feedsBuilder_.isEmpty()) { + feedsBuilder_.dispose(); + feedsBuilder_ = null; + feeds_ = other.feeds_; + bitField0_ = (bitField0_ & ~0x00000001); + feedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeedsFieldBuilder() : null; + } else { + feedsBuilder_.addAllMessages(other.feeds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListFeedsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListFeedsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List feeds_ = + java.util.Collections.emptyList(); + private void ensureFeedsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + feeds_ = new java.util.ArrayList(feeds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> feedsBuilder_; + + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public java.util.List getFeedsList() { + if (feedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(feeds_); + } else { + return feedsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public int getFeedsCount() { + if (feedsBuilder_ == null) { + return feeds_.size(); + } else { + return feedsBuilder_.getCount(); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1.Feed getFeeds(int index) { + if (feedsBuilder_ == null) { + return feeds_.get(index); + } else { + return feedsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder setFeeds( + int index, com.google.cloud.asset.v1.Feed value) { + if (feedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedsIsMutable(); + feeds_.set(index, value); + onChanged(); + } else { + feedsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder setFeeds( + int index, com.google.cloud.asset.v1.Feed.Builder builderForValue) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.set(index, builderForValue.build()); + onChanged(); + } else { + feedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder addFeeds(com.google.cloud.asset.v1.Feed value) { + if (feedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedsIsMutable(); + feeds_.add(value); + onChanged(); + } else { + feedsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder addFeeds( + int index, com.google.cloud.asset.v1.Feed value) { + if (feedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedsIsMutable(); + feeds_.add(index, value); + onChanged(); + } else { + feedsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder addFeeds( + com.google.cloud.asset.v1.Feed.Builder builderForValue) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.add(builderForValue.build()); + onChanged(); + } else { + feedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder addFeeds( + int index, com.google.cloud.asset.v1.Feed.Builder builderForValue) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.add(index, builderForValue.build()); + onChanged(); + } else { + feedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder addAllFeeds( + java.lang.Iterable values) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, feeds_); + onChanged(); + } else { + feedsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder clearFeeds() { + if (feedsBuilder_ == null) { + feeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + feedsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public Builder removeFeeds(int index) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.remove(index); + onChanged(); + } else { + feedsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1.Feed.Builder getFeedsBuilder( + int index) { + return getFeedsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1.FeedOrBuilder getFeedsOrBuilder( + int index) { + if (feedsBuilder_ == null) { + return feeds_.get(index); } else { + return feedsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public java.util.List + getFeedsOrBuilderList() { + if (feedsBuilder_ != null) { + return feedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(feeds_); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1.Feed.Builder addFeedsBuilder() { + return getFeedsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.Feed.getDefaultInstance()); + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1.Feed.Builder addFeedsBuilder( + int index) { + return getFeedsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.Feed.getDefaultInstance()); + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + public java.util.List + getFeedsBuilderList() { + return getFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> + getFeedsFieldBuilder() { + if (feedsBuilder_ == null) { + feedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder>( + feeds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + feeds_ = null; + } + return feedsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListFeedsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListFeedsResponse) + private static final com.google.cloud.asset.v1.ListFeedsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListFeedsResponse(); + } + + public static com.google.cloud.asset.v1.ListFeedsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeedsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFeedsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListFeedsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java new file mode 100644 index 000000000000..d5bb75ca2b75 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListFeedsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListFeedsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + java.util.List + getFeedsList(); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + com.google.cloud.asset.v1.Feed getFeeds(int index); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + int getFeedsCount(); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + java.util.List + getFeedsOrBuilderList(); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1.Feed feeds = 1; + */ + com.google.cloud.asset.v1.FeedOrBuilder getFeedsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java new file mode 100644 index 000000000000..3afaad12c08b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java @@ -0,0 +1,1089 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Request to list saved queries.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesRequest} + */ +public final class ListSavedQueriesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListSavedQueriesRequest) + ListSavedQueriesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSavedQueriesRequest.newBuilder() to construct. + private ListSavedQueriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSavedQueriesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSavedQueriesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListSavedQueriesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + pageSize_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListSavedQueriesRequest.class, com.google.cloud.asset.v1.ListSavedQueriesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent project/folder/organization whose savedQueries are to
+   * be listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent project/folder/organization whose savedQueries are to
+   * be listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + *
+   * Optional. The expression to filter resources.
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations. The expression may also contain regular expressions.
+   * See https://google.aip.dev/160 for more information on the grammar.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + *
+   * Optional. The expression to filter resources.
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations. The expression may also contain regular expressions.
+   * See https://google.aip.dev/160 for more information on the grammar.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + *
+   * Optional. The maximum number of saved queries to return per page. The
+   * service may return fewer than this value. If unspecified, at most 50 will
+   * be returned.
+   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + *
+   * Optional. A page token, received from a previous `ListSavedQueries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListSavedQueries` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token, received from a previous `ListSavedQueries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListSavedQueries` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListSavedQueriesRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListSavedQueriesRequest other = (com.google.cloud.asset.v1.ListSavedQueriesRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFilter() + .equals(other.getFilter())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ListSavedQueriesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to list saved queries.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListSavedQueriesRequest) + com.google.cloud.asset.v1.ListSavedQueriesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListSavedQueriesRequest.class, com.google.cloud.asset.v1.ListSavedQueriesRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListSavedQueriesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListSavedQueriesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesRequest build() { + com.google.cloud.asset.v1.ListSavedQueriesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesRequest buildPartial() { + com.google.cloud.asset.v1.ListSavedQueriesRequest result = new com.google.cloud.asset.v1.ListSavedQueriesRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ListSavedQueriesRequest) { + return mergeFrom((com.google.cloud.asset.v1.ListSavedQueriesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListSavedQueriesRequest other) { + if (other == com.google.cloud.asset.v1.ListSavedQueriesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListSavedQueriesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListSavedQueriesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent project/folder/organization whose savedQueries are to
+     * be listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent project/folder/organization whose savedQueries are to
+     * be listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent project/folder/organization whose savedQueries are to
+     * be listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent project/folder/organization whose savedQueries are to
+     * be listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent project/folder/organization whose savedQueries are to
+     * be listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * Optional. The expression to filter resources.
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations. The expression may also contain regular expressions.
+     * See https://google.aip.dev/160 for more information on the grammar.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The expression to filter resources.
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations. The expression may also contain regular expressions.
+     * See https://google.aip.dev/160 for more information on the grammar.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString + getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The expression to filter resources.
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations. The expression may also contain regular expressions.
+     * See https://google.aip.dev/160 for more information on the grammar.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The expression to filter resources.
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations. The expression may also contain regular expressions.
+     * See https://google.aip.dev/160 for more information on the grammar.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * Optional. The expression to filter resources.
+     * The expression is a list of zero or more restrictions combined via logical
+     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+     * expression, parentheses must be appropriately used to group the
+     * combinations. The expression may also contain regular expressions.
+     * See https://google.aip.dev/160 for more information on the grammar.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of saved queries to return per page. The
+     * service may return fewer than this value. If unspecified, at most 50 will
+     * be returned.
+     *  The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of saved queries to return per page. The
+     * service may return fewer than this value. If unspecified, at most 50 will
+     * be returned.
+     *  The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of saved queries to return per page. The
+     * service may return fewer than this value. If unspecified, at most 50 will
+     * be returned.
+     *  The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token, received from a previous `ListSavedQueries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListSavedQueries` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous `ListSavedQueries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListSavedQueries` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token, received from a previous `ListSavedQueries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListSavedQueries` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous `ListSavedQueries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListSavedQueries` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token, received from a previous `ListSavedQueries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListSavedQueries` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListSavedQueriesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListSavedQueriesRequest) + private static final com.google.cloud.asset.v1.ListSavedQueriesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListSavedQueriesRequest(); + } + + public static com.google.cloud.asset.v1.ListSavedQueriesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSavedQueriesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSavedQueriesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java new file mode 100644 index 000000000000..bba5bebe3b9e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListSavedQueriesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListSavedQueriesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent project/folder/organization whose savedQueries are to
+   * be listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent project/folder/organization whose savedQueries are to
+   * be listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. The expression to filter resources.
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations. The expression may also contain regular expressions.
+   * See https://google.aip.dev/160 for more information on the grammar.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The filter. + */ + java.lang.String getFilter(); + /** + *
+   * Optional. The expression to filter resources.
+   * The expression is a list of zero or more restrictions combined via logical
+   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
+   * expression, parentheses must be appropriately used to group the
+   * combinations. The expression may also contain regular expressions.
+   * See https://google.aip.dev/160 for more information on the grammar.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for filter. + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Optional. The maximum number of saved queries to return per page. The
+   * service may return fewer than this value. If unspecified, at most 50 will
+   * be returned.
+   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token, received from a previous `ListSavedQueries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListSavedQueries` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token, received from a previous `ListSavedQueries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListSavedQueries` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java new file mode 100644 index 000000000000..8b33a72bc3ba --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java @@ -0,0 +1,1045 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Response of listing saved queries.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesResponse} + */ +public final class ListSavedQueriesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListSavedQueriesResponse) + ListSavedQueriesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSavedQueriesResponse.newBuilder() to construct. + private ListSavedQueriesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSavedQueriesResponse() { + savedQueries_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSavedQueriesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListSavedQueriesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + savedQueries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + savedQueries_.add( + input.readMessage(com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + savedQueries_ = java.util.Collections.unmodifiableList(savedQueries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListSavedQueriesResponse.class, com.google.cloud.asset.v1.ListSavedQueriesResponse.Builder.class); + } + + public static final int SAVED_QUERIES_FIELD_NUMBER = 1; + private java.util.List savedQueries_; + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + @java.lang.Override + public java.util.List getSavedQueriesList() { + return savedQueries_; + } + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + @java.lang.Override + public java.util.List + getSavedQueriesOrBuilderList() { + return savedQueries_; + } + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + @java.lang.Override + public int getSavedQueriesCount() { + return savedQueries_.size(); + } + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery getSavedQueries(int index) { + return savedQueries_.get(index); + } + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueriesOrBuilder( + int index) { + return savedQueries_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < savedQueries_.size(); i++) { + output.writeMessage(1, savedQueries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < savedQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, savedQueries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListSavedQueriesResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListSavedQueriesResponse other = (com.google.cloud.asset.v1.ListSavedQueriesResponse) obj; + + if (!getSavedQueriesList() + .equals(other.getSavedQueriesList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSavedQueriesCount() > 0) { + hash = (37 * hash) + SAVED_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getSavedQueriesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ListSavedQueriesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Response of listing saved queries.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListSavedQueriesResponse) + com.google.cloud.asset.v1.ListSavedQueriesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListSavedQueriesResponse.class, com.google.cloud.asset.v1.ListSavedQueriesResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListSavedQueriesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSavedQueriesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (savedQueriesBuilder_ == null) { + savedQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + savedQueriesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListSavedQueriesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesResponse build() { + com.google.cloud.asset.v1.ListSavedQueriesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesResponse buildPartial() { + com.google.cloud.asset.v1.ListSavedQueriesResponse result = new com.google.cloud.asset.v1.ListSavedQueriesResponse(this); + int from_bitField0_ = bitField0_; + if (savedQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + savedQueries_ = java.util.Collections.unmodifiableList(savedQueries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.savedQueries_ = savedQueries_; + } else { + result.savedQueries_ = savedQueriesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ListSavedQueriesResponse) { + return mergeFrom((com.google.cloud.asset.v1.ListSavedQueriesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListSavedQueriesResponse other) { + if (other == com.google.cloud.asset.v1.ListSavedQueriesResponse.getDefaultInstance()) return this; + if (savedQueriesBuilder_ == null) { + if (!other.savedQueries_.isEmpty()) { + if (savedQueries_.isEmpty()) { + savedQueries_ = other.savedQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSavedQueriesIsMutable(); + savedQueries_.addAll(other.savedQueries_); + } + onChanged(); + } + } else { + if (!other.savedQueries_.isEmpty()) { + if (savedQueriesBuilder_.isEmpty()) { + savedQueriesBuilder_.dispose(); + savedQueriesBuilder_ = null; + savedQueries_ = other.savedQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + savedQueriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSavedQueriesFieldBuilder() : null; + } else { + savedQueriesBuilder_.addAllMessages(other.savedQueries_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListSavedQueriesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListSavedQueriesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List savedQueries_ = + java.util.Collections.emptyList(); + private void ensureSavedQueriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + savedQueries_ = new java.util.ArrayList(savedQueries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> savedQueriesBuilder_; + + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public java.util.List getSavedQueriesList() { + if (savedQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(savedQueries_); + } else { + return savedQueriesBuilder_.getMessageList(); + } + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public int getSavedQueriesCount() { + if (savedQueriesBuilder_ == null) { + return savedQueries_.size(); + } else { + return savedQueriesBuilder_.getCount(); + } + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public com.google.cloud.asset.v1.SavedQuery getSavedQueries(int index) { + if (savedQueriesBuilder_ == null) { + return savedQueries_.get(index); + } else { + return savedQueriesBuilder_.getMessage(index); + } + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder setSavedQueries( + int index, com.google.cloud.asset.v1.SavedQuery value) { + if (savedQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSavedQueriesIsMutable(); + savedQueries_.set(index, value); + onChanged(); + } else { + savedQueriesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder setSavedQueries( + int index, com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { + if (savedQueriesBuilder_ == null) { + ensureSavedQueriesIsMutable(); + savedQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + savedQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder addSavedQueries(com.google.cloud.asset.v1.SavedQuery value) { + if (savedQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSavedQueriesIsMutable(); + savedQueries_.add(value); + onChanged(); + } else { + savedQueriesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder addSavedQueries( + int index, com.google.cloud.asset.v1.SavedQuery value) { + if (savedQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSavedQueriesIsMutable(); + savedQueries_.add(index, value); + onChanged(); + } else { + savedQueriesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder addSavedQueries( + com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { + if (savedQueriesBuilder_ == null) { + ensureSavedQueriesIsMutable(); + savedQueries_.add(builderForValue.build()); + onChanged(); + } else { + savedQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder addSavedQueries( + int index, com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { + if (savedQueriesBuilder_ == null) { + ensureSavedQueriesIsMutable(); + savedQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + savedQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder addAllSavedQueries( + java.lang.Iterable values) { + if (savedQueriesBuilder_ == null) { + ensureSavedQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, savedQueries_); + onChanged(); + } else { + savedQueriesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder clearSavedQueries() { + if (savedQueriesBuilder_ == null) { + savedQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + savedQueriesBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public Builder removeSavedQueries(int index) { + if (savedQueriesBuilder_ == null) { + ensureSavedQueriesIsMutable(); + savedQueries_.remove(index); + onChanged(); + } else { + savedQueriesBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public com.google.cloud.asset.v1.SavedQuery.Builder getSavedQueriesBuilder( + int index) { + return getSavedQueriesFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueriesOrBuilder( + int index) { + if (savedQueriesBuilder_ == null) { + return savedQueries_.get(index); } else { + return savedQueriesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public java.util.List + getSavedQueriesOrBuilderList() { + if (savedQueriesBuilder_ != null) { + return savedQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(savedQueries_); + } + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public com.google.cloud.asset.v1.SavedQuery.Builder addSavedQueriesBuilder() { + return getSavedQueriesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.SavedQuery.getDefaultInstance()); + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public com.google.cloud.asset.v1.SavedQuery.Builder addSavedQueriesBuilder( + int index) { + return getSavedQueriesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.SavedQuery.getDefaultInstance()); + } + /** + *
+     * A list of savedQueries.
+     * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + public java.util.List + getSavedQueriesBuilderList() { + return getSavedQueriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> + getSavedQueriesFieldBuilder() { + if (savedQueriesBuilder_ == null) { + savedQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder>( + savedQueries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + savedQueries_ = null; + } + return savedQueriesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListSavedQueriesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListSavedQueriesResponse) + private static final com.google.cloud.asset.v1.ListSavedQueriesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListSavedQueriesResponse(); + } + + public static com.google.cloud.asset.v1.ListSavedQueriesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSavedQueriesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSavedQueriesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListSavedQueriesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java new file mode 100644 index 000000000000..9c5fbc9067d6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java @@ -0,0 +1,75 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListSavedQueriesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListSavedQueriesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + java.util.List + getSavedQueriesList(); + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + com.google.cloud.asset.v1.SavedQuery getSavedQueries(int index); + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + int getSavedQueriesCount(); + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + java.util.List + getSavedQueriesOrBuilderList(); + /** + *
+   * A list of savedQueries.
+   * 
+ * + * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; + */ + com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueriesOrBuilder( + int index); + + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java new file mode 100644 index 000000000000..e561eb749501 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java @@ -0,0 +1,1197 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A message to group the analysis information.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.MoveAnalysis} + */ +public final class MoveAnalysis extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.MoveAnalysis) + MoveAnalysisOrBuilder { +private static final long serialVersionUID = 0L; + // Use MoveAnalysis.newBuilder() to construct. + private MoveAnalysis(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MoveAnalysis() { + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MoveAnalysis(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MoveAnalysis( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: { + com.google.cloud.asset.v1.MoveAnalysisResult.Builder subBuilder = null; + if (resultCase_ == 2) { + subBuilder = ((com.google.cloud.asset.v1.MoveAnalysisResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.cloud.asset.v1.MoveAnalysisResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.MoveAnalysisResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 2; + break; + } + case 26: { + com.google.rpc.Status.Builder subBuilder = null; + if (resultCase_ == 3) { + subBuilder = ((com.google.rpc.Status) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.rpc.Status) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.MoveAnalysis.class, com.google.cloud.asset.v1.MoveAnalysis.Builder.class); + } + + private int resultCase_ = 0; + private java.lang.Object result_; + public enum ResultCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ANALYSIS(2), + ERROR(3), + RESULT_NOT_SET(0); + private final int value; + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 2: return ANALYSIS; + case 3: return ERROR; + case 0: return RESULT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + *
+   * The user friendly display name of the analysis. E.g. IAM, Organization
+   * Policy etc.
+   * 
+ * + * string display_name = 1; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The user friendly display name of the analysis. E.g. IAM, Organization
+   * Policy etc.
+   * 
+ * + * string display_name = 1; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_FIELD_NUMBER = 2; + /** + *
+   * Analysis result of moving the target resource.
+   * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + * @return Whether the analysis field is set. + */ + @java.lang.Override + public boolean hasAnalysis() { + return resultCase_ == 2; + } + /** + *
+   * Analysis result of moving the target resource.
+   * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + * @return The analysis. + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResult getAnalysis() { + if (resultCase_ == 2) { + return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; + } + return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); + } + /** + *
+   * Analysis result of moving the target resource.
+   * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder getAnalysisOrBuilder() { + if (resultCase_ == 2) { + return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; + } + return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); + } + + public static final int ERROR_FIELD_NUMBER = 3; + /** + *
+   * Description of error encountered when performing the analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + /** + *
+   * Description of error encountered when performing the analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + *
+   * Description of error encountered when performing the analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (resultCase_ == 2) { + output.writeMessage(2, (com.google.cloud.asset.v1.MoveAnalysisResult) result_); + } + if (resultCase_ == 3) { + output.writeMessage(3, (com.google.rpc.Status) result_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (resultCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.asset.v1.MoveAnalysisResult) result_); + } + if (resultCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.rpc.Status) result_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.MoveAnalysis)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.MoveAnalysis other = (com.google.cloud.asset.v1.MoveAnalysis) obj; + + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 2: + if (!getAnalysis() + .equals(other.getAnalysis())) return false; + break; + case 3: + if (!getError() + .equals(other.getError())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + switch (resultCase_) { + case 2: + hash = (37 * hash) + ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysis().hashCode(); + break; + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.MoveAnalysis prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A message to group the analysis information.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.MoveAnalysis} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.MoveAnalysis) + com.google.cloud.asset.v1.MoveAnalysisOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.MoveAnalysis.class, com.google.cloud.asset.v1.MoveAnalysis.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.MoveAnalysis.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysis getDefaultInstanceForType() { + return com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysis build() { + com.google.cloud.asset.v1.MoveAnalysis result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysis buildPartial() { + com.google.cloud.asset.v1.MoveAnalysis result = new com.google.cloud.asset.v1.MoveAnalysis(this); + result.displayName_ = displayName_; + if (resultCase_ == 2) { + if (analysisBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = analysisBuilder_.build(); + } + } + if (resultCase_ == 3) { + if (errorBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = errorBuilder_.build(); + } + } + result.resultCase_ = resultCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.MoveAnalysis) { + return mergeFrom((com.google.cloud.asset.v1.MoveAnalysis)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.MoveAnalysis other) { + if (other == com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + switch (other.getResultCase()) { + case ANALYSIS: { + mergeAnalysis(other.getAnalysis()); + break; + } + case ERROR: { + mergeError(other.getError()); + break; + } + case RESULT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.MoveAnalysis parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.MoveAnalysis) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int resultCase_ = 0; + private java.lang.Object result_; + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + + private java.lang.Object displayName_ = ""; + /** + *
+     * The user friendly display name of the analysis. E.g. IAM, Organization
+     * Policy etc.
+     * 
+ * + * string display_name = 1; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The user friendly display name of the analysis. E.g. IAM, Organization
+     * Policy etc.
+     * 
+ * + * string display_name = 1; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The user friendly display name of the analysis. E.g. IAM, Organization
+     * Policy etc.
+     * 
+ * + * string display_name = 1; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The user friendly display name of the analysis. E.g. IAM, Organization
+     * Policy etc.
+     * 
+ * + * string display_name = 1; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The user friendly display name of the analysis. E.g. IAM, Organization
+     * Policy etc.
+     * 
+ * + * string display_name = 1; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.MoveAnalysisResult, com.google.cloud.asset.v1.MoveAnalysisResult.Builder, com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder> analysisBuilder_; + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + * @return Whether the analysis field is set. + */ + @java.lang.Override + public boolean hasAnalysis() { + return resultCase_ == 2; + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + * @return The analysis. + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResult getAnalysis() { + if (analysisBuilder_ == null) { + if (resultCase_ == 2) { + return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; + } + return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); + } else { + if (resultCase_ == 2) { + return analysisBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); + } + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + public Builder setAnalysis(com.google.cloud.asset.v1.MoveAnalysisResult value) { + if (analysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + analysisBuilder_.setMessage(value); + } + resultCase_ = 2; + return this; + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + public Builder setAnalysis( + com.google.cloud.asset.v1.MoveAnalysisResult.Builder builderForValue) { + if (analysisBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + analysisBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 2; + return this; + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + public Builder mergeAnalysis(com.google.cloud.asset.v1.MoveAnalysisResult value) { + if (analysisBuilder_ == null) { + if (resultCase_ == 2 && + result_ != com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance()) { + result_ = com.google.cloud.asset.v1.MoveAnalysisResult.newBuilder((com.google.cloud.asset.v1.MoveAnalysisResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 2) { + analysisBuilder_.mergeFrom(value); + } else { + analysisBuilder_.setMessage(value); + } + } + resultCase_ = 2; + return this; + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + public Builder clearAnalysis() { + if (analysisBuilder_ == null) { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + } + analysisBuilder_.clear(); + } + return this; + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + public com.google.cloud.asset.v1.MoveAnalysisResult.Builder getAnalysisBuilder() { + return getAnalysisFieldBuilder().getBuilder(); + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder getAnalysisOrBuilder() { + if ((resultCase_ == 2) && (analysisBuilder_ != null)) { + return analysisBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 2) { + return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; + } + return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); + } + } + /** + *
+     * Analysis result of moving the target resource.
+     * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.MoveAnalysisResult, com.google.cloud.asset.v1.MoveAnalysisResult.Builder, com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder> + getAnalysisFieldBuilder() { + if (analysisBuilder_ == null) { + if (!(resultCase_ == 2)) { + result_ = com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); + } + analysisBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.MoveAnalysisResult, com.google.cloud.asset.v1.MoveAnalysisResult.Builder, com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder>( + (com.google.cloud.asset.v1.MoveAnalysisResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 2; + onChanged();; + return analysisBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (resultCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 3; + return this; + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 3; + return this; + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (resultCase_ == 3 && + result_ != com.google.rpc.Status.getDefaultInstance()) { + result_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + resultCase_ = 3; + return this; + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 3) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + *
+     * Description of error encountered when performing the analysis.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 3)) { + result_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 3; + onChanged();; + return errorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.MoveAnalysis) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.MoveAnalysis) + private static final com.google.cloud.asset.v1.MoveAnalysis DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.MoveAnalysis(); + } + + public static com.google.cloud.asset.v1.MoveAnalysis getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveAnalysis parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MoveAnalysis(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysis getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java new file mode 100644 index 000000000000..463a887902a6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java @@ -0,0 +1,87 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface MoveAnalysisOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.MoveAnalysis) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The user friendly display name of the analysis. E.g. IAM, Organization
+   * Policy etc.
+   * 
+ * + * string display_name = 1; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The user friendly display name of the analysis. E.g. IAM, Organization
+   * Policy etc.
+   * 
+ * + * string display_name = 1; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * Analysis result of moving the target resource.
+   * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + * @return Whether the analysis field is set. + */ + boolean hasAnalysis(); + /** + *
+   * Analysis result of moving the target resource.
+   * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + * @return The analysis. + */ + com.google.cloud.asset.v1.MoveAnalysisResult getAnalysis(); + /** + *
+   * Analysis result of moving the target resource.
+   * 
+ * + * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; + */ + com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder getAnalysisOrBuilder(); + + /** + *
+   * Description of error encountered when performing the analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * Description of error encountered when performing the analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * Description of error encountered when performing the analysis.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + public com.google.cloud.asset.v1.MoveAnalysis.ResultCase getResultCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java new file mode 100644 index 000000000000..1a7deec03d6b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java @@ -0,0 +1,1381 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * An analysis result including blockers and warnings.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.MoveAnalysisResult} + */ +public final class MoveAnalysisResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.MoveAnalysisResult) + MoveAnalysisResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use MoveAnalysisResult.newBuilder() to construct. + private MoveAnalysisResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MoveAnalysisResult() { + blockers_ = java.util.Collections.emptyList(); + warnings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MoveAnalysisResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MoveAnalysisResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + blockers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + blockers_.add( + input.readMessage(com.google.cloud.asset.v1.MoveImpact.parser(), extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + warnings_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + warnings_.add( + input.readMessage(com.google.cloud.asset.v1.MoveImpact.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + blockers_ = java.util.Collections.unmodifiableList(blockers_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + warnings_ = java.util.Collections.unmodifiableList(warnings_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.MoveAnalysisResult.class, com.google.cloud.asset.v1.MoveAnalysisResult.Builder.class); + } + + public static final int BLOCKERS_FIELD_NUMBER = 1; + private java.util.List blockers_; + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + @java.lang.Override + public java.util.List getBlockersList() { + return blockers_; + } + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + @java.lang.Override + public java.util.List + getBlockersOrBuilderList() { + return blockers_; + } + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + @java.lang.Override + public int getBlockersCount() { + return blockers_.size(); + } + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpact getBlockers(int index) { + return blockers_.get(index); + } + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpactOrBuilder getBlockersOrBuilder( + int index) { + return blockers_.get(index); + } + + public static final int WARNINGS_FIELD_NUMBER = 2; + private java.util.List warnings_; + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + @java.lang.Override + public java.util.List getWarningsList() { + return warnings_; + } + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + @java.lang.Override + public java.util.List + getWarningsOrBuilderList() { + return warnings_; + } + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + @java.lang.Override + public int getWarningsCount() { + return warnings_.size(); + } + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpact getWarnings(int index) { + return warnings_.get(index); + } + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpactOrBuilder getWarningsOrBuilder( + int index) { + return warnings_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < blockers_.size(); i++) { + output.writeMessage(1, blockers_.get(i)); + } + for (int i = 0; i < warnings_.size(); i++) { + output.writeMessage(2, warnings_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < blockers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, blockers_.get(i)); + } + for (int i = 0; i < warnings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, warnings_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.MoveAnalysisResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.MoveAnalysisResult other = (com.google.cloud.asset.v1.MoveAnalysisResult) obj; + + if (!getBlockersList() + .equals(other.getBlockersList())) return false; + if (!getWarningsList() + .equals(other.getWarningsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBlockersCount() > 0) { + hash = (37 * hash) + BLOCKERS_FIELD_NUMBER; + hash = (53 * hash) + getBlockersList().hashCode(); + } + if (getWarningsCount() > 0) { + hash = (37 * hash) + WARNINGS_FIELD_NUMBER; + hash = (53 * hash) + getWarningsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.MoveAnalysisResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An analysis result including blockers and warnings.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.MoveAnalysisResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.MoveAnalysisResult) + com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.MoveAnalysisResult.class, com.google.cloud.asset.v1.MoveAnalysisResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.MoveAnalysisResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBlockersFieldBuilder(); + getWarningsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (blockersBuilder_ == null) { + blockers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + blockersBuilder_.clear(); + } + if (warningsBuilder_ == null) { + warnings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + warningsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResult build() { + com.google.cloud.asset.v1.MoveAnalysisResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResult buildPartial() { + com.google.cloud.asset.v1.MoveAnalysisResult result = new com.google.cloud.asset.v1.MoveAnalysisResult(this); + int from_bitField0_ = bitField0_; + if (blockersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + blockers_ = java.util.Collections.unmodifiableList(blockers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.blockers_ = blockers_; + } else { + result.blockers_ = blockersBuilder_.build(); + } + if (warningsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + warnings_ = java.util.Collections.unmodifiableList(warnings_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.warnings_ = warnings_; + } else { + result.warnings_ = warningsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.MoveAnalysisResult) { + return mergeFrom((com.google.cloud.asset.v1.MoveAnalysisResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.MoveAnalysisResult other) { + if (other == com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance()) return this; + if (blockersBuilder_ == null) { + if (!other.blockers_.isEmpty()) { + if (blockers_.isEmpty()) { + blockers_ = other.blockers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBlockersIsMutable(); + blockers_.addAll(other.blockers_); + } + onChanged(); + } + } else { + if (!other.blockers_.isEmpty()) { + if (blockersBuilder_.isEmpty()) { + blockersBuilder_.dispose(); + blockersBuilder_ = null; + blockers_ = other.blockers_; + bitField0_ = (bitField0_ & ~0x00000001); + blockersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlockersFieldBuilder() : null; + } else { + blockersBuilder_.addAllMessages(other.blockers_); + } + } + } + if (warningsBuilder_ == null) { + if (!other.warnings_.isEmpty()) { + if (warnings_.isEmpty()) { + warnings_ = other.warnings_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureWarningsIsMutable(); + warnings_.addAll(other.warnings_); + } + onChanged(); + } + } else { + if (!other.warnings_.isEmpty()) { + if (warningsBuilder_.isEmpty()) { + warningsBuilder_.dispose(); + warningsBuilder_ = null; + warnings_ = other.warnings_; + bitField0_ = (bitField0_ & ~0x00000002); + warningsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWarningsFieldBuilder() : null; + } else { + warningsBuilder_.addAllMessages(other.warnings_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.MoveAnalysisResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.MoveAnalysisResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List blockers_ = + java.util.Collections.emptyList(); + private void ensureBlockersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + blockers_ = new java.util.ArrayList(blockers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> blockersBuilder_; + + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public java.util.List getBlockersList() { + if (blockersBuilder_ == null) { + return java.util.Collections.unmodifiableList(blockers_); + } else { + return blockersBuilder_.getMessageList(); + } + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public int getBlockersCount() { + if (blockersBuilder_ == null) { + return blockers_.size(); + } else { + return blockersBuilder_.getCount(); + } + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public com.google.cloud.asset.v1.MoveImpact getBlockers(int index) { + if (blockersBuilder_ == null) { + return blockers_.get(index); + } else { + return blockersBuilder_.getMessage(index); + } + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder setBlockers( + int index, com.google.cloud.asset.v1.MoveImpact value) { + if (blockersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlockersIsMutable(); + blockers_.set(index, value); + onChanged(); + } else { + blockersBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder setBlockers( + int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { + if (blockersBuilder_ == null) { + ensureBlockersIsMutable(); + blockers_.set(index, builderForValue.build()); + onChanged(); + } else { + blockersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder addBlockers(com.google.cloud.asset.v1.MoveImpact value) { + if (blockersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlockersIsMutable(); + blockers_.add(value); + onChanged(); + } else { + blockersBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder addBlockers( + int index, com.google.cloud.asset.v1.MoveImpact value) { + if (blockersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlockersIsMutable(); + blockers_.add(index, value); + onChanged(); + } else { + blockersBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder addBlockers( + com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { + if (blockersBuilder_ == null) { + ensureBlockersIsMutable(); + blockers_.add(builderForValue.build()); + onChanged(); + } else { + blockersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder addBlockers( + int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { + if (blockersBuilder_ == null) { + ensureBlockersIsMutable(); + blockers_.add(index, builderForValue.build()); + onChanged(); + } else { + blockersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder addAllBlockers( + java.lang.Iterable values) { + if (blockersBuilder_ == null) { + ensureBlockersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blockers_); + onChanged(); + } else { + blockersBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder clearBlockers() { + if (blockersBuilder_ == null) { + blockers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + blockersBuilder_.clear(); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public Builder removeBlockers(int index) { + if (blockersBuilder_ == null) { + ensureBlockersIsMutable(); + blockers_.remove(index); + onChanged(); + } else { + blockersBuilder_.remove(index); + } + return this; + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public com.google.cloud.asset.v1.MoveImpact.Builder getBlockersBuilder( + int index) { + return getBlockersFieldBuilder().getBuilder(index); + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public com.google.cloud.asset.v1.MoveImpactOrBuilder getBlockersOrBuilder( + int index) { + if (blockersBuilder_ == null) { + return blockers_.get(index); } else { + return blockersBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public java.util.List + getBlockersOrBuilderList() { + if (blockersBuilder_ != null) { + return blockersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blockers_); + } + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public com.google.cloud.asset.v1.MoveImpact.Builder addBlockersBuilder() { + return getBlockersFieldBuilder().addBuilder( + com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public com.google.cloud.asset.v1.MoveImpact.Builder addBlockersBuilder( + int index) { + return getBlockersFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); + } + /** + *
+     * Blocking information that would prevent the target resource from moving
+     * to the specified destination at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + public java.util.List + getBlockersBuilderList() { + return getBlockersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> + getBlockersFieldBuilder() { + if (blockersBuilder_ == null) { + blockersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder>( + blockers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + blockers_ = null; + } + return blockersBuilder_; + } + + private java.util.List warnings_ = + java.util.Collections.emptyList(); + private void ensureWarningsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + warnings_ = new java.util.ArrayList(warnings_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> warningsBuilder_; + + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public java.util.List getWarningsList() { + if (warningsBuilder_ == null) { + return java.util.Collections.unmodifiableList(warnings_); + } else { + return warningsBuilder_.getMessageList(); + } + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public int getWarningsCount() { + if (warningsBuilder_ == null) { + return warnings_.size(); + } else { + return warningsBuilder_.getCount(); + } + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public com.google.cloud.asset.v1.MoveImpact getWarnings(int index) { + if (warningsBuilder_ == null) { + return warnings_.get(index); + } else { + return warningsBuilder_.getMessage(index); + } + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder setWarnings( + int index, com.google.cloud.asset.v1.MoveImpact value) { + if (warningsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.set(index, value); + onChanged(); + } else { + warningsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder setWarnings( + int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.set(index, builderForValue.build()); + onChanged(); + } else { + warningsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder addWarnings(com.google.cloud.asset.v1.MoveImpact value) { + if (warningsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.add(value); + onChanged(); + } else { + warningsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder addWarnings( + int index, com.google.cloud.asset.v1.MoveImpact value) { + if (warningsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.add(index, value); + onChanged(); + } else { + warningsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder addWarnings( + com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(builderForValue.build()); + onChanged(); + } else { + warningsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder addWarnings( + int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(index, builderForValue.build()); + onChanged(); + } else { + warningsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder addAllWarnings( + java.lang.Iterable values) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, warnings_); + onChanged(); + } else { + warningsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder clearWarnings() { + if (warningsBuilder_ == null) { + warnings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + warningsBuilder_.clear(); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public Builder removeWarnings(int index) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.remove(index); + onChanged(); + } else { + warningsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public com.google.cloud.asset.v1.MoveImpact.Builder getWarningsBuilder( + int index) { + return getWarningsFieldBuilder().getBuilder(index); + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public com.google.cloud.asset.v1.MoveImpactOrBuilder getWarningsOrBuilder( + int index) { + if (warningsBuilder_ == null) { + return warnings_.get(index); } else { + return warningsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public java.util.List + getWarningsOrBuilderList() { + if (warningsBuilder_ != null) { + return warningsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(warnings_); + } + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public com.google.cloud.asset.v1.MoveImpact.Builder addWarningsBuilder() { + return getWarningsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public com.google.cloud.asset.v1.MoveImpact.Builder addWarningsBuilder( + int index) { + return getWarningsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); + } + /** + *
+     * Warning information indicating that moving the target resource to the
+     * specified destination might be unsafe. This can include important policy
+     * information and configuration changes, but will not block moves at runtime.
+     * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + public java.util.List + getWarningsBuilderList() { + return getWarningsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> + getWarningsFieldBuilder() { + if (warningsBuilder_ == null) { + warningsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder>( + warnings_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + warnings_ = null; + } + return warningsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.MoveAnalysisResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.MoveAnalysisResult) + private static final com.google.cloud.asset.v1.MoveAnalysisResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.MoveAnalysisResult(); + } + + public static com.google.cloud.asset.v1.MoveAnalysisResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveAnalysisResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MoveAnalysisResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveAnalysisResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java new file mode 100644 index 000000000000..2d63ef150fcd --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java @@ -0,0 +1,112 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface MoveAnalysisResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.MoveAnalysisResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + java.util.List + getBlockersList(); + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + com.google.cloud.asset.v1.MoveImpact getBlockers(int index); + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + int getBlockersCount(); + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + java.util.List + getBlockersOrBuilderList(); + /** + *
+   * Blocking information that would prevent the target resource from moving
+   * to the specified destination at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; + */ + com.google.cloud.asset.v1.MoveImpactOrBuilder getBlockersOrBuilder( + int index); + + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + java.util.List + getWarningsList(); + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + com.google.cloud.asset.v1.MoveImpact getWarnings(int index); + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + int getWarningsCount(); + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + java.util.List + getWarningsOrBuilderList(); + /** + *
+   * Warning information indicating that moving the target resource to the
+   * specified destination might be unsafe. This can include important policy
+   * information and configuration changes, but will not block moves at runtime.
+   * 
+ * + * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; + */ + com.google.cloud.asset.v1.MoveImpactOrBuilder getWarningsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java new file mode 100644 index 000000000000..1c20174c3262 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A message to group impacts of moving the target resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.MoveImpact} + */ +public final class MoveImpact extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.MoveImpact) + MoveImpactOrBuilder { +private static final long serialVersionUID = 0L; + // Use MoveImpact.newBuilder() to construct. + private MoveImpact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MoveImpact() { + detail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MoveImpact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MoveImpact( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + detail_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.MoveImpact.class, com.google.cloud.asset.v1.MoveImpact.Builder.class); + } + + public static final int DETAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object detail_; + /** + *
+   * User friendly impact detail in a free form message.
+   * 
+ * + * string detail = 1; + * @return The detail. + */ + @java.lang.Override + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } + } + /** + *
+   * User friendly impact detail in a free form message.
+   * 
+ * + * string detail = 1; + * @return The bytes for detail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, detail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, detail_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.MoveImpact)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.MoveImpact other = (com.google.cloud.asset.v1.MoveImpact) obj; + + if (!getDetail() + .equals(other.getDetail())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDetail().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveImpact parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveImpact parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.MoveImpact parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.MoveImpact prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A message to group impacts of moving the target resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.MoveImpact} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.MoveImpact) + com.google.cloud.asset.v1.MoveImpactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.MoveImpact.class, com.google.cloud.asset.v1.MoveImpact.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.MoveImpact.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + detail_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpact getDefaultInstanceForType() { + return com.google.cloud.asset.v1.MoveImpact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpact build() { + com.google.cloud.asset.v1.MoveImpact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpact buildPartial() { + com.google.cloud.asset.v1.MoveImpact result = new com.google.cloud.asset.v1.MoveImpact(this); + result.detail_ = detail_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.MoveImpact) { + return mergeFrom((com.google.cloud.asset.v1.MoveImpact)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.MoveImpact other) { + if (other == com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()) return this; + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.MoveImpact parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.MoveImpact) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object detail_ = ""; + /** + *
+     * User friendly impact detail in a free form message.
+     * 
+ * + * string detail = 1; + * @return The detail. + */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * User friendly impact detail in a free form message.
+     * 
+ * + * string detail = 1; + * @return The bytes for detail. + */ + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * User friendly impact detail in a free form message.
+     * 
+ * + * string detail = 1; + * @param value The detail to set. + * @return This builder for chaining. + */ + public Builder setDetail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + detail_ = value; + onChanged(); + return this; + } + /** + *
+     * User friendly impact detail in a free form message.
+     * 
+ * + * string detail = 1; + * @return This builder for chaining. + */ + public Builder clearDetail() { + + detail_ = getDefaultInstance().getDetail(); + onChanged(); + return this; + } + /** + *
+     * User friendly impact detail in a free form message.
+     * 
+ * + * string detail = 1; + * @param value The bytes for detail to set. + * @return This builder for chaining. + */ + public Builder setDetailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + detail_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.MoveImpact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.MoveImpact) + private static final com.google.cloud.asset.v1.MoveImpact DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.MoveImpact(); + } + + public static com.google.cloud.asset.v1.MoveImpact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MoveImpact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MoveImpact(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.MoveImpact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java new file mode 100644 index 000000000000..d6416c9411ab --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface MoveImpactOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.MoveImpact) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * User friendly impact detail in a free form message.
+   * 
+ * + * string detail = 1; + * @return The detail. + */ + java.lang.String getDetail(); + /** + *
+   * User friendly impact detail in a free form message.
+   * 
+ * + * string detail = 1; + * @return The bytes for detail. + */ + com.google.protobuf.ByteString + getDetailBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java new file mode 100644 index 000000000000..cf6b7ed90be6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OrganizationName implements ResourceName { + private static final PathTemplate ORGANIZATION = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}"); + private volatile Map fieldValuesMap; + private final String organization; + + @Deprecated + protected OrganizationName() { + organization = null; + } + + private OrganizationName(Builder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + } + + public String getOrganization() { + return organization; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OrganizationName of(String organization) { + return newBuilder().setOrganization(organization).build(); + } + + public static String format(String organization) { + return newBuilder().setOrganization(organization).build().toString(); + } + + public static OrganizationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ORGANIZATION.validatedMatch( + formattedString, "OrganizationName.parse: formattedString not in valid format"); + return of(matchMap.get("organization")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OrganizationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ORGANIZATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ORGANIZATION.instantiate("organization", organization); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OrganizationName that = ((OrganizationName) o); + return Objects.equals(this.organization, that.organization); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(organization); + return h; + } + + /** Builder for organizations/{organization}. */ + public static class Builder { + private String organization; + + protected Builder() {} + + public String getOrganization() { + return organization; + } + + public Builder setOrganization(String organization) { + this.organization = organization; + return this; + } + + private Builder(OrganizationName organizationName) { + this.organization = organizationName.organization; + } + + public OrganizationName build() { + return new OrganizationName(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java new file mode 100644 index 000000000000..2195ba20a96b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java @@ -0,0 +1,1036 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Output configuration for export assets destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.OutputConfig} + */ +public final class OutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.OutputConfig) + OutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + case 18: { + com.google.cloud.asset.v1.BigQueryDestination.Builder subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = ((com.google.cloud.asset.v1.BigQueryDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1.BigQueryDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.BigQueryDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.OutputConfig.class, com.google.cloud.asset.v1.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + BIGQUERY_DESTINATION(2), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: return GCS_DESTINATION; + case 2: return BIGQUERY_DESTINATION; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); + } + + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * Protobuf as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * Protobuf as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * Protobuf as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + output.writeMessage(2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.OutputConfig other = (com.google.cloud.asset.v1.OutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + break; + case 2: + if (!getBigqueryDestination() + .equals(other.getBigqueryDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 2: + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output configuration for export assets destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.OutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.OutputConfig) + com.google.cloud.asset.v1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.OutputConfig.class, com.google.cloud.asset.v1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfig build() { + com.google.cloud.asset.v1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfig buildPartial() { + com.google.cloud.asset.v1.OutputConfig result = new com.google.cloud.asset.v1.OutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + if (destinationCase_ == 2) { + if (bigqueryDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = bigqueryDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.OutputConfig) { + return mergeFrom((com.google.cloud.asset.v1.OutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.OutputConfig other) { + if (other == com.google.cloud.asset.v1.OutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case BIGQUERY_DESTINATION: { + mergeBigqueryDestination(other.getBigqueryDestination()); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.GcsDestination, com.google.cloud.asset.v1.GcsDestination.Builder, com.google.cloud.asset.v1.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.asset.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.asset.v1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 && + destination_ != com.google.cloud.asset.v1.GcsDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1.GcsDestination.newBuilder((com.google.cloud.asset.v1.GcsDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } else { + gcsDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.asset.v1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.GcsDestination, com.google.cloud.asset.v1.GcsDestination.Builder, com.google.cloud.asset.v1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.GcsDestination, com.google.cloud.asset.v1.GcsDestination.Builder, com.google.cloud.asset.v1.GcsDestinationOrBuilder>( + (com.google.cloud.asset.v1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged();; + return gcsDestinationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.BigQueryDestination, com.google.cloud.asset.v1.BigQueryDestination.Builder, com.google.cloud.asset.v1.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return bigqueryDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination(com.google.cloud.asset.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination( + com.google.cloud.asset.v1.BigQueryDestination.Builder builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder mergeBigqueryDestination(com.google.cloud.asset.v1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2 && + destination_ != com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1.BigQueryDestination.newBuilder((com.google.cloud.asset.v1.BigQueryDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + bigqueryDestinationBuilder_.mergeFrom(value); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + bigqueryDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1.BigQueryDestination.Builder getBigqueryDestinationBuilder() { + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * Protobuf as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.BigQueryDestination, com.google.cloud.asset.v1.BigQueryDestination.Builder, com.google.cloud.asset.v1.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); + } + bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.BigQueryDestination, com.google.cloud.asset.v1.BigQueryDestination.Builder, com.google.cloud.asset.v1.BigQueryDestinationOrBuilder>( + (com.google.cloud.asset.v1.BigQueryDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged();; + return bigqueryDestinationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.OutputConfig) + private static final com.google.cloud.asset.v1.OutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.OutputConfig(); + } + + public static com.google.cloud.asset.v1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..de717d5a0d5d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface OutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.asset.v1.GcsDestination getGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * Protobuf as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + boolean hasBigqueryDestination(); + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * Protobuf as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination(); + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * Protobuf as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; + */ + com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); + + public com.google.cloud.asset.v1.OutputConfig.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java new file mode 100644 index 000000000000..ac7dadbb358c --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Output result of export assets.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.OutputResult} + */ +public final class OutputResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.OutputResult) + OutputResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputResult.newBuilder() to construct. + private OutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputResult() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.GcsOutputResult.Builder subBuilder = null; + if (resultCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1.GcsOutputResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.cloud.asset.v1.GcsOutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.GcsOutputResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.OutputResult.class, com.google.cloud.asset.v1.OutputResult.Builder.class); + } + + private int resultCase_ = 0; + private java.lang.Object result_; + public enum ResultCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_RESULT(1), + RESULT_NOT_SET(0); + private final int value; + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: return GCS_RESULT; + case 0: return RESULT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public static final int GCS_RESULT_FIELD_NUMBER = 1; + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + * @return Whether the gcsResult field is set. + */ + @java.lang.Override + public boolean hasGcsResult() { + return resultCase_ == 1; + } + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + * @return The gcsResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResult getGcsResult() { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); + } + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (resultCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1.GcsOutputResult) result_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1.GcsOutputResult) result_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.OutputResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.OutputResult other = (com.google.cloud.asset.v1.OutputResult) obj; + + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 1: + if (!getGcsResult() + .equals(other.getGcsResult())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (resultCase_) { + case 1: + hash = (37 * hash) + GCS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getGcsResult().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.OutputResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.OutputResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.OutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output result of export assets.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.OutputResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.OutputResult) + com.google.cloud.asset.v1.OutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.OutputResult.class, com.google.cloud.asset.v1.OutputResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.OutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.OutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputResult build() { + com.google.cloud.asset.v1.OutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputResult buildPartial() { + com.google.cloud.asset.v1.OutputResult result = new com.google.cloud.asset.v1.OutputResult(this); + if (resultCase_ == 1) { + if (gcsResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = gcsResultBuilder_.build(); + } + } + result.resultCase_ = resultCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.OutputResult) { + return mergeFrom((com.google.cloud.asset.v1.OutputResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.OutputResult other) { + if (other == com.google.cloud.asset.v1.OutputResult.getDefaultInstance()) return this; + switch (other.getResultCase()) { + case GCS_RESULT: { + mergeGcsResult(other.getGcsResult()); + break; + } + case RESULT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.OutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.OutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int resultCase_ = 0; + private java.lang.Object result_; + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.GcsOutputResult, com.google.cloud.asset.v1.GcsOutputResult.Builder, com.google.cloud.asset.v1.GcsOutputResultOrBuilder> gcsResultBuilder_; + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + * @return Whether the gcsResult field is set. + */ + @java.lang.Override + public boolean hasGcsResult() { + return resultCase_ == 1; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + * @return The gcsResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResult getGcsResult() { + if (gcsResultBuilder_ == null) { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); + } else { + if (resultCase_ == 1) { + return gcsResultBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); + } + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + public Builder setGcsResult(com.google.cloud.asset.v1.GcsOutputResult value) { + if (gcsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + gcsResultBuilder_.setMessage(value); + } + resultCase_ = 1; + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + public Builder setGcsResult( + com.google.cloud.asset.v1.GcsOutputResult.Builder builderForValue) { + if (gcsResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + gcsResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 1; + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + public Builder mergeGcsResult(com.google.cloud.asset.v1.GcsOutputResult value) { + if (gcsResultBuilder_ == null) { + if (resultCase_ == 1 && + result_ != com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance()) { + result_ = com.google.cloud.asset.v1.GcsOutputResult.newBuilder((com.google.cloud.asset.v1.GcsOutputResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 1) { + gcsResultBuilder_.mergeFrom(value); + } else { + gcsResultBuilder_.setMessage(value); + } + } + resultCase_ = 1; + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + public Builder clearGcsResult() { + if (gcsResultBuilder_ == null) { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + } + gcsResultBuilder_.clear(); + } + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + public com.google.cloud.asset.v1.GcsOutputResult.Builder getGcsResultBuilder() { + return getGcsResultFieldBuilder().getBuilder(); + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { + if ((resultCase_ == 1) && (gcsResultBuilder_ != null)) { + return gcsResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); + } + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.GcsOutputResult, com.google.cloud.asset.v1.GcsOutputResult.Builder, com.google.cloud.asset.v1.GcsOutputResultOrBuilder> + getGcsResultFieldBuilder() { + if (gcsResultBuilder_ == null) { + if (!(resultCase_ == 1)) { + result_ = com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); + } + gcsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.GcsOutputResult, com.google.cloud.asset.v1.GcsOutputResult.Builder, com.google.cloud.asset.v1.GcsOutputResultOrBuilder>( + (com.google.cloud.asset.v1.GcsOutputResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 1; + onChanged();; + return gcsResultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.OutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.OutputResult) + private static final com.google.cloud.asset.v1.OutputResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.OutputResult(); + } + + public static com.google.cloud.asset.v1.OutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.OutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java new file mode 100644 index 000000000000..68dc7c1ed1ae --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface OutputResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.OutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + * @return Whether the gcsResult field is set. + */ + boolean hasGcsResult(); + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + * @return The gcsResult. + */ + com.google.cloud.asset.v1.GcsOutputResult getGcsResult(); + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; + */ + com.google.cloud.asset.v1.GcsOutputResultOrBuilder getGcsResultOrBuilder(); + + public com.google.cloud.asset.v1.OutputResult.ResultCase getResultCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java new file mode 100644 index 000000000000..652087c7fe22 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java @@ -0,0 +1,716 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Specifications of BigQuery partitioned table as export destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.PartitionSpec} + */ +public final class PartitionSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.PartitionSpec) + PartitionSpecOrBuilder { +private static final long serialVersionUID = 0L; + // Use PartitionSpec.newBuilder() to construct. + private PartitionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PartitionSpec() { + partitionKey_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PartitionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PartitionSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + partitionKey_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.PartitionSpec.class, com.google.cloud.asset.v1.PartitionSpec.Builder.class); + } + + /** + *
+   * This enum is used to determine the partition key column when exporting
+   * assets to BigQuery partitioned table(s). Note that, if the partition key is
+   * a timestamp column, the actual partition is based on its date value
+   * (expressed in UTC. see details in
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables).
+   * 
+ * + * Protobuf enum {@code google.cloud.asset.v1.PartitionSpec.PartitionKey} + */ + public enum PartitionKey + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified partition key. If used, it means using non-partitioned table.
+     * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + PARTITION_KEY_UNSPECIFIED(0), + /** + *
+     * The time when the snapshot is taken. If specified as partition key, the
+     * result table(s) is partitoned by the additional timestamp column,
+     * readTime. If [read_time] in ExportAssetsRequest is specified, the
+     * readTime column's value will be the same as it. Otherwise, its value will
+     * be the current time that is used to take the snapshot.
+     * 
+ * + * READ_TIME = 1; + */ + READ_TIME(1), + /** + *
+     * The time when the request is received and started to be processed. If
+     * specified as partition key, the result table(s) is partitoned by the
+     * requestTime column, an additional timestamp column representing when the
+     * request was received.
+     * 
+ * + * REQUEST_TIME = 2; + */ + REQUEST_TIME(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified partition key. If used, it means using non-partitioned table.
+     * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + public static final int PARTITION_KEY_UNSPECIFIED_VALUE = 0; + /** + *
+     * The time when the snapshot is taken. If specified as partition key, the
+     * result table(s) is partitoned by the additional timestamp column,
+     * readTime. If [read_time] in ExportAssetsRequest is specified, the
+     * readTime column's value will be the same as it. Otherwise, its value will
+     * be the current time that is used to take the snapshot.
+     * 
+ * + * READ_TIME = 1; + */ + public static final int READ_TIME_VALUE = 1; + /** + *
+     * The time when the request is received and started to be processed. If
+     * specified as partition key, the result table(s) is partitoned by the
+     * requestTime column, an additional timestamp column representing when the
+     * request was received.
+     * 
+ * + * REQUEST_TIME = 2; + */ + public static final int REQUEST_TIME_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PartitionKey valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PartitionKey forNumber(int value) { + switch (value) { + case 0: return PARTITION_KEY_UNSPECIFIED; + case 1: return READ_TIME; + case 2: return REQUEST_TIME; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PartitionKey> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PartitionKey findValueByNumber(int number) { + return PartitionKey.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1.PartitionSpec.getDescriptor().getEnumTypes().get(0); + } + + private static final PartitionKey[] VALUES = values(); + + public static PartitionKey valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PartitionKey(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.PartitionSpec.PartitionKey) + } + + public static final int PARTITION_KEY_FIELD_NUMBER = 1; + private int partitionKey_; + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override public int getPartitionKeyValue() { + return partitionKey_; + } + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @return The partitionKey. + */ + @java.lang.Override public com.google.cloud.asset.v1.PartitionSpec.PartitionKey getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1.PartitionSpec.PartitionKey.valueOf(partitionKey_); + return result == null ? com.google.cloud.asset.v1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (partitionKey_ != com.google.cloud.asset.v1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { + output.writeEnum(1, partitionKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partitionKey_ != com.google.cloud.asset.v1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, partitionKey_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.PartitionSpec)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.PartitionSpec other = (com.google.cloud.asset.v1.PartitionSpec) obj; + + if (partitionKey_ != other.partitionKey_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; + hash = (53 * hash) + partitionKey_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.PartitionSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.PartitionSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.PartitionSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.PartitionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifications of BigQuery partitioned table as export destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.PartitionSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.PartitionSpec) + com.google.cloud.asset.v1.PartitionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.PartitionSpec.class, com.google.cloud.asset.v1.PartitionSpec.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.PartitionSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + partitionKey_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.PartitionSpec getDefaultInstanceForType() { + return com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.PartitionSpec build() { + com.google.cloud.asset.v1.PartitionSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.PartitionSpec buildPartial() { + com.google.cloud.asset.v1.PartitionSpec result = new com.google.cloud.asset.v1.PartitionSpec(this); + result.partitionKey_ = partitionKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.PartitionSpec) { + return mergeFrom((com.google.cloud.asset.v1.PartitionSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.PartitionSpec other) { + if (other == com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance()) return this; + if (other.partitionKey_ != 0) { + setPartitionKeyValue(other.getPartitionKeyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.PartitionSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.PartitionSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int partitionKey_ = 0; + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override public int getPartitionKeyValue() { + return partitionKey_; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @param value The enum numeric value on the wire for partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKeyValue(int value) { + + partitionKey_ = value; + onChanged(); + return this; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @return The partitionKey. + */ + @java.lang.Override + public com.google.cloud.asset.v1.PartitionSpec.PartitionKey getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1.PartitionSpec.PartitionKey.valueOf(partitionKey_); + return result == null ? com.google.cloud.asset.v1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @param value The partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKey(com.google.cloud.asset.v1.PartitionSpec.PartitionKey value) { + if (value == null) { + throw new NullPointerException(); + } + + partitionKey_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @return This builder for chaining. + */ + public Builder clearPartitionKey() { + + partitionKey_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.PartitionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.PartitionSpec) + private static final com.google.cloud.asset.v1.PartitionSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.PartitionSpec(); + } + + public static com.google.cloud.asset.v1.PartitionSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartitionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PartitionSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.PartitionSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java new file mode 100644 index 000000000000..0dd5bf8780fd --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface PartitionSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.PartitionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @return The enum numeric value on the wire for partitionKey. + */ + int getPartitionKeyValue(); + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; + * @return The partitionKey. + */ + com.google.cloud.asset.v1.PartitionSpec.PartitionKey getPartitionKey(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java new file mode 100644 index 000000000000..032e6dc27a07 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected ProjectName() { + project = null; + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProjectName that = ((ProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(ProjectName projectName) { + this.project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java new file mode 100644 index 000000000000..840f3f696c42 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A Pub/Sub destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.PubsubDestination} + */ +public final class PubsubDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.PubsubDestination) + PubsubDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use PubsubDestination.newBuilder() to construct. + private PubsubDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PubsubDestination() { + topic_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PubsubDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PubsubDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + topic_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.PubsubDestination.class, com.google.cloud.asset.v1.PubsubDestination.Builder.class); + } + + public static final int TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object topic_; + /** + *
+   * The name of the Pub/Sub topic to publish to.
+   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The topic. + */ + @java.lang.Override + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + /** + *
+   * The name of the Pub/Sub topic to publish to.
+   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.PubsubDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.PubsubDestination other = (com.google.cloud.asset.v1.PubsubDestination) obj; + + if (!getTopic() + .equals(other.getTopic())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.PubsubDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.PubsubDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.PubsubDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.PubsubDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Pub/Sub destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.PubsubDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.PubsubDestination) + com.google.cloud.asset.v1.PubsubDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.PubsubDestination.class, com.google.cloud.asset.v1.PubsubDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.PubsubDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + topic_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestination build() { + com.google.cloud.asset.v1.PubsubDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestination buildPartial() { + com.google.cloud.asset.v1.PubsubDestination result = new com.google.cloud.asset.v1.PubsubDestination(this); + result.topic_ = topic_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.PubsubDestination) { + return mergeFrom((com.google.cloud.asset.v1.PubsubDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.PubsubDestination other) { + if (other == com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance()) return this; + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.PubsubDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.PubsubDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object topic_ = ""; + /** + *
+     * The name of the Pub/Sub topic to publish to.
+     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @return The topic. + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the Pub/Sub topic to publish to.
+     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the Pub/Sub topic to publish to.
+     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @param value The topic to set. + * @return This builder for chaining. + */ + public Builder setTopic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the Pub/Sub topic to publish to.
+     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @return This builder for chaining. + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + /** + *
+     * The name of the Pub/Sub topic to publish to.
+     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @param value The bytes for topic to set. + * @return This builder for chaining. + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.PubsubDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.PubsubDestination) + private static final com.google.cloud.asset.v1.PubsubDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.PubsubDestination(); + } + + public static com.google.cloud.asset.v1.PubsubDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PubsubDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PubsubDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.PubsubDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java new file mode 100644 index 000000000000..05bb241e5e96 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface PubsubDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.PubsubDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the Pub/Sub topic to publish to.
+   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The topic. + */ + java.lang.String getTopic(); + /** + *
+   * The name of the Pub/Sub topic to publish to.
+   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + com.google.protobuf.ByteString + getTopicBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java new file mode 100644 index 000000000000..6065b1264024 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java @@ -0,0 +1,1741 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Output configuration query assets.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig} + */ +public final class QueryAssetsOutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsOutputConfig) + QueryAssetsOutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryAssetsOutputConfig.newBuilder() to construct. + private QueryAssetsOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryAssetsOutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryAssetsOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryAssetsOutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder subBuilder = null; + if (bigqueryDestination_ != null) { + subBuilder = bigqueryDestination_.toBuilder(); + } + bigqueryDestination_ = input.readMessage(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(bigqueryDestination_); + bigqueryDestination_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsOutputConfig.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder.class); + } + + public interface BigQueryDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Required. The BigQuery dataset where the query results will be saved. It
+     * has the format of "projects/{projectId}/datasets/{datasetId}".
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + java.lang.String getDataset(); + /** + *
+     * Required. The BigQuery dataset where the query results will be saved. It
+     * has the format of "projects/{projectId}/datasets/{datasetId}".
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString + getDatasetBytes(); + + /** + *
+     * Required. The BigQuery table where the query results will be saved. If
+     * this table does not exist, a new table with the given name will be
+     * created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + java.lang.String getTable(); + /** + *
+     * Required. The BigQuery table where the query results will be saved. If
+     * this table does not exist, a new table with the given name will be
+     * created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + com.google.protobuf.ByteString + getTableBytes(); + + /** + *
+     * Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * 
+ * + * string write_disposition = 3; + * @return The writeDisposition. + */ + java.lang.String getWriteDisposition(); + /** + *
+     * Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * 
+ * + * string write_disposition = 3; + * @return The bytes for writeDisposition. + */ + com.google.protobuf.ByteString + getWriteDispositionBytes(); + } + /** + *
+   * BigQuery destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination} + */ + public static final class BigQueryDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) + BigQueryDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryDestination.newBuilder() to construct. + private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryDestination() { + dataset_ = ""; + table_ = ""; + writeDisposition_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + table_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + writeDisposition_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + *
+     * Required. The BigQuery dataset where the query results will be saved. It
+     * has the format of "projects/{projectId}/datasets/{datasetId}".
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + *
+     * Required. The BigQuery dataset where the query results will be saved. It
+     * has the format of "projects/{projectId}/datasets/{datasetId}".
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_FIELD_NUMBER = 2; + private volatile java.lang.Object table_; + /** + *
+     * Required. The BigQuery table where the query results will be saved. If
+     * this table does not exist, a new table with the given name will be
+     * created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } + } + /** + *
+     * Required. The BigQuery table where the query results will be saved. If
+     * this table does not exist, a new table with the given name will be
+     * created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WRITE_DISPOSITION_FIELD_NUMBER = 3; + private volatile java.lang.Object writeDisposition_; + /** + *
+     * Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * 
+ * + * string write_disposition = 3; + * @return The writeDisposition. + */ + @java.lang.Override + public java.lang.String getWriteDisposition() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + writeDisposition_ = s; + return s; + } + } + /** + *
+     * Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * 
+ * + * string write_disposition = 3; + * @return The bytes for writeDisposition. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWriteDispositionBytes() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + writeDisposition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, writeDisposition_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, writeDisposition_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination other = (com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) obj; + + if (!getDataset() + .equals(other.getDataset())) return false; + if (!getTable() + .equals(other.getTable())) return false; + if (!getWriteDisposition() + .equals(other.getWriteDisposition())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER; + hash = (53 * hash) + getWriteDisposition().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * BigQuery destination.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + table_ = ""; + + writeDisposition_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination build() { + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination buildPartial() { + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination result = new com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination(this); + result.dataset_ = dataset_; + result.table_ = table_; + result.writeDisposition_ = writeDisposition_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) { + return mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination other) { + if (other == com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getTable().isEmpty()) { + table_ = other.table_; + onChanged(); + } + if (!other.getWriteDisposition().isEmpty()) { + writeDisposition_ = other.writeDisposition_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + *
+       * Required. The BigQuery dataset where the query results will be saved. It
+       * has the format of "projects/{projectId}/datasets/{datasetId}".
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The BigQuery dataset where the query results will be saved. It
+       * has the format of "projects/{projectId}/datasets/{datasetId}".
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The BigQuery dataset where the query results will be saved. It
+       * has the format of "projects/{projectId}/datasets/{datasetId}".
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The BigQuery dataset where the query results will be saved. It
+       * has the format of "projects/{projectId}/datasets/{datasetId}".
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + *
+       * Required. The BigQuery dataset where the query results will be saved. It
+       * has the format of "projects/{projectId}/datasets/{datasetId}".
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object table_ = ""; + /** + *
+       * Required. The BigQuery table where the query results will be saved. If
+       * this table does not exist, a new table with the given name will be
+       * created.
+       * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Required. The BigQuery table where the query results will be saved. If
+       * this table does not exist, a new table with the given name will be
+       * created.
+       * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + public com.google.protobuf.ByteString + getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Required. The BigQuery table where the query results will be saved. If
+       * this table does not exist, a new table with the given name will be
+       * created.
+       * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + table_ = value; + onChanged(); + return this; + } + /** + *
+       * Required. The BigQuery table where the query results will be saved. If
+       * this table does not exist, a new table with the given name will be
+       * created.
+       * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTable() { + + table_ = getDefaultInstance().getTable(); + onChanged(); + return this; + } + /** + *
+       * Required. The BigQuery table where the query results will be saved. If
+       * this table does not exist, a new table with the given name will be
+       * created.
+       * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + table_ = value; + onChanged(); + return this; + } + + private java.lang.Object writeDisposition_ = ""; + /** + *
+       * Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * 
+ * + * string write_disposition = 3; + * @return The writeDisposition. + */ + public java.lang.String getWriteDisposition() { + java.lang.Object ref = writeDisposition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + writeDisposition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * 
+ * + * string write_disposition = 3; + * @return The bytes for writeDisposition. + */ + public com.google.protobuf.ByteString + getWriteDispositionBytes() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + writeDisposition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * 
+ * + * string write_disposition = 3; + * @param value The writeDisposition to set. + * @return This builder for chaining. + */ + public Builder setWriteDisposition( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + writeDisposition_ = value; + onChanged(); + return this; + } + /** + *
+       * Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * 
+ * + * string write_disposition = 3; + * @return This builder for chaining. + */ + public Builder clearWriteDisposition() { + + writeDisposition_ = getDefaultInstance().getWriteDisposition(); + onChanged(); + return this; + } + /** + *
+       * Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * 
+ * + * string write_disposition = 3; + * @param value The bytes for writeDisposition to set. + * @return This builder for chaining. + */ + public Builder setWriteDispositionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + writeDisposition_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) + private static final com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination(); + } + + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigqueryDestination_; + /** + *
+   * BigQuery destination where the query results will be saved.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return bigqueryDestination_ != null; + } + /** + *
+   * BigQuery destination where the query results will be saved.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getBigqueryDestination() { + return bigqueryDestination_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance() : bigqueryDestination_; + } + /** + *
+   * BigQuery destination where the query results will be saved.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + return getBigqueryDestination(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (bigqueryDestination_ != null) { + output.writeMessage(1, getBigqueryDestination()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bigqueryDestination_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getBigqueryDestination()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.QueryAssetsOutputConfig other = (com.google.cloud.asset.v1.QueryAssetsOutputConfig) obj; + + if (hasBigqueryDestination() != other.hasBigqueryDestination()) return false; + if (hasBigqueryDestination()) { + if (!getBigqueryDestination() + .equals(other.getBigqueryDestination())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBigqueryDestination()) { + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsOutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output configuration query assets.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsOutputConfig) + com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsOutputConfig.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.QueryAssetsOutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (bigqueryDestinationBuilder_ == null) { + bigqueryDestination_ = null; + } else { + bigqueryDestination_ = null; + bigqueryDestinationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig build() { + com.google.cloud.asset.v1.QueryAssetsOutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig buildPartial() { + com.google.cloud.asset.v1.QueryAssetsOutputConfig result = new com.google.cloud.asset.v1.QueryAssetsOutputConfig(this); + if (bigqueryDestinationBuilder_ == null) { + result.bigqueryDestination_ = bigqueryDestination_; + } else { + result.bigqueryDestination_ = bigqueryDestinationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig) { + return mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsOutputConfig other) { + if (other == com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance()) return this; + if (other.hasBigqueryDestination()) { + mergeBigqueryDestination(other.getBigqueryDestination()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.QueryAssetsOutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.QueryAssetsOutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigqueryDestination_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + * @return Whether the bigqueryDestination field is set. + */ + public boolean hasBigqueryDestination() { + return bigqueryDestinationBuilder_ != null || bigqueryDestination_ != null; + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + * @return The bigqueryDestination. + */ + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + return bigqueryDestination_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance() : bigqueryDestination_; + } else { + return bigqueryDestinationBuilder_.getMessage(); + } + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + public Builder setBigqueryDestination(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigqueryDestination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + public Builder setBigqueryDestination( + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + bigqueryDestination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + public Builder mergeBigqueryDestination(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (bigqueryDestination_ != null) { + bigqueryDestination_ = + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.newBuilder(bigqueryDestination_).mergeFrom(value).buildPartial(); + } else { + bigqueryDestination_ = value; + } + onChanged(); + } else { + bigqueryDestinationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + bigqueryDestination_ = null; + onChanged(); + } else { + bigqueryDestination_ = null; + bigqueryDestinationBuilder_ = null; + } + + return this; + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder getBigqueryDestinationBuilder() { + + onChanged(); + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if (bigqueryDestinationBuilder_ != null) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + return bigqueryDestination_ == null ? + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance() : bigqueryDestination_; + } + } + /** + *
+     * BigQuery destination where the query results will be saved.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder>( + getBigqueryDestination(), + getParentForChildren(), + isClean()); + bigqueryDestination_ = null; + } + return bigqueryDestinationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsOutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsOutputConfig) + private static final com.google.cloud.asset.v1.QueryAssetsOutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsOutputConfig(); + } + + public static com.google.cloud.asset.v1.QueryAssetsOutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryAssetsOutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryAssetsOutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java new file mode 100644 index 000000000000..55a6b3b6bd65 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java @@ -0,0 +1,36 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface QueryAssetsOutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsOutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * BigQuery destination where the query results will be saved.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + * @return Whether the bigqueryDestination field is set. + */ + boolean hasBigqueryDestination(); + /** + *
+   * BigQuery destination where the query results will be saved.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + * @return The bigqueryDestination. + */ + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getBigqueryDestination(); + /** + *
+   * BigQuery destination where the query results will be saved.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; + */ + com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java new file mode 100644 index 000000000000..e46dc420e8e7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java @@ -0,0 +1,2706 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * QueryAssets request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsRequest} + */ +public final class QueryAssetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsRequest) + QueryAssetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryAssetsRequest.newBuilder() to construct. + private QueryAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryAssetsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryAssetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryAssetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + queryCase_ = 2; + query_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + queryCase_ = 3; + query_ = s; + break; + } + case 32: { + + pageSize_ = input.readInt32(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 50: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeout_ != null) { + subBuilder = timeout_.toBuilder(); + } + timeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeout_); + timeout_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; + if (timeCase_ == 7) { + subBuilder = ((com.google.cloud.asset.v1.TimeWindow) time_).toBuilder(); + } + time_ = + input.readMessage(com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.TimeWindow) time_); + time_ = subBuilder.buildPartial(); + } + timeCase_ = 7; + break; + } + case 66: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timeCase_ == 8) { + subBuilder = ((com.google.protobuf.Timestamp) time_).toBuilder(); + } + time_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) time_); + time_ = subBuilder.buildPartial(); + } + timeCase_ = 8; + break; + } + case 74: { + com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.asset.v1.QueryAssetsOutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsRequest.class, com.google.cloud.asset.v1.QueryAssetsRequest.Builder.class); + } + + private int queryCase_ = 0; + private java.lang.Object query_; + public enum QueryCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STATEMENT(2), + JOB_REFERENCE(3), + QUERY_NOT_SET(0); + private final int value; + private QueryCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static QueryCase valueOf(int value) { + return forNumber(value); + } + + public static QueryCase forNumber(int value) { + switch (value) { + case 2: return STATEMENT; + case 3: return JOB_REFERENCE; + case 0: return QUERY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public QueryCase + getQueryCase() { + return QueryCase.forNumber( + queryCase_); + } + + private int timeCase_ = 0; + private java.lang.Object time_; + public enum TimeCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + READ_TIME_WINDOW(7), + READ_TIME(8), + TIME_NOT_SET(0); + private final int value; + private TimeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TimeCase valueOf(int value) { + return forNumber(value); + } + + public static TimeCase forNumber(int value) { + switch (value) { + case 7: return READ_TIME_WINDOW; + case 8: return READ_TIME; + case 0: return TIME_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TimeCase + getTimeCase() { + return TimeCase.forNumber( + timeCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * Only assets belonging to the `parent` will be returned.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * Only assets belonging to the `parent` will be returned.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATEMENT_FIELD_NUMBER = 2; + /** + *
+   * Optional. A SQL statement that's compatible with [BigQuery Standard
+   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+   * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the statement field is set. + */ + public boolean hasStatement() { + return queryCase_ == 2; + } + /** + *
+   * Optional. A SQL statement that's compatible with [BigQuery Standard
+   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+   * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The statement. + */ + public java.lang.String getStatement() { + java.lang.Object ref = ""; + if (queryCase_ == 2) { + ref = query_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (queryCase_ == 2) { + query_ = s; + } + return s; + } + } + /** + *
+   * Optional. A SQL statement that's compatible with [BigQuery Standard
+   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+   * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for statement. + */ + public com.google.protobuf.ByteString + getStatementBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 2) { + ref = query_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (queryCase_ == 2) { + query_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_REFERENCE_FIELD_NUMBER = 3; + /** + *
+   * Optional. Reference to the query job, which is from the
+   * `QueryAssetsResponse` of previous `QueryAssets` call.
+   * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the jobReference field is set. + */ + public boolean hasJobReference() { + return queryCase_ == 3; + } + /** + *
+   * Optional. Reference to the query job, which is from the
+   * `QueryAssetsResponse` of previous `QueryAssets` call.
+   * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The jobReference. + */ + public java.lang.String getJobReference() { + java.lang.Object ref = ""; + if (queryCase_ == 3) { + ref = query_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (queryCase_ == 3) { + query_ = s; + } + return s; + } + } + /** + *
+   * Optional. Reference to the query job, which is from the
+   * `QueryAssetsResponse` of previous `QueryAssets` call.
+   * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for jobReference. + */ + public com.google.protobuf.ByteString + getJobReferenceBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 3) { + ref = query_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (queryCase_ == 3) { + query_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + *
+   * Optional. The maximum number of rows to return in the results. Responses
+   * are limited to 10 MB and 1000 rows.
+   * By default, the maximum row count is 1000. When the byte or row count limit
+   * is reached, the rest of the query results will be paginated.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pageToken_; + /** + *
+   * Optional. A page token received from previous `QueryAssets`.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. A page token received from previous `QueryAssets`.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMEOUT_FIELD_NUMBER = 6; + private com.google.protobuf.Duration timeout_; + /** + *
+   * Optional. Specifies the maximum amount of time that the client is willing
+   * to wait for the query to complete. By default, this limit is 5 min for the
+   * first query, and 1 minute for the following queries. If the query is
+   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+   * false.
+   * Like BigQuery [jobs.query
+   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+   * The call is not guaranteed to wait for the specified timeout; it typically
+   * returns after around 200 seconds (200,000 milliseconds), even if the query
+   * is not complete.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return timeout_ != null; + } + /** + *
+   * Optional. Specifies the maximum amount of time that the client is willing
+   * to wait for the query to complete. By default, this limit is 5 min for the
+   * first query, and 1 minute for the following queries. If the query is
+   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+   * false.
+   * Like BigQuery [jobs.query
+   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+   * The call is not guaranteed to wait for the specified timeout; it typically
+   * returns after around 200 seconds (200,000 milliseconds), even if the query
+   * is not complete.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + /** + *
+   * Optional. Specifies the maximum amount of time that the client is willing
+   * to wait for the query to complete. By default, this limit is 5 min for the
+   * first query, and 1 minute for the following queries. If the query is
+   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+   * false.
+   * Like BigQuery [jobs.query
+   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+   * The call is not guaranteed to wait for the specified timeout; it typically
+   * returns after around 200 seconds (200,000 milliseconds), even if the query
+   * is not complete.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return getTimeout(); + } + + public static final int READ_TIME_WINDOW_FIELD_NUMBER = 7; + /** + *
+   * Optional. [start_time] is required. [start_time] must be less than
+   * [end_time] Defaults [end_time] to now if [start_time] is set and
+   * [end_time] isn't. Maximum permitted time range is 7 days.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTimeWindow field is set. + */ + @java.lang.Override + public boolean hasReadTimeWindow() { + return timeCase_ == 7; + } + /** + *
+   * Optional. [start_time] is required. [start_time] must be less than
+   * [end_time] Defaults [end_time] to now if [start_time] is set and
+   * [end_time] isn't. Maximum permitted time range is 7 days.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTimeWindow. + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { + if (timeCase_ == 7) { + return (com.google.cloud.asset.v1.TimeWindow) time_; + } + return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); + } + /** + *
+   * Optional. [start_time] is required. [start_time] must be less than
+   * [end_time] Defaults [end_time] to now if [start_time] is set and
+   * [end_time] isn't. Maximum permitted time range is 7 days.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { + if (timeCase_ == 7) { + return (com.google.cloud.asset.v1.TimeWindow) time_; + } + return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); + } + + public static final int READ_TIME_FIELD_NUMBER = 8; + /** + *
+   * Optional. Queries cloud assets as they appeared at the specified point in
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return timeCase_ == 8; + } + /** + *
+   * Optional. Queries cloud assets as they appeared at the specified point in
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + if (timeCase_ == 8) { + return (com.google.protobuf.Timestamp) time_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + *
+   * Optional. Queries cloud assets as they appeared at the specified point in
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (timeCase_ == 8) { + return (com.google.protobuf.Timestamp) time_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.asset.v1.QueryAssetsOutputConfig outputConfig_; + /** + *
+   * Optional. Destination where the query results will be saved.
+   * When this field is specified, the query results won't be saved in the
+   * [QueryAssetsResponse.query_result]. Instead
+   * [QueryAssetsResponse.output_config] will be set.
+   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+   * to check the status of the query job when passed to a following
+   * [QueryAssets] API call.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Optional. Destination where the query results will be saved.
+   * When this field is specified, the query results won't be saved in the
+   * [QueryAssetsResponse.query_result]. Instead
+   * [QueryAssetsResponse.output_config] will be set.
+   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+   * to check the status of the query job when passed to a following
+   * [QueryAssets] API call.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Optional. Destination where the query results will be saved.
+   * When this field is specified, the query results won't be saved in the
+   * [QueryAssetsResponse.query_result]. Instead
+   * [QueryAssetsResponse.output_config] will be set.
+   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+   * to check the status of the query job when passed to a following
+   * [QueryAssets] API call.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (queryCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + if (queryCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, query_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (timeout_ != null) { + output.writeMessage(6, getTimeout()); + } + if (timeCase_ == 7) { + output.writeMessage(7, (com.google.cloud.asset.v1.TimeWindow) time_); + } + if (timeCase_ == 8) { + output.writeMessage(8, (com.google.protobuf.Timestamp) time_); + } + if (outputConfig_ != null) { + output.writeMessage(9, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (queryCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + if (queryCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, query_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (timeout_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getTimeout()); + } + if (timeCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.cloud.asset.v1.TimeWindow) time_); + } + if (timeCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.protobuf.Timestamp) time_); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.QueryAssetsRequest other = (com.google.cloud.asset.v1.QueryAssetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout() + .equals(other.getTimeout())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!getQueryCase().equals(other.getQueryCase())) return false; + switch (queryCase_) { + case 2: + if (!getStatement() + .equals(other.getStatement())) return false; + break; + case 3: + if (!getJobReference() + .equals(other.getJobReference())) return false; + break; + case 0: + default: + } + if (!getTimeCase().equals(other.getTimeCase())) return false; + switch (timeCase_) { + case 7: + if (!getReadTimeWindow() + .equals(other.getReadTimeWindow())) return false; + break; + case 8: + if (!getReadTime() + .equals(other.getReadTime())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + switch (queryCase_) { + case 2: + hash = (37 * hash) + STATEMENT_FIELD_NUMBER; + hash = (53 * hash) + getStatement().hashCode(); + break; + case 3: + hash = (37 * hash) + JOB_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getJobReference().hashCode(); + break; + case 0: + default: + } + switch (timeCase_) { + case 7: + hash = (37 * hash) + READ_TIME_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getReadTimeWindow().hashCode(); + break; + case 8: + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * QueryAssets request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsRequest) + com.google.cloud.asset.v1.QueryAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsRequest.class, com.google.cloud.asset.v1.QueryAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.QueryAssetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + if (timeoutBuilder_ == null) { + timeout_ = null; + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + queryCase_ = 0; + query_ = null; + timeCase_ = 0; + time_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.QueryAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsRequest build() { + com.google.cloud.asset.v1.QueryAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsRequest buildPartial() { + com.google.cloud.asset.v1.QueryAssetsRequest result = new com.google.cloud.asset.v1.QueryAssetsRequest(this); + result.parent_ = parent_; + if (queryCase_ == 2) { + result.query_ = query_; + } + if (queryCase_ == 3) { + result.query_ = query_; + } + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (timeoutBuilder_ == null) { + result.timeout_ = timeout_; + } else { + result.timeout_ = timeoutBuilder_.build(); + } + if (timeCase_ == 7) { + if (readTimeWindowBuilder_ == null) { + result.time_ = time_; + } else { + result.time_ = readTimeWindowBuilder_.build(); + } + } + if (timeCase_ == 8) { + if (readTimeBuilder_ == null) { + result.time_ = time_; + } else { + result.time_ = readTimeBuilder_.build(); + } + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + result.queryCase_ = queryCase_; + result.timeCase_ = timeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.QueryAssetsRequest) { + return mergeFrom((com.google.cloud.asset.v1.QueryAssetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsRequest other) { + if (other == com.google.cloud.asset.v1.QueryAssetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + switch (other.getQueryCase()) { + case STATEMENT: { + queryCase_ = 2; + query_ = other.query_; + onChanged(); + break; + } + case JOB_REFERENCE: { + queryCase_ = 3; + query_ = other.query_; + onChanged(); + break; + } + case QUERY_NOT_SET: { + break; + } + } + switch (other.getTimeCase()) { + case READ_TIME_WINDOW: { + mergeReadTimeWindow(other.getReadTimeWindow()); + break; + } + case READ_TIME: { + mergeReadTime(other.getReadTime()); + break; + } + case TIME_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.QueryAssetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.QueryAssetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int queryCase_ = 0; + private java.lang.Object query_; + public QueryCase + getQueryCase() { + return QueryCase.forNumber( + queryCase_); + } + + public Builder clearQuery() { + queryCase_ = 0; + query_ = null; + onChanged(); + return this; + } + + private int timeCase_ = 0; + private java.lang.Object time_; + public TimeCase + getTimeCase() { + return TimeCase.forNumber( + timeCase_); + } + + public Builder clearTime() { + timeCase_ = 0; + time_ = null; + onChanged(); + return this; + } + + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * Only assets belonging to the `parent` will be returned.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * Only assets belonging to the `parent` will be returned.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * Only assets belonging to the `parent` will be returned.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * Only assets belonging to the `parent` will be returned.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * Only assets belonging to the `parent` will be returned.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + /** + *
+     * Optional. A SQL statement that's compatible with [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+     * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the statement field is set. + */ + @java.lang.Override + public boolean hasStatement() { + return queryCase_ == 2; + } + /** + *
+     * Optional. A SQL statement that's compatible with [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+     * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The statement. + */ + @java.lang.Override + public java.lang.String getStatement() { + java.lang.Object ref = ""; + if (queryCase_ == 2) { + ref = query_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (queryCase_ == 2) { + query_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A SQL statement that's compatible with [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+     * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for statement. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStatementBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 2) { + ref = query_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (queryCase_ == 2) { + query_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A SQL statement that's compatible with [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+     * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The statement to set. + * @return This builder for chaining. + */ + public Builder setStatement( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryCase_ = 2; + query_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. A SQL statement that's compatible with [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+     * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearStatement() { + if (queryCase_ == 2) { + queryCase_ = 0; + query_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Optional. A SQL statement that's compatible with [BigQuery Standard
+     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+     * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for statement to set. + * @return This builder for chaining. + */ + public Builder setStatementBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryCase_ = 2; + query_ = value; + onChanged(); + return this; + } + + /** + *
+     * Optional. Reference to the query job, which is from the
+     * `QueryAssetsResponse` of previous `QueryAssets` call.
+     * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the jobReference field is set. + */ + @java.lang.Override + public boolean hasJobReference() { + return queryCase_ == 3; + } + /** + *
+     * Optional. Reference to the query job, which is from the
+     * `QueryAssetsResponse` of previous `QueryAssets` call.
+     * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The jobReference. + */ + @java.lang.Override + public java.lang.String getJobReference() { + java.lang.Object ref = ""; + if (queryCase_ == 3) { + ref = query_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (queryCase_ == 3) { + query_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. Reference to the query job, which is from the
+     * `QueryAssetsResponse` of previous `QueryAssets` call.
+     * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for jobReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getJobReferenceBytes() { + java.lang.Object ref = ""; + if (queryCase_ == 3) { + ref = query_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (queryCase_ == 3) { + query_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. Reference to the query job, which is from the
+     * `QueryAssetsResponse` of previous `QueryAssets` call.
+     * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The jobReference to set. + * @return This builder for chaining. + */ + public Builder setJobReference( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryCase_ = 3; + query_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. Reference to the query job, which is from the
+     * `QueryAssetsResponse` of previous `QueryAssets` call.
+     * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearJobReference() { + if (queryCase_ == 3) { + queryCase_ = 0; + query_ = null; + onChanged(); + } + return this; + } + /** + *
+     * Optional. Reference to the query job, which is from the
+     * `QueryAssetsResponse` of previous `QueryAssets` call.
+     * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for jobReference to set. + * @return This builder for chaining. + */ + public Builder setJobReferenceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryCase_ = 3; + query_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The maximum number of rows to return in the results. Responses
+     * are limited to 10 MB and 1000 rows.
+     * By default, the maximum row count is 1000. When the byte or row count limit
+     * is reached, the rest of the query results will be paginated.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The maximum number of rows to return in the results. Responses
+     * are limited to 10 MB and 1000 rows.
+     * By default, the maximum row count is 1000. When the byte or row count limit
+     * is reached, the rest of the query results will be paginated.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The maximum number of rows to return in the results. Responses
+     * are limited to 10 MB and 1000 rows.
+     * By default, the maximum row count is 1000. When the byte or row count limit
+     * is reached, the rest of the query results will be paginated.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. A page token received from previous `QueryAssets`.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A page token received from previous `QueryAssets`.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A page token received from previous `QueryAssets`.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. A page token received from previous `QueryAssets`.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Optional. A page token received from previous `QueryAssets`.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timeoutBuilder_; + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return timeoutBuilder_ != null || timeout_ != null; + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + onChanged(); + } else { + timeoutBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setTimeout( + com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + onChanged(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (timeout_ != null) { + timeout_ = + com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); + } else { + timeout_ = value; + } + onChanged(); + } else { + timeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearTimeout() { + if (timeoutBuilder_ == null) { + timeout_ = null; + onChanged(); + } else { + timeout_ = null; + timeoutBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + /** + *
+     * Optional. Specifies the maximum amount of time that the client is willing
+     * to wait for the query to complete. By default, this limit is 5 min for the
+     * first query, and 1 minute for the following queries. If the query is
+     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+     * false.
+     * Like BigQuery [jobs.query
+     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+     * The call is not guaranteed to wait for the specified timeout; it typically
+     * returns after around 200 seconds (200,000 milliseconds), even if the query
+     * is not complete.
+     * The field will be ignored when [output_config] is specified.
+     * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getTimeout(), + getParentForChildren(), + isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> readTimeWindowBuilder_; + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTimeWindow field is set. + */ + @java.lang.Override + public boolean hasReadTimeWindow() { + return timeCase_ == 7; + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTimeWindow. + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { + if (readTimeWindowBuilder_ == null) { + if (timeCase_ == 7) { + return (com.google.cloud.asset.v1.TimeWindow) time_; + } + return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); + } else { + if (timeCase_ == 7) { + return readTimeWindowBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); + } + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { + if (readTimeWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + time_ = value; + onChanged(); + } else { + readTimeWindowBuilder_.setMessage(value); + } + timeCase_ = 7; + return this; + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadTimeWindow( + com.google.cloud.asset.v1.TimeWindow.Builder builderForValue) { + if (readTimeWindowBuilder_ == null) { + time_ = builderForValue.build(); + onChanged(); + } else { + readTimeWindowBuilder_.setMessage(builderForValue.build()); + } + timeCase_ = 7; + return this; + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { + if (readTimeWindowBuilder_ == null) { + if (timeCase_ == 7 && + time_ != com.google.cloud.asset.v1.TimeWindow.getDefaultInstance()) { + time_ = com.google.cloud.asset.v1.TimeWindow.newBuilder((com.google.cloud.asset.v1.TimeWindow) time_) + .mergeFrom(value).buildPartial(); + } else { + time_ = value; + } + onChanged(); + } else { + if (timeCase_ == 7) { + readTimeWindowBuilder_.mergeFrom(value); + } else { + readTimeWindowBuilder_.setMessage(value); + } + } + timeCase_ = 7; + return this; + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearReadTimeWindow() { + if (readTimeWindowBuilder_ == null) { + if (timeCase_ == 7) { + timeCase_ = 0; + time_ = null; + onChanged(); + } + } else { + if (timeCase_ == 7) { + timeCase_ = 0; + time_ = null; + } + readTimeWindowBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.TimeWindow.Builder getReadTimeWindowBuilder() { + return getReadTimeWindowFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { + if ((timeCase_ == 7) && (readTimeWindowBuilder_ != null)) { + return readTimeWindowBuilder_.getMessageOrBuilder(); + } else { + if (timeCase_ == 7) { + return (com.google.cloud.asset.v1.TimeWindow) time_; + } + return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); + } + } + /** + *
+     * Optional. [start_time] is required. [start_time] must be less than
+     * [end_time] Defaults [end_time] to now if [start_time] is set and
+     * [end_time] isn't. Maximum permitted time range is 7 days.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> + getReadTimeWindowFieldBuilder() { + if (readTimeWindowBuilder_ == null) { + if (!(timeCase_ == 7)) { + time_ = com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); + } + readTimeWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder>( + (com.google.cloud.asset.v1.TimeWindow) time_, + getParentForChildren(), + isClean()); + time_ = null; + } + timeCase_ = 7; + onChanged();; + return readTimeWindowBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return timeCase_ == 8; + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + if (timeCase_ == 8) { + return (com.google.protobuf.Timestamp) time_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (timeCase_ == 8) { + return readTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + time_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + timeCase_ = 8; + return this; + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + time_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + timeCase_ = 8; + return this; + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (timeCase_ == 8 && + time_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + time_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) time_) + .mergeFrom(value).buildPartial(); + } else { + time_ = value; + } + onChanged(); + } else { + if (timeCase_ == 8) { + readTimeBuilder_.mergeFrom(value); + } else { + readTimeBuilder_.setMessage(value); + } + } + timeCase_ = 8; + return this; + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + if (timeCase_ == 8) { + timeCase_ = 0; + time_ = null; + onChanged(); + } + } else { + if (timeCase_ == 8) { + timeCase_ = 0; + time_ = null; + } + readTimeBuilder_.clear(); + } + return this; + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if ((timeCase_ == 8) && (readTimeBuilder_ != null)) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + if (timeCase_ == 8) { + return (com.google.protobuf.Timestamp) time_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + *
+     * Optional. Queries cloud assets as they appeared at the specified point in
+     * time.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + if (!(timeCase_ == 8)) { + time_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) time_, + getParentForChildren(), + isClean()); + time_ = null; + } + timeCase_ = 8; + onChanged();; + return readTimeBuilder_; + } + + private com.google.cloud.asset.v1.QueryAssetsOutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputConfig. + */ + public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1.QueryAssetsOutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Optional. Destination where the query results will be saved.
+     * When this field is specified, the query results won't be saved in the
+     * [QueryAssetsResponse.query_result]. Instead
+     * [QueryAssetsResponse.output_config] will be set.
+     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+     * to check the status of the query job when passed to a following
+     * [QueryAssets] API call.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsRequest) + private static final com.google.cloud.asset.v1.QueryAssetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsRequest(); + } + + public static com.google.cloud.asset.v1.QueryAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryAssetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..a60e2dde9c84 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java @@ -0,0 +1,306 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface QueryAssetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * Only assets belonging to the `parent` will be returned.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * Only assets belonging to the `parent` will be returned.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Optional. A SQL statement that's compatible with [BigQuery Standard
+   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+   * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the statement field is set. + */ + boolean hasStatement(); + /** + *
+   * Optional. A SQL statement that's compatible with [BigQuery Standard
+   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+   * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The statement. + */ + java.lang.String getStatement(); + /** + *
+   * Optional. A SQL statement that's compatible with [BigQuery Standard
+   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
+   * 
+ * + * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for statement. + */ + com.google.protobuf.ByteString + getStatementBytes(); + + /** + *
+   * Optional. Reference to the query job, which is from the
+   * `QueryAssetsResponse` of previous `QueryAssets` call.
+   * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the jobReference field is set. + */ + boolean hasJobReference(); + /** + *
+   * Optional. Reference to the query job, which is from the
+   * `QueryAssetsResponse` of previous `QueryAssets` call.
+   * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The jobReference. + */ + java.lang.String getJobReference(); + /** + *
+   * Optional. Reference to the query job, which is from the
+   * `QueryAssetsResponse` of previous `QueryAssets` call.
+   * 
+ * + * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for jobReference. + */ + com.google.protobuf.ByteString + getJobReferenceBytes(); + + /** + *
+   * Optional. The maximum number of rows to return in the results. Responses
+   * are limited to 10 MB and 1000 rows.
+   * By default, the maximum row count is 1000. When the byte or row count limit
+   * is reached, the rest of the query results will be paginated.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. A page token received from previous `QueryAssets`.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. A page token received from previous `QueryAssets`.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. Specifies the maximum amount of time that the client is willing
+   * to wait for the query to complete. By default, this limit is 5 min for the
+   * first query, and 1 minute for the following queries. If the query is
+   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+   * false.
+   * Like BigQuery [jobs.query
+   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+   * The call is not guaranteed to wait for the specified timeout; it typically
+   * returns after around 200 seconds (200,000 milliseconds), even if the query
+   * is not complete.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + /** + *
+   * Optional. Specifies the maximum amount of time that the client is willing
+   * to wait for the query to complete. By default, this limit is 5 min for the
+   * first query, and 1 minute for the following queries. If the query is
+   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+   * false.
+   * Like BigQuery [jobs.query
+   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+   * The call is not guaranteed to wait for the specified timeout; it typically
+   * returns after around 200 seconds (200,000 milliseconds), even if the query
+   * is not complete.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + /** + *
+   * Optional. Specifies the maximum amount of time that the client is willing
+   * to wait for the query to complete. By default, this limit is 5 min for the
+   * first query, and 1 minute for the following queries. If the query is
+   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
+   * false.
+   * Like BigQuery [jobs.query
+   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
+   * The call is not guaranteed to wait for the specified timeout; it typically
+   * returns after around 200 seconds (200,000 milliseconds), even if the query
+   * is not complete.
+   * The field will be ignored when [output_config] is specified.
+   * 
+ * + * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); + + /** + *
+   * Optional. [start_time] is required. [start_time] must be less than
+   * [end_time] Defaults [end_time] to now if [start_time] is set and
+   * [end_time] isn't. Maximum permitted time range is 7 days.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTimeWindow field is set. + */ + boolean hasReadTimeWindow(); + /** + *
+   * Optional. [start_time] is required. [start_time] must be less than
+   * [end_time] Defaults [end_time] to now if [start_time] is set and
+   * [end_time] isn't. Maximum permitted time range is 7 days.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTimeWindow. + */ + com.google.cloud.asset.v1.TimeWindow getReadTimeWindow(); + /** + *
+   * Optional. [start_time] is required. [start_time] must be less than
+   * [end_time] Defaults [end_time] to now if [start_time] is set and
+   * [end_time] isn't. Maximum permitted time range is 7 days.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); + + /** + *
+   * Optional. Queries cloud assets as they appeared at the specified point in
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Optional. Queries cloud assets as they appeared at the specified point in
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Optional. Queries cloud assets as they appeared at the specified point in
+   * time.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * Optional. Destination where the query results will be saved.
+   * When this field is specified, the query results won't be saved in the
+   * [QueryAssetsResponse.query_result]. Instead
+   * [QueryAssetsResponse.output_config] will be set.
+   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+   * to check the status of the query job when passed to a following
+   * [QueryAssets] API call.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Optional. Destination where the query results will be saved.
+   * When this field is specified, the query results won't be saved in the
+   * [QueryAssetsResponse.query_result]. Instead
+   * [QueryAssetsResponse.output_config] will be set.
+   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+   * to check the status of the query job when passed to a following
+   * [QueryAssets] API call.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return The outputConfig. + */ + com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig(); + /** + *
+   * Optional. Destination where the query results will be saved.
+   * When this field is specified, the query results won't be saved in the
+   * [QueryAssetsResponse.query_result]. Instead
+   * [QueryAssetsResponse.output_config] will be set.
+   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
+   * to check the status of the query job when passed to a following
+   * [QueryAssets] API call.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder(); + + public com.google.cloud.asset.v1.QueryAssetsRequest.QueryCase getQueryCase(); + + public com.google.cloud.asset.v1.QueryAssetsRequest.TimeCase getTimeCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java new file mode 100644 index 000000000000..c43ed18d2494 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java @@ -0,0 +1,1562 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * QueryAssets response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsResponse} + */ +public final class QueryAssetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsResponse) + QueryAssetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryAssetsResponse.newBuilder() to construct. + private QueryAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryAssetsResponse() { + jobReference_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryAssetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryAssetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + jobReference_ = s; + break; + } + case 16: { + + done_ = input.readBool(); + break; + } + case 26: { + com.google.rpc.Status.Builder subBuilder = null; + if (responseCase_ == 3) { + subBuilder = ((com.google.rpc.Status) response_).toBuilder(); + } + response_ = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.rpc.Status) response_); + response_ = subBuilder.buildPartial(); + } + responseCase_ = 3; + break; + } + case 34: { + com.google.cloud.asset.v1.QueryResult.Builder subBuilder = null; + if (responseCase_ == 4) { + subBuilder = ((com.google.cloud.asset.v1.QueryResult) response_).toBuilder(); + } + response_ = + input.readMessage(com.google.cloud.asset.v1.QueryResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.QueryResult) response_); + response_ = subBuilder.buildPartial(); + } + responseCase_ = 4; + break; + } + case 42: { + com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder subBuilder = null; + if (responseCase_ == 5) { + subBuilder = ((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_).toBuilder(); + } + response_ = + input.readMessage(com.google.cloud.asset.v1.QueryAssetsOutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); + response_ = subBuilder.buildPartial(); + } + responseCase_ = 5; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsResponse.class, com.google.cloud.asset.v1.QueryAssetsResponse.Builder.class); + } + + private int responseCase_ = 0; + private java.lang.Object response_; + public enum ResponseCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ERROR(3), + QUERY_RESULT(4), + OUTPUT_CONFIG(5), + RESPONSE_NOT_SET(0); + private final int value; + private ResponseCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResponseCase valueOf(int value) { + return forNumber(value); + } + + public static ResponseCase forNumber(int value) { + switch (value) { + case 3: return ERROR; + case 4: return QUERY_RESULT; + case 5: return OUTPUT_CONFIG; + case 0: return RESPONSE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public static final int JOB_REFERENCE_FIELD_NUMBER = 1; + private volatile java.lang.Object jobReference_; + /** + *
+   * Reference to a query job.
+   * 
+ * + * string job_reference = 1; + * @return The jobReference. + */ + @java.lang.Override + public java.lang.String getJobReference() { + java.lang.Object ref = jobReference_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobReference_ = s; + return s; + } + } + /** + *
+   * Reference to a query job.
+   * 
+ * + * string job_reference = 1; + * @return The bytes for jobReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getJobReferenceBytes() { + java.lang.Object ref = jobReference_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DONE_FIELD_NUMBER = 2; + private boolean done_; + /** + *
+   * The query response, which can be either an `error` or a valid `response`.
+   * If `done` == `false` and the query result is being saved in a output, the
+   * output_config field will be set.
+   * If `done` == `true`, exactly one of
+   * `error`, `query_result` or `output_config` will be set.
+   * 
+ * + * bool done = 2; + * @return The done. + */ + @java.lang.Override + public boolean getDone() { + return done_; + } + + public static final int ERROR_FIELD_NUMBER = 3; + /** + *
+   * Error status.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return responseCase_ == 3; + } + /** + *
+   * Error status.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + /** + *
+   * Error status.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + public static final int QUERY_RESULT_FIELD_NUMBER = 4; + /** + *
+   * Result of the query.
+   * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + * @return Whether the queryResult field is set. + */ + @java.lang.Override + public boolean hasQueryResult() { + return responseCase_ == 4; + } + /** + *
+   * Result of the query.
+   * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + * @return The queryResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryResult getQueryResult() { + if (responseCase_ == 4) { + return (com.google.cloud.asset.v1.QueryResult) response_; + } + return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); + } + /** + *
+   * Result of the query.
+   * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryResultOrBuilder getQueryResultOrBuilder() { + if (responseCase_ == 4) { + return (com.google.cloud.asset.v1.QueryResult) response_; + } + return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; + /** + *
+   * Output configuration which indicates instead of being returned in API
+   * response on the fly, the query result will be saved in a specific output.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return responseCase_ == 5; + } + /** + *
+   * Output configuration which indicates instead of being returned in API
+   * response on the fly, the query result will be saved in a specific output.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { + if (responseCase_ == 5) { + return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; + } + return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); + } + /** + *
+   * Output configuration which indicates instead of being returned in API
+   * response on the fly, the query result will be saved in a specific output.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { + if (responseCase_ == 5) { + return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; + } + return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobReference_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobReference_); + } + if (done_ != false) { + output.writeBool(2, done_); + } + if (responseCase_ == 3) { + output.writeMessage(3, (com.google.rpc.Status) response_); + } + if (responseCase_ == 4) { + output.writeMessage(4, (com.google.cloud.asset.v1.QueryResult) response_); + } + if (responseCase_ == 5) { + output.writeMessage(5, (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobReference_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobReference_); + } + if (done_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, done_); + } + if (responseCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.rpc.Status) response_); + } + if (responseCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.cloud.asset.v1.QueryResult) response_); + } + if (responseCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.QueryAssetsResponse other = (com.google.cloud.asset.v1.QueryAssetsResponse) obj; + + if (!getJobReference() + .equals(other.getJobReference())) return false; + if (getDone() + != other.getDone()) return false; + if (!getResponseCase().equals(other.getResponseCase())) return false; + switch (responseCase_) { + case 3: + if (!getError() + .equals(other.getError())) return false; + break; + case 4: + if (!getQueryResult() + .equals(other.getQueryResult())) return false; + break; + case 5: + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + JOB_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getJobReference().hashCode(); + hash = (37 * hash) + DONE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDone()); + switch (responseCase_) { + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 4: + hash = (37 * hash) + QUERY_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getQueryResult().hashCode(); + break; + case 5: + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * QueryAssets response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryAssetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsResponse) + com.google.cloud.asset.v1.QueryAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryAssetsResponse.class, com.google.cloud.asset.v1.QueryAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.QueryAssetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + jobReference_ = ""; + + done_ = false; + + responseCase_ = 0; + response_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.QueryAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsResponse build() { + com.google.cloud.asset.v1.QueryAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsResponse buildPartial() { + com.google.cloud.asset.v1.QueryAssetsResponse result = new com.google.cloud.asset.v1.QueryAssetsResponse(this); + result.jobReference_ = jobReference_; + result.done_ = done_; + if (responseCase_ == 3) { + if (errorBuilder_ == null) { + result.response_ = response_; + } else { + result.response_ = errorBuilder_.build(); + } + } + if (responseCase_ == 4) { + if (queryResultBuilder_ == null) { + result.response_ = response_; + } else { + result.response_ = queryResultBuilder_.build(); + } + } + if (responseCase_ == 5) { + if (outputConfigBuilder_ == null) { + result.response_ = response_; + } else { + result.response_ = outputConfigBuilder_.build(); + } + } + result.responseCase_ = responseCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.QueryAssetsResponse) { + return mergeFrom((com.google.cloud.asset.v1.QueryAssetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsResponse other) { + if (other == com.google.cloud.asset.v1.QueryAssetsResponse.getDefaultInstance()) return this; + if (!other.getJobReference().isEmpty()) { + jobReference_ = other.jobReference_; + onChanged(); + } + if (other.getDone() != false) { + setDone(other.getDone()); + } + switch (other.getResponseCase()) { + case ERROR: { + mergeError(other.getError()); + break; + } + case QUERY_RESULT: { + mergeQueryResult(other.getQueryResult()); + break; + } + case OUTPUT_CONFIG: { + mergeOutputConfig(other.getOutputConfig()); + break; + } + case RESPONSE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.QueryAssetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.QueryAssetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int responseCase_ = 0; + private java.lang.Object response_; + public ResponseCase + getResponseCase() { + return ResponseCase.forNumber( + responseCase_); + } + + public Builder clearResponse() { + responseCase_ = 0; + response_ = null; + onChanged(); + return this; + } + + + private java.lang.Object jobReference_ = ""; + /** + *
+     * Reference to a query job.
+     * 
+ * + * string job_reference = 1; + * @return The jobReference. + */ + public java.lang.String getJobReference() { + java.lang.Object ref = jobReference_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobReference_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Reference to a query job.
+     * 
+ * + * string job_reference = 1; + * @return The bytes for jobReference. + */ + public com.google.protobuf.ByteString + getJobReferenceBytes() { + java.lang.Object ref = jobReference_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jobReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Reference to a query job.
+     * 
+ * + * string job_reference = 1; + * @param value The jobReference to set. + * @return This builder for chaining. + */ + public Builder setJobReference( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobReference_ = value; + onChanged(); + return this; + } + /** + *
+     * Reference to a query job.
+     * 
+ * + * string job_reference = 1; + * @return This builder for chaining. + */ + public Builder clearJobReference() { + + jobReference_ = getDefaultInstance().getJobReference(); + onChanged(); + return this; + } + /** + *
+     * Reference to a query job.
+     * 
+ * + * string job_reference = 1; + * @param value The bytes for jobReference to set. + * @return This builder for chaining. + */ + public Builder setJobReferenceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobReference_ = value; + onChanged(); + return this; + } + + private boolean done_ ; + /** + *
+     * The query response, which can be either an `error` or a valid `response`.
+     * If `done` == `false` and the query result is being saved in a output, the
+     * output_config field will be set.
+     * If `done` == `true`, exactly one of
+     * `error`, `query_result` or `output_config` will be set.
+     * 
+ * + * bool done = 2; + * @return The done. + */ + @java.lang.Override + public boolean getDone() { + return done_; + } + /** + *
+     * The query response, which can be either an `error` or a valid `response`.
+     * If `done` == `false` and the query result is being saved in a output, the
+     * output_config field will be set.
+     * If `done` == `true`, exactly one of
+     * `error`, `query_result` or `output_config` will be set.
+     * 
+ * + * bool done = 2; + * @param value The done to set. + * @return This builder for chaining. + */ + public Builder setDone(boolean value) { + + done_ = value; + onChanged(); + return this; + } + /** + *
+     * The query response, which can be either an `error` or a valid `response`.
+     * If `done` == `false` and the query result is being saved in a output, the
+     * output_config field will be set.
+     * If `done` == `true`, exactly one of
+     * `error`, `query_result` or `output_config` will be set.
+     * 
+ * + * bool done = 2; + * @return This builder for chaining. + */ + public Builder clearDone() { + + done_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return responseCase_ == 3; + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (responseCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + responseCase_ = 3; + return this; + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder setError( + com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 3; + return this; + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (responseCase_ == 3 && + response_ != com.google.rpc.Status.getDefaultInstance()) { + response_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + responseCase_ = 3; + return this; + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 3) { + responseCase_ = 0; + response_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((responseCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 3) { + return (com.google.rpc.Status) response_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + /** + *
+     * Error status.
+     * 
+ * + * .google.rpc.Status error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(responseCase_ == 3)) { + response_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 3; + onChanged();; + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryResult, com.google.cloud.asset.v1.QueryResult.Builder, com.google.cloud.asset.v1.QueryResultOrBuilder> queryResultBuilder_; + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + * @return Whether the queryResult field is set. + */ + @java.lang.Override + public boolean hasQueryResult() { + return responseCase_ == 4; + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + * @return The queryResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryResult getQueryResult() { + if (queryResultBuilder_ == null) { + if (responseCase_ == 4) { + return (com.google.cloud.asset.v1.QueryResult) response_; + } + return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); + } else { + if (responseCase_ == 4) { + return queryResultBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); + } + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + public Builder setQueryResult(com.google.cloud.asset.v1.QueryResult value) { + if (queryResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + queryResultBuilder_.setMessage(value); + } + responseCase_ = 4; + return this; + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + public Builder setQueryResult( + com.google.cloud.asset.v1.QueryResult.Builder builderForValue) { + if (queryResultBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + queryResultBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 4; + return this; + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + public Builder mergeQueryResult(com.google.cloud.asset.v1.QueryResult value) { + if (queryResultBuilder_ == null) { + if (responseCase_ == 4 && + response_ != com.google.cloud.asset.v1.QueryResult.getDefaultInstance()) { + response_ = com.google.cloud.asset.v1.QueryResult.newBuilder((com.google.cloud.asset.v1.QueryResult) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 4) { + queryResultBuilder_.mergeFrom(value); + } else { + queryResultBuilder_.setMessage(value); + } + } + responseCase_ = 4; + return this; + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + public Builder clearQueryResult() { + if (queryResultBuilder_ == null) { + if (responseCase_ == 4) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 4) { + responseCase_ = 0; + response_ = null; + } + queryResultBuilder_.clear(); + } + return this; + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + public com.google.cloud.asset.v1.QueryResult.Builder getQueryResultBuilder() { + return getQueryResultFieldBuilder().getBuilder(); + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryResultOrBuilder getQueryResultOrBuilder() { + if ((responseCase_ == 4) && (queryResultBuilder_ != null)) { + return queryResultBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 4) { + return (com.google.cloud.asset.v1.QueryResult) response_; + } + return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); + } + } + /** + *
+     * Result of the query.
+     * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryResult, com.google.cloud.asset.v1.QueryResult.Builder, com.google.cloud.asset.v1.QueryResultOrBuilder> + getQueryResultFieldBuilder() { + if (queryResultBuilder_ == null) { + if (!(responseCase_ == 4)) { + response_ = com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); + } + queryResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryResult, com.google.cloud.asset.v1.QueryResult.Builder, com.google.cloud.asset.v1.QueryResultOrBuilder>( + (com.google.cloud.asset.v1.QueryResult) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 4; + onChanged();; + return queryResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return responseCase_ == 5; + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + if (responseCase_ == 5) { + return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; + } + return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); + } else { + if (responseCase_ == 5) { + return outputConfigBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); + } + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + public Builder setOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + response_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + responseCase_ = 5; + return this; + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + response_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + responseCase_ = 5; + return this; + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + public Builder mergeOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (responseCase_ == 5 && + response_ != com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance()) { + response_ = com.google.cloud.asset.v1.QueryAssetsOutputConfig.newBuilder((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_) + .mergeFrom(value).buildPartial(); + } else { + response_ = value; + } + onChanged(); + } else { + if (responseCase_ == 5) { + outputConfigBuilder_.mergeFrom(value); + } else { + outputConfigBuilder_.setMessage(value); + } + } + responseCase_ = 5; + return this; + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + if (responseCase_ == 5) { + responseCase_ = 0; + response_ = null; + onChanged(); + } + } else { + if (responseCase_ == 5) { + responseCase_ = 0; + response_ = null; + } + outputConfigBuilder_.clear(); + } + return this; + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + public com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder getOutputConfigBuilder() { + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { + if ((responseCase_ == 5) && (outputConfigBuilder_ != null)) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + if (responseCase_ == 5) { + return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; + } + return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); + } + } + /** + *
+     * Output configuration which indicates instead of being returned in API
+     * response on the fly, the query result will be saved in a specific output.
+     * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + if (!(responseCase_ == 5)) { + response_ = com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); + } + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder>( + (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_, + getParentForChildren(), + isClean()); + response_ = null; + } + responseCase_ = 5; + onChanged();; + return outputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsResponse) + private static final com.google.cloud.asset.v1.QueryAssetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsResponse(); + } + + public static com.google.cloud.asset.v1.QueryAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryAssetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..e13d2857eeca --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface QueryAssetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Reference to a query job.
+   * 
+ * + * string job_reference = 1; + * @return The jobReference. + */ + java.lang.String getJobReference(); + /** + *
+   * Reference to a query job.
+   * 
+ * + * string job_reference = 1; + * @return The bytes for jobReference. + */ + com.google.protobuf.ByteString + getJobReferenceBytes(); + + /** + *
+   * The query response, which can be either an `error` or a valid `response`.
+   * If `done` == `false` and the query result is being saved in a output, the
+   * output_config field will be set.
+   * If `done` == `true`, exactly one of
+   * `error`, `query_result` or `output_config` will be set.
+   * 
+ * + * bool done = 2; + * @return The done. + */ + boolean getDone(); + + /** + *
+   * Error status.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return Whether the error field is set. + */ + boolean hasError(); + /** + *
+   * Error status.
+   * 
+ * + * .google.rpc.Status error = 3; + * @return The error. + */ + com.google.rpc.Status getError(); + /** + *
+   * Error status.
+   * 
+ * + * .google.rpc.Status error = 3; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + *
+   * Result of the query.
+   * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + * @return Whether the queryResult field is set. + */ + boolean hasQueryResult(); + /** + *
+   * Result of the query.
+   * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + * @return The queryResult. + */ + com.google.cloud.asset.v1.QueryResult getQueryResult(); + /** + *
+   * Result of the query.
+   * 
+ * + * .google.cloud.asset.v1.QueryResult query_result = 4; + */ + com.google.cloud.asset.v1.QueryResultOrBuilder getQueryResultOrBuilder(); + + /** + *
+   * Output configuration which indicates instead of being returned in API
+   * response on the fly, the query result will be saved in a specific output.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Output configuration which indicates instead of being returned in API
+   * response on the fly, the query result will be saved in a specific output.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + * @return The outputConfig. + */ + com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig(); + /** + *
+   * Output configuration which indicates instead of being returned in API
+   * response on the fly, the query result will be saved in a specific output.
+   * 
+ * + * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; + */ + com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder(); + + public com.google.cloud.asset.v1.QueryAssetsResponse.ResponseCase getResponseCase(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java new file mode 100644 index 000000000000..d5bf15251a36 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java @@ -0,0 +1,1361 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Execution results of the query.
+ * The result is formatted as rows represented by BigQuery compatible [schema].
+ * When pagination is necessary, it will contains the page token to retrieve
+ * the results of following pages.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryResult} + */ +public final class QueryResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryResult) + QueryResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryResult.newBuilder() to construct. + private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryResult() { + rows_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + rows_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rows_.add( + input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.cloud.asset.v1.TableSchema.Builder subBuilder = null; + if (schema_ != null) { + subBuilder = schema_.toBuilder(); + } + schema_ = input.readMessage(com.google.cloud.asset.v1.TableSchema.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(schema_); + schema_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 32: { + + totalRows_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryResult.class, com.google.cloud.asset.v1.QueryResult.Builder.class); + } + + public static final int ROWS_FIELD_NUMBER = 1; + private java.util.List rows_; + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + @java.lang.Override + public java.util.List getRowsList() { + return rows_; + } + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + @java.lang.Override + public java.util.List + getRowsOrBuilderList() { + return rows_; + } + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + @java.lang.Override + public int getRowsCount() { + return rows_.size(); + } + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + @java.lang.Override + public com.google.protobuf.Struct getRows(int index) { + return rows_.get(index); + } + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); + } + + public static final int SCHEMA_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.TableSchema schema_; + /** + *
+   * Describes the format of the [rows].
+   * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + * @return Whether the schema field is set. + */ + @java.lang.Override + public boolean hasSchema() { + return schema_ != null; + } + /** + *
+   * Describes the format of the [rows].
+   * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + * @return The schema. + */ + @java.lang.Override + public com.google.cloud.asset.v1.TableSchema getSchema() { + return schema_ == null ? com.google.cloud.asset.v1.TableSchema.getDefaultInstance() : schema_; + } + /** + *
+   * Describes the format of the [rows].
+   * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TableSchemaOrBuilder getSchemaOrBuilder() { + return getSchema(); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of the results.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of the results.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_ROWS_FIELD_NUMBER = 4; + private long totalRows_; + /** + *
+   * Total rows of the whole query results.
+   * 
+ * + * int64 total_rows = 4; + * @return The totalRows. + */ + @java.lang.Override + public long getTotalRows() { + return totalRows_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(1, rows_.get(i)); + } + if (schema_ != null) { + output.writeMessage(2, getSchema()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + if (totalRows_ != 0L) { + output.writeInt64(4, totalRows_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, rows_.get(i)); + } + if (schema_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getSchema()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + if (totalRows_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, totalRows_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.QueryResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.QueryResult other = (com.google.cloud.asset.v1.QueryResult) obj; + + if (!getRowsList() + .equals(other.getRowsList())) return false; + if (hasSchema() != other.hasSchema()) return false; + if (hasSchema()) { + if (!getSchema() + .equals(other.getSchema())) return false; + } + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (getTotalRows() + != other.getTotalRows()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRowsCount() > 0) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRowsList().hashCode(); + } + if (hasSchema()) { + hash = (37 * hash) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (37 * hash) + TOTAL_ROWS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalRows()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.QueryResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.QueryResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.QueryResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Execution results of the query.
+   * The result is formatted as rows represented by BigQuery compatible [schema].
+   * When pagination is necessary, it will contains the page token to retrieve
+   * the results of following pages.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.QueryResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryResult) + com.google.cloud.asset.v1.QueryResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.QueryResult.class, com.google.cloud.asset.v1.QueryResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.QueryResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRowsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rowsBuilder_.clear(); + } + if (schemaBuilder_ == null) { + schema_ = null; + } else { + schema_ = null; + schemaBuilder_ = null; + } + nextPageToken_ = ""; + + totalRows_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryResult build() { + com.google.cloud.asset.v1.QueryResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryResult buildPartial() { + com.google.cloud.asset.v1.QueryResult result = new com.google.cloud.asset.v1.QueryResult(this); + int from_bitField0_ = bitField0_; + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } + if (schemaBuilder_ == null) { + result.schema_ = schema_; + } else { + result.schema_ = schemaBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.totalRows_ = totalRows_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.QueryResult) { + return mergeFrom((com.google.cloud.asset.v1.QueryResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.QueryResult other) { + if (other == com.google.cloud.asset.v1.QueryResult.getDefaultInstance()) return this; + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000001); + rowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRowsFieldBuilder() : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (other.getTotalRows() != 0L) { + setTotalRows(other.getTotalRows()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.QueryResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.QueryResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List rows_ = + java.util.Collections.emptyList(); + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> rowsBuilder_; + + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public com.google.protobuf.Struct getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder setRows( + int index, com.google.protobuf.Struct value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder setRows( + int index, com.google.protobuf.Struct.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder addRows(com.google.protobuf.Struct value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder addRows( + int index, com.google.protobuf.Struct value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder addRows( + com.google.protobuf.Struct.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder addRows( + int index, com.google.protobuf.Struct.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public com.google.protobuf.Struct.Builder getRowsBuilder( + int index) { + return getRowsFieldBuilder().getBuilder(index); + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public com.google.protobuf.StructOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public com.google.protobuf.Struct.Builder addRowsBuilder() { + return getRowsFieldBuilder().addBuilder( + com.google.protobuf.Struct.getDefaultInstance()); + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public com.google.protobuf.Struct.Builder addRowsBuilder( + int index) { + return getRowsFieldBuilder().addBuilder( + index, com.google.protobuf.Struct.getDefaultInstance()); + } + /** + *
+     * Each row hold a query result in the format of `Struct`.
+     * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + public java.util.List + getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + rows_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + private com.google.cloud.asset.v1.TableSchema schema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TableSchema, com.google.cloud.asset.v1.TableSchema.Builder, com.google.cloud.asset.v1.TableSchemaOrBuilder> schemaBuilder_; + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + * @return Whether the schema field is set. + */ + public boolean hasSchema() { + return schemaBuilder_ != null || schema_ != null; + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + * @return The schema. + */ + public com.google.cloud.asset.v1.TableSchema getSchema() { + if (schemaBuilder_ == null) { + return schema_ == null ? com.google.cloud.asset.v1.TableSchema.getDefaultInstance() : schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + public Builder setSchema(com.google.cloud.asset.v1.TableSchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + schemaBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + public Builder setSchema( + com.google.cloud.asset.v1.TableSchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + public Builder mergeSchema(com.google.cloud.asset.v1.TableSchema value) { + if (schemaBuilder_ == null) { + if (schema_ != null) { + schema_ = + com.google.cloud.asset.v1.TableSchema.newBuilder(schema_).mergeFrom(value).buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + schemaBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + public Builder clearSchema() { + if (schemaBuilder_ == null) { + schema_ = null; + onChanged(); + } else { + schema_ = null; + schemaBuilder_ = null; + } + + return this; + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + public com.google.cloud.asset.v1.TableSchema.Builder getSchemaBuilder() { + + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + public com.google.cloud.asset.v1.TableSchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_ == null ? + com.google.cloud.asset.v1.TableSchema.getDefaultInstance() : schema_; + } + } + /** + *
+     * Describes the format of the [rows].
+     * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TableSchema, com.google.cloud.asset.v1.TableSchema.Builder, com.google.cloud.asset.v1.TableSchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TableSchema, com.google.cloud.asset.v1.TableSchema.Builder, com.google.cloud.asset.v1.TableSchemaOrBuilder>( + getSchema(), + getParentForChildren(), + isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of the results.
+     * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of the results.
+     * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of the results.
+     * 
+ * + * string next_page_token = 3; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of the results.
+     * 
+ * + * string next_page_token = 3; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of the results.
+     * 
+ * + * string next_page_token = 3; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private long totalRows_ ; + /** + *
+     * Total rows of the whole query results.
+     * 
+ * + * int64 total_rows = 4; + * @return The totalRows. + */ + @java.lang.Override + public long getTotalRows() { + return totalRows_; + } + /** + *
+     * Total rows of the whole query results.
+     * 
+ * + * int64 total_rows = 4; + * @param value The totalRows to set. + * @return This builder for chaining. + */ + public Builder setTotalRows(long value) { + + totalRows_ = value; + onChanged(); + return this; + } + /** + *
+     * Total rows of the whole query results.
+     * 
+ * + * int64 total_rows = 4; + * @return This builder for chaining. + */ + public Builder clearTotalRows() { + + totalRows_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryResult) + private static final com.google.cloud.asset.v1.QueryResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryResult(); + } + + public static com.google.cloud.asset.v1.QueryResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.QueryResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java new file mode 100644 index 000000000000..a811e4bcb818 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface QueryResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + java.util.List + getRowsList(); + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + com.google.protobuf.Struct getRows(int index); + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + int getRowsCount(); + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + java.util.List + getRowsOrBuilderList(); + /** + *
+   * Each row hold a query result in the format of `Struct`.
+   * 
+ * + * repeated .google.protobuf.Struct rows = 1; + */ + com.google.protobuf.StructOrBuilder getRowsOrBuilder( + int index); + + /** + *
+   * Describes the format of the [rows].
+   * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + * @return Whether the schema field is set. + */ + boolean hasSchema(); + /** + *
+   * Describes the format of the [rows].
+   * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + * @return The schema. + */ + com.google.cloud.asset.v1.TableSchema getSchema(); + /** + *
+   * Describes the format of the [rows].
+   * 
+ * + * .google.cloud.asset.v1.TableSchema schema = 2; + */ + com.google.cloud.asset.v1.TableSchemaOrBuilder getSchemaOrBuilder(); + + /** + *
+   * Token to retrieve the next page of the results.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of the results.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); + + /** + *
+   * Total rows of the whole query results.
+   * 
+ * + * int64 total_rows = 4; + * @return The totalRows. + */ + long getTotalRows(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java new file mode 100644 index 000000000000..b4dc113c8087 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java @@ -0,0 +1,1296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * An asset identifier in Google Cloud which contains its name, type and
+ * ancestors. An asset can be any resource in the Google Cloud [resource
+ * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+ * a resource outside the Google Cloud resource hierarchy (such as Google
+ * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+ * See [Supported asset
+ * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+ * for more information.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAsset} + */ +public final class RelatedAsset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedAsset) + RelatedAssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedAsset.newBuilder() to construct. + private RelatedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedAsset() { + asset_ = ""; + assetType_ = ""; + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + relationshipType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedAsset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelatedAsset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + asset_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ancestors_.add(s); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + relationshipType_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAsset.class, com.google.cloud.asset.v1.RelatedAsset.Builder.class); + } + + public static final int ASSET_FIELD_NUMBER = 1; + private volatile java.lang.Object asset_; + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The asset. + */ + @java.lang.Override + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } + } + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for asset. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANCESTORS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList ancestors_; + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_; + } + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + + public static final int RELATIONSHIP_TYPE_FIELD_NUMBER = 4; + private volatile java.lang.Object relationshipType_; + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string relationship_type = 4; + * @return The relationshipType. + */ + @java.lang.Override + public java.lang.String getRelationshipType() { + java.lang.Object ref = relationshipType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relationshipType_ = s; + return s; + } + } + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string relationship_type = 4; + * @return The bytes for relationshipType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRelationshipTypeBytes() { + java.lang.Object ref = relationshipType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationshipType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + for (int i = 0; i < ancestors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ancestors_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, relationshipType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + { + int dataSize = 0; + for (int i = 0; i < ancestors_.size(); i++) { + dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); + } + size += dataSize; + size += 1 * getAncestorsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, relationshipType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedAsset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedAsset other = (com.google.cloud.asset.v1.RelatedAsset) obj; + + if (!getAsset() + .equals(other.getAsset())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (!getAncestorsList() + .equals(other.getAncestorsList())) return false; + if (!getRelationshipType() + .equals(other.getRelationshipType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (getAncestorsCount() > 0) { + hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAncestorsList().hashCode(); + } + hash = (37 * hash) + RELATIONSHIP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAsset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedAsset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedAsset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset identifier in Google Cloud which contains its name, type and
+   * ancestors. An asset can be any resource in the Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * a resource outside the Google Cloud resource hierarchy (such as Google
+   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAsset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedAsset) + com.google.cloud.asset.v1.RelatedAssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAsset.class, com.google.cloud.asset.v1.RelatedAsset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedAsset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + asset_ = ""; + + assetType_ = ""; + + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + relationshipType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset build() { + com.google.cloud.asset.v1.RelatedAsset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset buildPartial() { + com.google.cloud.asset.v1.RelatedAsset result = new com.google.cloud.asset.v1.RelatedAsset(this); + int from_bitField0_ = bitField0_; + result.asset_ = asset_; + result.assetType_ = assetType_; + if (((bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ancestors_ = ancestors_; + result.relationshipType_ = relationshipType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedAsset) { + return mergeFrom((com.google.cloud.asset.v1.RelatedAsset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAsset other) { + if (other == com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()) return this; + if (!other.getAsset().isEmpty()) { + asset_ = other.asset_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.ancestors_.isEmpty()) { + if (ancestors_.isEmpty()) { + ancestors_ = other.ancestors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAncestorsIsMutable(); + ancestors_.addAll(other.ancestors_); + } + onChanged(); + } + if (!other.getRelationshipType().isEmpty()) { + relationshipType_ = other.relationshipType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedAsset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedAsset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object asset_ = ""; + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The asset. + */ + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for asset. + */ + public com.google.protobuf.ByteString + getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @param value The asset to set. + * @return This builder for chaining. + */ + public Builder setAsset( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + asset_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearAsset() { + + asset_ = getDefaultInstance().getAsset(); + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @param value The bytes for asset to set. + * @return This builder for chaining. + */ + public Builder setAssetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + asset_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAncestorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_.getUnmodifiableView(); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param index The index to set the value at. + * @param value The ancestors to set. + * @return This builder for chaining. + */ + public Builder setAncestors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param value The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param values The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAllAncestors( + java.lang.Iterable values) { + ensureAncestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ancestors_); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @return This builder for chaining. + */ + public Builder clearAncestors() { + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param value The bytes of the ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + + private java.lang.Object relationshipType_ = ""; + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string relationship_type = 4; + * @return The relationshipType. + */ + public java.lang.String getRelationshipType() { + java.lang.Object ref = relationshipType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relationshipType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string relationship_type = 4; + * @return The bytes for relationshipType. + */ + public com.google.protobuf.ByteString + getRelationshipTypeBytes() { + java.lang.Object ref = relationshipType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relationshipType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string relationship_type = 4; + * @param value The relationshipType to set. + * @return This builder for chaining. + */ + public Builder setRelationshipType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + relationshipType_ = value; + onChanged(); + return this; + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string relationship_type = 4; + * @return This builder for chaining. + */ + public Builder clearRelationshipType() { + + relationshipType_ = getDefaultInstance().getRelationshipType(); + onChanged(); + return this; + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string relationship_type = 4; + * @param value The bytes for relationshipType to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + relationshipType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedAsset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedAsset) + private static final com.google.cloud.asset.v1.RelatedAsset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedAsset(); + } + + public static com.google.cloud.asset.v1.RelatedAsset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedAsset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedAsset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java new file mode 100644 index 000000000000..da36685963fd --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java @@ -0,0 +1,142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelatedAssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedAsset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The asset. + */ + java.lang.String getAsset(); + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for asset. + */ + com.google.protobuf.ByteString + getAssetBytes(); + + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return A list containing the ancestors. + */ + java.util.List + getAncestorsList(); + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return The count of ancestors. + */ + int getAncestorsCount(); + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + java.lang.String getAncestors(int index); + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + com.google.protobuf.ByteString + getAncestorsBytes(int index); + + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string relationship_type = 4; + * @return The relationshipType. + */ + java.lang.String getRelationshipType(); + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string relationship_type = 4; + * @return The bytes for relationshipType. + */ + com.google.protobuf.ByteString + getRelationshipTypeBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java new file mode 100644 index 000000000000..bcba7ae024cd --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java @@ -0,0 +1,1114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * DEPRECATED. This message only presents for the purpose of
+ * backward-compatibility. The server will never populate this message in
+ * responses.
+ * The detailed related assets with the `relationship_type`.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAssets} + */ +@java.lang.Deprecated public final class RelatedAssets extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedAssets) + RelatedAssetsOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedAssets.newBuilder() to construct. + private RelatedAssets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedAssets() { + assets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedAssets(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelatedAssets( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.RelationshipAttributes.Builder subBuilder = null; + if (relationshipAttributes_ != null) { + subBuilder = relationshipAttributes_.toBuilder(); + } + relationshipAttributes_ = input.readMessage(com.google.cloud.asset.v1.RelationshipAttributes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relationshipAttributes_); + relationshipAttributes_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assets_.add( + input.readMessage(com.google.cloud.asset.v1.RelatedAsset.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAssets.class, com.google.cloud.asset.v1.RelatedAssets.Builder.class); + } + + public static final int RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.RelationshipAttributes relationshipAttributes_; + /** + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * @return Whether the relationshipAttributes field is set. + */ + @java.lang.Override + public boolean hasRelationshipAttributes() { + return relationshipAttributes_ != null; + } + /** + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * @return The relationshipAttributes. + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes() { + return relationshipAttributes_ == null ? com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; + } + /** + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { + return getRelationshipAttributes(); + } + + public static final int ASSETS_FIELD_NUMBER = 2; + private java.util.List assets_; + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset getAssets(int index) { + return assets_.get(index); + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder( + int index) { + return assets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relationshipAttributes_ != null) { + output.writeMessage(1, getRelationshipAttributes()); + } + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(2, assets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relationshipAttributes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRelationshipAttributes()); + } + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, assets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedAssets)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedAssets other = (com.google.cloud.asset.v1.RelatedAssets) obj; + + if (hasRelationshipAttributes() != other.hasRelationshipAttributes()) return false; + if (hasRelationshipAttributes()) { + if (!getRelationshipAttributes() + .equals(other.getRelationshipAttributes())) return false; + } + if (!getAssetsList() + .equals(other.getAssetsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRelationshipAttributes()) { + hash = (37 * hash) + RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipAttributes().hashCode(); + } + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAssets parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedAssets parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedAssets prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * DEPRECATED. This message only presents for the purpose of
+   * backward-compatibility. The server will never populate this message in
+   * responses.
+   * The detailed related assets with the `relationship_type`.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAssets} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedAssets) + com.google.cloud.asset.v1.RelatedAssetsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAssets.class, com.google.cloud.asset.v1.RelatedAssets.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedAssets.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAssetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = null; + } else { + relationshipAttributes_ = null; + relationshipAttributesBuilder_ = null; + } + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + assetsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets build() { + com.google.cloud.asset.v1.RelatedAssets result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets buildPartial() { + com.google.cloud.asset.v1.RelatedAssets result = new com.google.cloud.asset.v1.RelatedAssets(this); + int from_bitField0_ = bitField0_; + if (relationshipAttributesBuilder_ == null) { + result.relationshipAttributes_ = relationshipAttributes_; + } else { + result.relationshipAttributes_ = relationshipAttributesBuilder_.build(); + } + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedAssets) { + return mergeFrom((com.google.cloud.asset.v1.RelatedAssets)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAssets other) { + if (other == com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance()) return this; + if (other.hasRelationshipAttributes()) { + mergeRelationshipAttributes(other.getRelationshipAttributes()); + } + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssetsFieldBuilder() : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedAssets parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedAssets) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.asset.v1.RelationshipAttributes relationshipAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelationshipAttributes, com.google.cloud.asset.v1.RelationshipAttributes.Builder, com.google.cloud.asset.v1.RelationshipAttributesOrBuilder> relationshipAttributesBuilder_; + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * @return Whether the relationshipAttributes field is set. + */ + public boolean hasRelationshipAttributes() { + return relationshipAttributesBuilder_ != null || relationshipAttributes_ != null; + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * @return The relationshipAttributes. + */ + public com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes() { + if (relationshipAttributesBuilder_ == null) { + return relationshipAttributes_ == null ? com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; + } else { + return relationshipAttributesBuilder_.getMessage(); + } + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder setRelationshipAttributes(com.google.cloud.asset.v1.RelationshipAttributes value) { + if (relationshipAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationshipAttributes_ = value; + onChanged(); + } else { + relationshipAttributesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder setRelationshipAttributes( + com.google.cloud.asset.v1.RelationshipAttributes.Builder builderForValue) { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = builderForValue.build(); + onChanged(); + } else { + relationshipAttributesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder mergeRelationshipAttributes(com.google.cloud.asset.v1.RelationshipAttributes value) { + if (relationshipAttributesBuilder_ == null) { + if (relationshipAttributes_ != null) { + relationshipAttributes_ = + com.google.cloud.asset.v1.RelationshipAttributes.newBuilder(relationshipAttributes_).mergeFrom(value).buildPartial(); + } else { + relationshipAttributes_ = value; + } + onChanged(); + } else { + relationshipAttributesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder clearRelationshipAttributes() { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = null; + onChanged(); + } else { + relationshipAttributes_ = null; + relationshipAttributesBuilder_ = null; + } + + return this; + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public com.google.cloud.asset.v1.RelationshipAttributes.Builder getRelationshipAttributesBuilder() { + + onChanged(); + return getRelationshipAttributesFieldBuilder().getBuilder(); + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public com.google.cloud.asset.v1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { + if (relationshipAttributesBuilder_ != null) { + return relationshipAttributesBuilder_.getMessageOrBuilder(); + } else { + return relationshipAttributes_ == null ? + com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; + } + } + /** + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelationshipAttributes, com.google.cloud.asset.v1.RelationshipAttributes.Builder, com.google.cloud.asset.v1.RelationshipAttributesOrBuilder> + getRelationshipAttributesFieldBuilder() { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelationshipAttributes, com.google.cloud.asset.v1.RelationshipAttributes.Builder, com.google.cloud.asset.v1.RelationshipAttributesOrBuilder>( + getRelationshipAttributes(), + getParentForChildren(), + isClean()); + relationshipAttributes_ = null; + } + return relationshipAttributesBuilder_; + } + + private java.util.List assets_ = + java.util.Collections.emptyList(); + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> assetsBuilder_; + + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets( + com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset.Builder getAssetsBuilder( + int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder( + int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()); + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset.Builder addAssetsBuilder( + int index) { + return getAssetsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()); + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public java.util.List + getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder>( + assets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + assets_ = null; + } + return assetsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedAssets) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedAssets) + private static final com.google.cloud.asset.v1.RelatedAssets DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedAssets(); + } + + public static com.google.cloud.asset.v1.RelatedAssets getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedAssets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedAssets(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java new file mode 100644 index 000000000000..befe6f913733 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +@java.lang.Deprecated public interface RelatedAssetsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedAssets) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * @return Whether the relationshipAttributes field is set. + */ + boolean hasRelationshipAttributes(); + /** + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * @return The relationshipAttributes. + */ + com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes(); + /** + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + com.google.cloud.asset.v1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder(); + + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + java.util.List + getAssetsList(); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + com.google.cloud.asset.v1.RelatedAsset getAssets(int index); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + int getAssetsCount(); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + java.util.List + getAssetsOrBuilderList(); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java new file mode 100644 index 000000000000..0115c241102f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java @@ -0,0 +1,768 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * The detailed related resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResource} + */ +public final class RelatedResource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedResource) + RelatedResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedResource.newBuilder() to construct. + private RelatedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedResource() { + assetType_ = ""; + fullResourceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelatedResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fullResourceName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResource.class, com.google.cloud.asset.v1.RelatedResource.Builder.class); + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object fullResourceName_; + /** + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } + } + /** + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assetType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fullResourceName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, assetType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fullResourceName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedResource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedResource other = (com.google.cloud.asset.v1.RelatedResource) obj; + + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (!getFullResourceName() + .equals(other.getFullResourceName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedResource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The detailed related resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedResource) + com.google.cloud.asset.v1.RelatedResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResource.class, com.google.cloud.asset.v1.RelatedResource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + assetType_ = ""; + + fullResourceName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource build() { + com.google.cloud.asset.v1.RelatedResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource buildPartial() { + com.google.cloud.asset.v1.RelatedResource result = new com.google.cloud.asset.v1.RelatedResource(this); + result.assetType_ = assetType_; + result.fullResourceName_ = fullResourceName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedResource) { + return mergeFrom((com.google.cloud.asset.v1.RelatedResource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResource other) { + if (other == com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()) return this; + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string asset_type = 1; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private java.lang.Object fullResourceName_ = ""; + /** + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString + getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResourceName_ = value; + onChanged(); + return this; + } + /** + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + *
+     * The full resource name of the related resource. Example:
+     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+     * 
+ * + * string full_resource_name = 2; + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResourceName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedResource) + private static final com.google.cloud.asset.v1.RelatedResource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedResource(); + } + + public static com.google.cloud.asset.v1.RelatedResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java new file mode 100644 index 000000000000..4a184b2490d1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java @@ -0,0 +1,51 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelatedResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedResource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string asset_type = 1; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + *
+   * The full resource name of the related resource. Example:
+   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
+   * 
+ * + * string full_resource_name = 2; + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString + getFullResourceNameBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java new file mode 100644 index 000000000000..11125d9c1832 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * The related resources of the primary resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResources} + */ +public final class RelatedResources extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedResources) + RelatedResourcesOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedResources.newBuilder() to construct. + private RelatedResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedResources() { + relatedResources_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedResources(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelatedResources( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + relatedResources_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + relatedResources_.add( + input.readMessage(com.google.cloud.asset.v1.RelatedResource.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + relatedResources_ = java.util.Collections.unmodifiableList(relatedResources_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResources.class, com.google.cloud.asset.v1.RelatedResources.Builder.class); + } + + public static final int RELATED_RESOURCES_FIELD_NUMBER = 1; + private java.util.List relatedResources_; + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public java.util.List getRelatedResourcesList() { + return relatedResources_; + } + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public java.util.List + getRelatedResourcesOrBuilderList() { + return relatedResources_; + } + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public int getRelatedResourcesCount() { + return relatedResources_.size(); + } + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index) { + return relatedResources_.get(index); + } + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( + int index) { + return relatedResources_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < relatedResources_.size(); i++) { + output.writeMessage(1, relatedResources_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < relatedResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, relatedResources_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedResources)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedResources other = (com.google.cloud.asset.v1.RelatedResources) obj; + + if (!getRelatedResourcesList() + .equals(other.getRelatedResourcesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRelatedResourcesCount() > 0) { + hash = (37 * hash) + RELATED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getRelatedResourcesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResources parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedResources parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelatedResources parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedResources prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The related resources of the primary resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedResources} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedResources) + com.google.cloud.asset.v1.RelatedResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedResources.class, com.google.cloud.asset.v1.RelatedResources.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedResources.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getRelatedResourcesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (relatedResourcesBuilder_ == null) { + relatedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + relatedResourcesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedResources.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources build() { + com.google.cloud.asset.v1.RelatedResources result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources buildPartial() { + com.google.cloud.asset.v1.RelatedResources result = new com.google.cloud.asset.v1.RelatedResources(this); + int from_bitField0_ = bitField0_; + if (relatedResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + relatedResources_ = java.util.Collections.unmodifiableList(relatedResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.relatedResources_ = relatedResources_; + } else { + result.relatedResources_ = relatedResourcesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedResources) { + return mergeFrom((com.google.cloud.asset.v1.RelatedResources)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResources other) { + if (other == com.google.cloud.asset.v1.RelatedResources.getDefaultInstance()) return this; + if (relatedResourcesBuilder_ == null) { + if (!other.relatedResources_.isEmpty()) { + if (relatedResources_.isEmpty()) { + relatedResources_ = other.relatedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRelatedResourcesIsMutable(); + relatedResources_.addAll(other.relatedResources_); + } + onChanged(); + } + } else { + if (!other.relatedResources_.isEmpty()) { + if (relatedResourcesBuilder_.isEmpty()) { + relatedResourcesBuilder_.dispose(); + relatedResourcesBuilder_ = null; + relatedResources_ = other.relatedResources_; + bitField0_ = (bitField0_ & ~0x00000001); + relatedResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRelatedResourcesFieldBuilder() : null; + } else { + relatedResourcesBuilder_.addAllMessages(other.relatedResources_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedResources parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedResources) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List relatedResources_ = + java.util.Collections.emptyList(); + private void ensureRelatedResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + relatedResources_ = new java.util.ArrayList(relatedResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedResource, com.google.cloud.asset.v1.RelatedResource.Builder, com.google.cloud.asset.v1.RelatedResourceOrBuilder> relatedResourcesBuilder_; + + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public java.util.List getRelatedResourcesList() { + if (relatedResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(relatedResources_); + } else { + return relatedResourcesBuilder_.getMessageList(); + } + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public int getRelatedResourcesCount() { + if (relatedResourcesBuilder_ == null) { + return relatedResources_.size(); + } else { + return relatedResourcesBuilder_.getCount(); + } + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index) { + if (relatedResourcesBuilder_ == null) { + return relatedResources_.get(index); + } else { + return relatedResourcesBuilder_.getMessage(index); + } + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder setRelatedResources( + int index, com.google.cloud.asset.v1.RelatedResource value) { + if (relatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedResourcesIsMutable(); + relatedResources_.set(index, value); + onChanged(); + } else { + relatedResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder setRelatedResources( + int index, com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.set(index, builderForValue.build()); + onChanged(); + } else { + relatedResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources(com.google.cloud.asset.v1.RelatedResource value) { + if (relatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedResourcesIsMutable(); + relatedResources_.add(value); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources( + int index, com.google.cloud.asset.v1.RelatedResource value) { + if (relatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelatedResourcesIsMutable(); + relatedResources_.add(index, value); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources( + com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.add(builderForValue.build()); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addRelatedResources( + int index, com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.add(index, builderForValue.build()); + onChanged(); + } else { + relatedResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder addAllRelatedResources( + java.lang.Iterable values) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relatedResources_); + onChanged(); + } else { + relatedResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder clearRelatedResources() { + if (relatedResourcesBuilder_ == null) { + relatedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + relatedResourcesBuilder_.clear(); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public Builder removeRelatedResources(int index) { + if (relatedResourcesBuilder_ == null) { + ensureRelatedResourcesIsMutable(); + relatedResources_.remove(index); + onChanged(); + } else { + relatedResourcesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource.Builder getRelatedResourcesBuilder( + int index) { + return getRelatedResourcesFieldBuilder().getBuilder(index); + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( + int index) { + if (relatedResourcesBuilder_ == null) { + return relatedResources_.get(index); } else { + return relatedResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public java.util.List + getRelatedResourcesOrBuilderList() { + if (relatedResourcesBuilder_ != null) { + return relatedResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(relatedResources_); + } + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource.Builder addRelatedResourcesBuilder() { + return getRelatedResourcesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()); + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public com.google.cloud.asset.v1.RelatedResource.Builder addRelatedResourcesBuilder( + int index) { + return getRelatedResourcesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()); + } + /** + *
+     * The detailed related resources of the primary resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + public java.util.List + getRelatedResourcesBuilderList() { + return getRelatedResourcesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedResource, com.google.cloud.asset.v1.RelatedResource.Builder, com.google.cloud.asset.v1.RelatedResourceOrBuilder> + getRelatedResourcesFieldBuilder() { + if (relatedResourcesBuilder_ == null) { + relatedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedResource, com.google.cloud.asset.v1.RelatedResource.Builder, com.google.cloud.asset.v1.RelatedResourceOrBuilder>( + relatedResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + relatedResources_ = null; + } + return relatedResourcesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedResources) + private static final com.google.cloud.asset.v1.RelatedResources DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedResources(); + } + + public static com.google.cloud.asset.v1.RelatedResources getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedResources(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedResources getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java new file mode 100644 index 000000000000..10384ab80468 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelatedResourcesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedResources) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + java.util.List + getRelatedResourcesList(); + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index); + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + int getRelatedResourcesCount(); + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + java.util.List + getRelatedResourcesOrBuilderList(); + /** + *
+   * The detailed related resources of the primary resource.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; + */ + com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java new file mode 100644 index 000000000000..d89053a3d5ed --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java @@ -0,0 +1,1108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * DEPRECATED. This message only presents for the purpose of
+ * backward-compatibility. The server will never populate this message in
+ * responses.
+ * The relationship attributes which include  `type`, `source_resource_type`,
+ * `target_resource_type` and `action`.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelationshipAttributes} + */ +@java.lang.Deprecated public final class RelationshipAttributes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelationshipAttributes) + RelationshipAttributesOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelationshipAttributes.newBuilder() to construct. + private RelationshipAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelationshipAttributes() { + type_ = ""; + sourceResourceType_ = ""; + targetResourceType_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelationshipAttributes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelationshipAttributes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + sourceResourceType_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + targetResourceType_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + action_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelationshipAttributes.class, com.google.cloud.asset.v1.RelationshipAttributes.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 4; + private volatile java.lang.Object type_; + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_RESOURCE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceResourceType_; + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The sourceResourceType. + */ + @java.lang.Override + public java.lang.String getSourceResourceType() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceResourceType_ = s; + return s; + } + } + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The bytes for sourceResourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceResourceTypeBytes() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_RESOURCE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object targetResourceType_; + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The targetResourceType. + */ + @java.lang.Override + public java.lang.String getTargetResourceType() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResourceType_ = s; + return s; + } + } + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The bytes for targetResourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetResourceTypeBytes() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 3; + private volatile java.lang.Object action_; + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } + } + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelationshipAttributes)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelationshipAttributes other = (com.google.cloud.asset.v1.RelationshipAttributes) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getSourceResourceType() + .equals(other.getSourceResourceType())) return false; + if (!getTargetResourceType() + .equals(other.getTargetResourceType())) return false; + if (!getAction() + .equals(other.getAction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SOURCE_RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSourceResourceType().hashCode(); + hash = (37 * hash) + TARGET_RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTargetResourceType().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.RelationshipAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * DEPRECATED. This message only presents for the purpose of
+   * backward-compatibility. The server will never populate this message in
+   * responses.
+   * The relationship attributes which include  `type`, `source_resource_type`,
+   * `target_resource_type` and `action`.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelationshipAttributes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelationshipAttributes) + com.google.cloud.asset.v1.RelationshipAttributesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelationshipAttributes.class, com.google.cloud.asset.v1.RelationshipAttributes.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelationshipAttributes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + sourceResourceType_ = ""; + + targetResourceType_ = ""; + + action_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes build() { + com.google.cloud.asset.v1.RelationshipAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes buildPartial() { + com.google.cloud.asset.v1.RelationshipAttributes result = new com.google.cloud.asset.v1.RelationshipAttributes(this); + result.type_ = type_; + result.sourceResourceType_ = sourceResourceType_; + result.targetResourceType_ = targetResourceType_; + result.action_ = action_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelationshipAttributes) { + return mergeFrom((com.google.cloud.asset.v1.RelationshipAttributes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelationshipAttributes other) { + if (other == com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getSourceResourceType().isEmpty()) { + sourceResourceType_ = other.sourceResourceType_; + onChanged(); + } + if (!other.getTargetResourceType().isEmpty()) { + targetResourceType_ = other.targetResourceType_; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelationshipAttributes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelationshipAttributes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceResourceType_ = ""; + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @return The sourceResourceType. + */ + public java.lang.String getSourceResourceType() { + java.lang.Object ref = sourceResourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceResourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @return The bytes for sourceResourceType. + */ + public com.google.protobuf.ByteString + getSourceResourceTypeBytes() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @param value The sourceResourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceResourceType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceResourceType_ = value; + onChanged(); + return this; + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @return This builder for chaining. + */ + public Builder clearSourceResourceType() { + + sourceResourceType_ = getDefaultInstance().getSourceResourceType(); + onChanged(); + return this; + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @param value The bytes for sourceResourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceResourceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceResourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetResourceType_ = ""; + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @return The targetResourceType. + */ + public java.lang.String getTargetResourceType() { + java.lang.Object ref = targetResourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @return The bytes for targetResourceType. + */ + public com.google.protobuf.ByteString + getTargetResourceTypeBytes() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @param value The targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetResourceType_ = value; + onChanged(); + return this; + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @return This builder for chaining. + */ + public Builder clearTargetResourceType() { + + targetResourceType_ = getDefaultInstance().getTargetResourceType(); + onChanged(); + return this; + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @param value The bytes for targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetResourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @return The bytes for action. + */ + public com.google.protobuf.ByteString + getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value; + onChanged(); + return this; + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = getDefaultInstance().getAction(); + onChanged(); + return this; + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + action_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelationshipAttributes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelationshipAttributes) + private static final com.google.cloud.asset.v1.RelationshipAttributes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelationshipAttributes(); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelationshipAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelationshipAttributes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java new file mode 100644 index 000000000000..5030889b1b69 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +@java.lang.Deprecated public interface RelationshipAttributesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelationshipAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The sourceResourceType. + */ + java.lang.String getSourceResourceType(); + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The bytes for sourceResourceType. + */ + com.google.protobuf.ByteString + getSourceResourceTypeBytes(); + + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The targetResourceType. + */ + java.lang.String getTargetResourceType(); + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The bytes for targetResourceType. + */ + com.google.protobuf.ByteString + getTargetResourceTypeBytes(); + + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The action. + */ + java.lang.String getAction(); + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The bytes for action. + */ + com.google.protobuf.ByteString + getActionBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java new file mode 100644 index 000000000000..d35dadf4f5b3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java @@ -0,0 +1,1813 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A representation of a Google Cloud resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.Resource} + */ +public final class Resource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.Resource) + ResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Resource() { + version_ = ""; + discoveryDocumentUri_ = ""; + discoveryName_ = ""; + resourceUrl_ = ""; + parent_ = ""; + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Resource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryDocumentUri_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUrl_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 50: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (data_ != null) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + location_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.Resource.class, com.google.cloud.asset.v1.Resource.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object discoveryDocumentUri_; + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + @java.lang.Override + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } + } + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object discoveryName_; + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + @java.lang.Override + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } + } + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object resourceUrl_; + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + @java.lang.Override + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } + } + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 5; + private volatile java.lang.Object parent_; + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 6; + private com.google.protobuf.Struct data_; + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return data_ != null; + } + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.Struct getData() { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + return getData(); + } + + public static final int LOCATION_FIELD_NUMBER = 8; + private volatile java.lang.Object location_; + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); + } + if (data_ != null) { + output.writeMessage(6, getData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, location_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); + } + if (data_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, location_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.Resource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.Resource other = (com.google.cloud.asset.v1.Resource) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getDiscoveryDocumentUri() + .equals(other.getDiscoveryDocumentUri())) return false; + if (!getDiscoveryName() + .equals(other.getDiscoveryName())) return false; + if (!getResourceUrl() + .equals(other.getResourceUrl())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData() + .equals(other.getData())) return false; + } + if (!getLocation() + .equals(other.getLocation())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); + hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryName().hashCode(); + hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResourceUrl().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.Resource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Resource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Resource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.Resource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.Resource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Resource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.Resource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Resource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.Resource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.Resource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.Resource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A representation of a Google Cloud resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.Resource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.Resource) + com.google.cloud.asset.v1.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.Resource.class, com.google.cloud.asset.v1.Resource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.Resource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + discoveryDocumentUri_ = ""; + + discoveryName_ = ""; + + resourceUrl_ = ""; + + parent_ = ""; + + if (dataBuilder_ == null) { + data_ = null; + } else { + data_ = null; + dataBuilder_ = null; + } + location_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Resource getDefaultInstanceForType() { + return com.google.cloud.asset.v1.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.Resource build() { + com.google.cloud.asset.v1.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Resource buildPartial() { + com.google.cloud.asset.v1.Resource result = new com.google.cloud.asset.v1.Resource(this); + result.version_ = version_; + result.discoveryDocumentUri_ = discoveryDocumentUri_; + result.discoveryName_ = discoveryName_; + result.resourceUrl_ = resourceUrl_; + result.parent_ = parent_; + if (dataBuilder_ == null) { + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + result.location_ = location_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.Resource) { + return mergeFrom((com.google.cloud.asset.v1.Resource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.Resource other) { + if (other == com.google.cloud.asset.v1.Resource.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getDiscoveryDocumentUri().isEmpty()) { + discoveryDocumentUri_ = other.discoveryDocumentUri_; + onChanged(); + } + if (!other.getDiscoveryName().isEmpty()) { + discoveryName_ = other.discoveryName_; + onChanged(); + } + if (!other.getResourceUrl().isEmpty()) { + resourceUrl_ = other.resourceUrl_; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasData()) { + mergeData(other.getData()); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryDocumentUri_ = ""; + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return This builder for chaining. + */ + public Builder clearDiscoveryDocumentUri() { + + discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The bytes for discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryName_ = ""; + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @param value The discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryName_ = value; + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @return This builder for chaining. + */ + public Builder clearDiscoveryName() { + + discoveryName_ = getDefaultInstance().getDiscoveryName(); + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @param value The bytes for discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryName_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceUrl_ = ""; + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUrl_ = value; + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return This builder for chaining. + */ + public Builder clearResourceUrl() { + + resourceUrl_ = getDefaultInstance().getResourceUrl(); + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The bytes for resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct data_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + public boolean hasData() { + return dataBuilder_ != null || data_ != null; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + public com.google.protobuf.Struct getData() { + if (dataBuilder_ == null) { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData( + com.google.protobuf.Struct.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder mergeData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (data_ != null) { + data_ = + com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + dataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = null; + onChanged(); + } else { + data_ = null; + dataBuilder_ = null; + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.Struct.Builder getDataBuilder() { + + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : data_; + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getData(), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + + private java.lang.Object location_ = ""; + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @return The bytes for location. + */ + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Resource) + private static final com.google.cloud.asset.v1.Resource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.Resource(); + } + + public static com.google.cloud.asset.v1.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java new file mode 100644 index 000000000000..ba179d56e8d2 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java @@ -0,0 +1,199 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface ResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + java.lang.String getDiscoveryDocumentUri(); + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes(); + + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + java.lang.String getDiscoveryName(); + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + com.google.protobuf.ByteString + getDiscoveryNameBytes(); + + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + java.lang.String getResourceUrl(); + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + com.google.protobuf.ByteString + getResourceUrlBytes(); + + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + boolean hasData(); + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + com.google.protobuf.Struct getData(); + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + com.google.protobuf.StructOrBuilder getDataOrBuilder(); + + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The location. + */ + java.lang.String getLocation(); + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The bytes for location. + */ + com.google.protobuf.ByteString + getLocationBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java new file mode 100644 index 000000000000..6c2e3b4f661a --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java @@ -0,0 +1,7406 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A result of Resource Search, containing information of a cloud resource.
+ * Next ID: 29
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ResourceSearchResult} + */ +public final class ResourceSearchResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ResourceSearchResult) + ResourceSearchResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResourceSearchResult.newBuilder() to construct. + private ResourceSearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceSearchResult() { + name_ = ""; + assetType_ = ""; + project_ = ""; + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + organization_ = ""; + displayName_ = ""; + description_ = ""; + location_ = ""; + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + kmsKey_ = ""; + state_ = ""; + parentFullResourceName_ = ""; + versionedResources_ = java.util.Collections.emptyList(); + attachedResources_ = java.util.Collections.emptyList(); + tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + parentAssetType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceSearchResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResourceSearchResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + location_ = s; + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + networkTags_.add(s); + break; + } + case 74: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (additionalAttributes_ != null) { + subBuilder = additionalAttributes_.toBuilder(); + } + additionalAttributes_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(additionalAttributes_); + additionalAttributes_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKey_ = s; + break; + } + case 90: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + + state_ = s; + break; + } + case 130: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + versionedResources_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + versionedResources_.add( + input.readMessage(com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry)); + break; + } + case 138: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + folders_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + folders_.add(s); + break; + } + case 146: { + java.lang.String s = input.readStringRequireUtf8(); + + organization_ = s; + break; + } + case 154: { + java.lang.String s = input.readStringRequireUtf8(); + + parentFullResourceName_ = s; + break; + } + case 162: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + attachedResources_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + attachedResources_.add( + input.readMessage(com.google.cloud.asset.v1.AttachedResource.parser(), extensionRegistry)); + break; + } + case 170: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + relationships_ = com.google.protobuf.MapField.newMapField( + RelationshipsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000020; + } + com.google.protobuf.MapEntry + relationships__ = input.readMessage( + RelationshipsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + relationships_.getMutableMap().put( + relationships__.getKey(), relationships__.getValue()); + break; + } + case 186: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000040) != 0)) { + tagKeys_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000040; + } + tagKeys_.add(s); + break; + } + case 202: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000080) != 0)) { + tagValues_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000080; + } + tagValues_.add(s); + break; + } + case 210: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000100) != 0)) { + tagValueIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000100; + } + tagValueIds_.add(s); + break; + } + case 826: { + java.lang.String s = input.readStringRequireUtf8(); + + parentAssetType_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); + } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + folders_ = folders_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + attachedResources_ = java.util.Collections.unmodifiableList(attachedResources_); + } + if (((mutable_bitField0_ & 0x00000040) != 0)) { + tagKeys_ = tagKeys_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000080) != 0)) { + tagValues_ = tagValues_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000100) != 0)) { + tagValueIds_ = tagValueIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + case 21: + return internalGetRelationships(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ResourceSearchResult.class, com.google.cloud.asset.v1.ResourceSearchResult.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The full resource name of this resource. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `name`:
+   * * use a field query. Example: `name:instance1`
+   * * use a free text query. Example: `instance1`
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The full resource name of this resource. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `name`:
+   * * use a field query. Example: `name:instance1`
+   * * use a free text query. Example: `instance1`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of this resource. Example: `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_type` field in your search request.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of this resource. Example: `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_type` field in your search request.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_FIELD_NUMBER = 3; + private volatile java.lang.Object project_; + /** + *
+   * The project that this resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. This field is available when the resource
+   * belongs to a project.
+   * To search against `project`:
+   * * use a field query. Example: `project:12345`
+   * * use a free text query. Example: `12345`
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 3; + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + *
+   * The project that this resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. This field is available when the resource
+   * belongs to a project.
+   * To search against `project`:
+   * * use a field query. Example: `project:12345`
+   * * use a free text query. Example: `12345`
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 3; + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FOLDERS_FIELD_NUMBER = 17; + private com.google.protobuf.LazyStringList folders_; + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @return A list containing the folders. + */ + public com.google.protobuf.ProtocolStringList + getFoldersList() { + return folders_; + } + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @return The count of folders. + */ + public int getFoldersCount() { + return folders_.size(); + } + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @param index The index of the element to return. + * @return The folders at the given index. + */ + public java.lang.String getFolders(int index) { + return folders_.get(index); + } + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + public com.google.protobuf.ByteString + getFoldersBytes(int index) { + return folders_.getByteString(index); + } + + public static final int ORGANIZATION_FIELD_NUMBER = 18; + private volatile java.lang.Object organization_; + /** + *
+   * The organization that this resource belongs to, in the form of
+   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * resource belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 18; + * @return The organization. + */ + @java.lang.Override + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } + } + /** + *
+   * The organization that this resource belongs to, in the form of
+   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * resource belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 18; + * @return The bytes for organization. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object displayName_; + /** + *
+   * The display name of this resource. This field is available only when the
+   * resource's Protobuf contains it.
+   * To search against the `display_name`:
+   * * use a field query. Example: `displayName:"My Instance"`
+   * * use a free text query. Example: `"My Instance"`
+   * 
+ * + * string display_name = 4; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The display name of this resource. This field is available only when the
+   * resource's Protobuf contains it.
+   * To search against the `display_name`:
+   * * use a field query. Example: `displayName:"My Instance"`
+   * * use a free text query. Example: `"My Instance"`
+   * 
+ * + * string display_name = 4; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + private volatile java.lang.Object description_; + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `description`:
+   * * use a field query. Example: `description:"important instance"`
+   * * use a free text query. Example: `"important instance"`
+   * 
+ * + * string description = 5; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `description`:
+   * * use a field query. Example: `description:"important instance"`
+   * * use a free text query. Example: `"important instance"`
+   * 
+ * + * string description = 5; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 6; + private volatile java.lang.Object location_; + /** + *
+   * Location can be `global`, regional like `us-east1`, or zonal like
+   * `us-west1-b`. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against the `location`:
+   * * use a field query. Example: `location:us-west*`
+   * * use a free text query. Example: `us-west*`
+   * 
+ * + * string location = 6; + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + *
+   * Location can be `global`, regional like `us-east1`, or zonal like
+   * `us-west1-b`. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against the `location`:
+   * * use a field query. Example: `location:us-west*`
+   * * use a free text query. Example: `us-west*`
+   * 
+ * + * string location = 6; + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 7; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList networkTags_; + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList + getNetworkTagsList() { + return networkTags_; + } + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString + getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + public static final int KMS_KEY_FIELD_NUMBER = 10; + private volatile java.lang.Object kmsKey_; + /** + *
+   * The Cloud KMS
+   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+   * name or
+   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+   * name. This field is available only when the resource's Protobuf contains
+   * it.
+   * To search against the `kms_key`:
+   * * use a field query. Example: `kmsKey:key`
+   * * use a free text query. Example: `key`
+   * 
+ * + * string kms_key = 10; + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } + } + /** + *
+   * The Cloud KMS
+   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+   * name or
+   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+   * name. This field is available only when the resource's Protobuf contains
+   * it.
+   * To search against the `kms_key`:
+   * * use a field query. Example: `kmsKey:key`
+   * * use a free text query. Example: `key`
+   * 
+ * + * string kms_key = 10; + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * The create timestamp of this resource, at which the resource was created.
+   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+   * is available only when the resource's Protobuf contains it.
+   * To search against `create_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+   *     - value in date string. Example: `createTime > 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `createTime >
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * The create timestamp of this resource, at which the resource was created.
+   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+   * is available only when the resource's Protobuf contains it.
+   * To search against `create_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+   *     - value in date string. Example: `createTime > 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `createTime >
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * The create timestamp of this resource, at which the resource was created.
+   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+   * is available only when the resource's Protobuf contains it.
+   * To search against `create_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+   *     - value in date string. Example: `createTime > 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `createTime >
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The last update timestamp of this resource, at which the resource was last
+   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+   * always be 0. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against `update_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+   *     - value in date string. Example: `updateTime < 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `updateTime <
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * The last update timestamp of this resource, at which the resource was last
+   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+   * always be 0. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against `update_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+   *     - value in date string. Example: `updateTime < 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `updateTime <
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The last update timestamp of this resource, at which the resource was last
+   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+   * always be 0. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against `update_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+   *     - value in date string. Example: `updateTime < 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `updateTime <
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 13; + private volatile java.lang.Object state_; + /** + *
+   * The state of this resource. Different resources types have different state
+   * definitions that are mapped from various fields of different resource
+   * types. This field is available only when the resource's Protobuf contains
+   * it.
+   * Example:
+   * If the resource is an instance provided by Compute Engine,
+   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+   * in [API
+   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+   * If the resource is a project provided by Cloud Resource Manager, its state
+   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+   * To search against the `state`:
+   * * use a field query. Example: `state:RUNNING`
+   * * use a free text query. Example: `RUNNING`
+   * 
+ * + * string state = 13; + * @return The state. + */ + @java.lang.Override + public java.lang.String getState() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + state_ = s; + return s; + } + } + /** + *
+   * The state of this resource. Different resources types have different state
+   * definitions that are mapped from various fields of different resource
+   * types. This field is available only when the resource's Protobuf contains
+   * it.
+   * Example:
+   * If the resource is an instance provided by Compute Engine,
+   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+   * in [API
+   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+   * If the resource is a project provided by Cloud Resource Manager, its state
+   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+   * To search against the `state`:
+   * * use a field query. Example: `state:RUNNING`
+   * * use a free text query. Example: `RUNNING`
+   * 
+ * + * string state = 13; + * @return The bytes for state. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDITIONAL_ATTRIBUTES_FIELD_NUMBER = 9; + private com.google.protobuf.Struct additionalAttributes_; + /** + *
+   * The additional searchable attributes of this resource. The attributes may
+   * vary from one resource type to another. Examples: `projectId` for Project,
+   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+   * metadata fields that are returned by the List or Get APIs provided by the
+   * corresponding GCP service (e.g., Compute Engine). see [API references and
+   * supported searchable
+   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+   * to see which fields are included.
+   * You can search values of these fields through free text search. However,
+   * you should not consume the field programically as the field names and
+   * values may change as the GCP service updates to a new incompatible API
+   * version.
+   * To search against the `additional_attributes`:
+   * * use a free text query to match the attributes values. Example: to search
+   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+   *   `foobar`.
+   * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + * @return Whether the additionalAttributes field is set. + */ + @java.lang.Override + public boolean hasAdditionalAttributes() { + return additionalAttributes_ != null; + } + /** + *
+   * The additional searchable attributes of this resource. The attributes may
+   * vary from one resource type to another. Examples: `projectId` for Project,
+   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+   * metadata fields that are returned by the List or Get APIs provided by the
+   * corresponding GCP service (e.g., Compute Engine). see [API references and
+   * supported searchable
+   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+   * to see which fields are included.
+   * You can search values of these fields through free text search. However,
+   * you should not consume the field programically as the field names and
+   * values may change as the GCP service updates to a new incompatible API
+   * version.
+   * To search against the `additional_attributes`:
+   * * use a free text query to match the attributes values. Example: to search
+   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+   *   `foobar`.
+   * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + * @return The additionalAttributes. + */ + @java.lang.Override + public com.google.protobuf.Struct getAdditionalAttributes() { + return additionalAttributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : additionalAttributes_; + } + /** + *
+   * The additional searchable attributes of this resource. The attributes may
+   * vary from one resource type to another. Examples: `projectId` for Project,
+   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+   * metadata fields that are returned by the List or Get APIs provided by the
+   * corresponding GCP service (e.g., Compute Engine). see [API references and
+   * supported searchable
+   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+   * to see which fields are included.
+   * You can search values of these fields through free text search. However,
+   * you should not consume the field programically as the field names and
+   * values may change as the GCP service updates to a new incompatible API
+   * version.
+   * To search against the `additional_attributes`:
+   * * use a free text query to match the attributes values. Example: to search
+   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+   *   `foobar`.
+   * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { + return getAdditionalAttributes(); + } + + public static final int PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER = 19; + private volatile java.lang.Object parentFullResourceName_; + /** + *
+   * The full resource name of this resource's parent, if it has one.
+   * To search against the `parent_full_resource_name`:
+   * * use a field query. Example:
+   * `parentFullResourceName:"project-name"`
+   * * use a free text query. Example:
+   * `project-name`
+   * 
+ * + * string parent_full_resource_name = 19; + * @return The parentFullResourceName. + */ + @java.lang.Override + public java.lang.String getParentFullResourceName() { + java.lang.Object ref = parentFullResourceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentFullResourceName_ = s; + return s; + } + } + /** + *
+   * The full resource name of this resource's parent, if it has one.
+   * To search against the `parent_full_resource_name`:
+   * * use a field query. Example:
+   * `parentFullResourceName:"project-name"`
+   * * use a free text query. Example:
+   * `project-name`
+   * 
+ * + * string parent_full_resource_name = 19; + * @return The bytes for parentFullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentFullResourceNameBytes() { + java.lang.Object ref = parentFullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentFullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSIONED_RESOURCES_FIELD_NUMBER = 16; + private java.util.List versionedResources_; + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + @java.lang.Override + public java.util.List getVersionedResourcesList() { + return versionedResources_; + } + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + @java.lang.Override + public java.util.List + getVersionedResourcesOrBuilderList() { + return versionedResources_; + } + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + @java.lang.Override + public int getVersionedResourcesCount() { + return versionedResources_.size(); + } + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { + return versionedResources_.get(index); + } + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( + int index) { + return versionedResources_.get(index); + } + + public static final int ATTACHED_RESOURCES_FIELD_NUMBER = 20; + private java.util.List attachedResources_; + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + @java.lang.Override + public java.util.List getAttachedResourcesList() { + return attachedResources_; + } + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + @java.lang.Override + public java.util.List + getAttachedResourcesOrBuilderList() { + return attachedResources_; + } + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + @java.lang.Override + public int getAttachedResourcesCount() { + return attachedResources_.size(); + } + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index) { + return attachedResources_.get(index); + } + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder( + int index) { + return attachedResources_.get(index); + } + + public static final int RELATIONSHIPS_FIELD_NUMBER = 21; + private static final class RelationshipsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.asset.v1.RelatedResources.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> relationships_; + private com.google.protobuf.MapField + internalGetRelationships() { + if (relationships_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RelationshipsDefaultEntryHolder.defaultEntry); + } + return relationships_; + } + + public int getRelationshipsCount() { + return internalGetRelationships().getMap().size(); + } + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + + @java.lang.Override + public boolean containsRelationships( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRelationships().getMap().containsKey(key); + } + /** + * Use {@link #getRelationshipsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRelationships() { + return getRelationshipsMap(); + } + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + + public java.util.Map getRelationshipsMap() { + return internalGetRelationships().getMap(); + } + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( + java.lang.String key, + com.google.cloud.asset.v1.RelatedResources defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRelationships().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRelationships().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TAG_KEYS_FIELD_NUMBER = 23; + private com.google.protobuf.LazyStringList tagKeys_; + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @return A list containing the tagKeys. + */ + public com.google.protobuf.ProtocolStringList + getTagKeysList() { + return tagKeys_; + } + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @return The count of tagKeys. + */ + public int getTagKeysCount() { + return tagKeys_.size(); + } + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @param index The index of the element to return. + * @return The tagKeys at the given index. + */ + public java.lang.String getTagKeys(int index) { + return tagKeys_.get(index); + } + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @param index The index of the value to return. + * @return The bytes of the tagKeys at the given index. + */ + public com.google.protobuf.ByteString + getTagKeysBytes(int index) { + return tagKeys_.getByteString(index); + } + + public static final int TAG_VALUES_FIELD_NUMBER = 25; + private com.google.protobuf.LazyStringList tagValues_; + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @return A list containing the tagValues. + */ + public com.google.protobuf.ProtocolStringList + getTagValuesList() { + return tagValues_; + } + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @return The count of tagValues. + */ + public int getTagValuesCount() { + return tagValues_.size(); + } + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @param index The index of the element to return. + * @return The tagValues at the given index. + */ + public java.lang.String getTagValues(int index) { + return tagValues_.get(index); + } + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @param index The index of the value to return. + * @return The bytes of the tagValues at the given index. + */ + public com.google.protobuf.ByteString + getTagValuesBytes(int index) { + return tagValues_.getByteString(index); + } + + public static final int TAG_VALUE_IDS_FIELD_NUMBER = 26; + private com.google.protobuf.LazyStringList tagValueIds_; + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @return A list containing the tagValueIds. + */ + public com.google.protobuf.ProtocolStringList + getTagValueIdsList() { + return tagValueIds_; + } + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @return The count of tagValueIds. + */ + public int getTagValueIdsCount() { + return tagValueIds_.size(); + } + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @param index The index of the element to return. + * @return The tagValueIds at the given index. + */ + public java.lang.String getTagValueIds(int index) { + return tagValueIds_.get(index); + } + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @param index The index of the value to return. + * @return The bytes of the tagValueIds at the given index. + */ + public com.google.protobuf.ByteString + getTagValueIdsBytes(int index) { + return tagValueIds_.getByteString(index); + } + + public static final int PARENT_ASSET_TYPE_FIELD_NUMBER = 103; + private volatile java.lang.Object parentAssetType_; + /** + *
+   * The type of this resource's immediate parent, if there is one.
+   * To search against the `parent_asset_type`:
+   * * use a field query. Example:
+   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+   * * use a free text query. Example:
+   * `cloudresourcemanager.googleapis.com/Project`
+   * 
+ * + * string parent_asset_type = 103; + * @return The parentAssetType. + */ + @java.lang.Override + public java.lang.String getParentAssetType() { + java.lang.Object ref = parentAssetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentAssetType_ = s; + return s; + } + } + /** + *
+   * The type of this resource's immediate parent, if there is one.
+   * To search against the `parent_asset_type`:
+   * * use a field query. Example:
+   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+   * * use a free text query. Example:
+   * `cloudresourcemanager.googleapis.com/Project`
+   * 
+ * + * string parent_asset_type = 103; + * @return The bytes for parentAssetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentAssetTypeBytes() { + java.lang.Object ref = parentAssetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentAssetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, location_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 7); + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, networkTags_.getRaw(i)); + } + if (additionalAttributes_ != null) { + output.writeMessage(9, getAdditionalAttributes()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, kmsKey_); + } + if (createTime_ != null) { + output.writeMessage(11, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(12, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, state_); + } + for (int i = 0; i < versionedResources_.size(); i++) { + output.writeMessage(16, versionedResources_.get(i)); + } + for (int i = 0; i < folders_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, folders_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, organization_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentFullResourceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, parentFullResourceName_); + } + for (int i = 0; i < attachedResources_.size(); i++) { + output.writeMessage(20, attachedResources_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetRelationships(), + RelationshipsDefaultEntryHolder.defaultEntry, + 21); + for (int i = 0; i < tagKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 23, tagKeys_.getRaw(i)); + } + for (int i = 0; i < tagValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, tagValues_.getRaw(i)); + } + for (int i = 0; i < tagValueIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, tagValueIds_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 103, parentAssetType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, location_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, labels__); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getNetworkTagsList().size(); + } + if (additionalAttributes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getAdditionalAttributes()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, kmsKey_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, state_); + } + for (int i = 0; i < versionedResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, versionedResources_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < folders_.size(); i++) { + dataSize += computeStringSizeNoTag(folders_.getRaw(i)); + } + size += dataSize; + size += 2 * getFoldersList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, organization_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentFullResourceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, parentFullResourceName_); + } + for (int i = 0; i < attachedResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, attachedResources_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetRelationships().getMap().entrySet()) { + com.google.protobuf.MapEntry + relationships__ = RelationshipsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, relationships__); + } + { + int dataSize = 0; + for (int i = 0; i < tagKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(tagKeys_.getRaw(i)); + } + size += dataSize; + size += 2 * getTagKeysList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tagValues_.size(); i++) { + dataSize += computeStringSizeNoTag(tagValues_.getRaw(i)); + } + size += dataSize; + size += 2 * getTagValuesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < tagValueIds_.size(); i++) { + dataSize += computeStringSizeNoTag(tagValueIds_.getRaw(i)); + } + size += dataSize; + size += 2 * getTagValueIdsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(103, parentAssetType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ResourceSearchResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ResourceSearchResult other = (com.google.cloud.asset.v1.ResourceSearchResult) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (!getProject() + .equals(other.getProject())) return false; + if (!getFoldersList() + .equals(other.getFoldersList())) return false; + if (!getOrganization() + .equals(other.getOrganization())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getLocation() + .equals(other.getLocation())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getNetworkTagsList() + .equals(other.getNetworkTagsList())) return false; + if (!getKmsKey() + .equals(other.getKmsKey())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getState() + .equals(other.getState())) return false; + if (hasAdditionalAttributes() != other.hasAdditionalAttributes()) return false; + if (hasAdditionalAttributes()) { + if (!getAdditionalAttributes() + .equals(other.getAdditionalAttributes())) return false; + } + if (!getParentFullResourceName() + .equals(other.getParentFullResourceName())) return false; + if (!getVersionedResourcesList() + .equals(other.getVersionedResourcesList())) return false; + if (!getAttachedResourcesList() + .equals(other.getAttachedResourcesList())) return false; + if (!internalGetRelationships().equals( + other.internalGetRelationships())) return false; + if (!getTagKeysList() + .equals(other.getTagKeysList())) return false; + if (!getTagValuesList() + .equals(other.getTagValuesList())) return false; + if (!getTagValueIdsList() + .equals(other.getTagValueIdsList())) return false; + if (!getParentAssetType() + .equals(other.getParentAssetType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + if (getFoldersCount() > 0) { + hash = (37 * hash) + FOLDERS_FIELD_NUMBER; + hash = (53 * hash) + getFoldersList().hashCode(); + } + hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; + hash = (53 * hash) + getOrganization().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); + if (hasAdditionalAttributes()) { + hash = (37 * hash) + ADDITIONAL_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalAttributes().hashCode(); + } + hash = (37 * hash) + PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParentFullResourceName().hashCode(); + if (getVersionedResourcesCount() > 0) { + hash = (37 * hash) + VERSIONED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getVersionedResourcesList().hashCode(); + } + if (getAttachedResourcesCount() > 0) { + hash = (37 * hash) + ATTACHED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getAttachedResourcesList().hashCode(); + } + if (!internalGetRelationships().getMap().isEmpty()) { + hash = (37 * hash) + RELATIONSHIPS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRelationships().hashCode(); + } + if (getTagKeysCount() > 0) { + hash = (37 * hash) + TAG_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getTagKeysList().hashCode(); + } + if (getTagValuesCount() > 0) { + hash = (37 * hash) + TAG_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getTagValuesList().hashCode(); + } + if (getTagValueIdsCount() > 0) { + hash = (37 * hash) + TAG_VALUE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getTagValueIdsList().hashCode(); + } + hash = (37 * hash) + PARENT_ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getParentAssetType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.ResourceSearchResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A result of Resource Search, containing information of a cloud resource.
+   * Next ID: 29
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ResourceSearchResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ResourceSearchResult) + com.google.cloud.asset.v1.ResourceSearchResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + case 21: + return internalGetRelationships(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + case 21: + return internalGetMutableRelationships(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ResourceSearchResult.class, com.google.cloud.asset.v1.ResourceSearchResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ResourceSearchResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getVersionedResourcesFieldBuilder(); + getAttachedResourcesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + assetType_ = ""; + + project_ = ""; + + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + organization_ = ""; + + displayName_ = ""; + + description_ = ""; + + location_ = ""; + + internalGetMutableLabels().clear(); + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + kmsKey_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = ""; + + if (additionalAttributesBuilder_ == null) { + additionalAttributes_ = null; + } else { + additionalAttributes_ = null; + additionalAttributesBuilder_ = null; + } + parentFullResourceName_ = ""; + + if (versionedResourcesBuilder_ == null) { + versionedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + versionedResourcesBuilder_.clear(); + } + if (attachedResourcesBuilder_ == null) { + attachedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + attachedResourcesBuilder_.clear(); + } + internalGetMutableRelationships().clear(); + tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + parentAssetType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ResourceSearchResult build() { + com.google.cloud.asset.v1.ResourceSearchResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ResourceSearchResult buildPartial() { + com.google.cloud.asset.v1.ResourceSearchResult result = new com.google.cloud.asset.v1.ResourceSearchResult(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.assetType_ = assetType_; + result.project_ = project_; + if (((bitField0_ & 0x00000001) != 0)) { + folders_ = folders_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.folders_ = folders_; + result.organization_ = organization_; + result.displayName_ = displayName_; + result.description_ = description_; + result.location_ = location_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (((bitField0_ & 0x00000004) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.networkTags_ = networkTags_; + result.kmsKey_ = kmsKey_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.state_ = state_; + if (additionalAttributesBuilder_ == null) { + result.additionalAttributes_ = additionalAttributes_; + } else { + result.additionalAttributes_ = additionalAttributesBuilder_.build(); + } + result.parentFullResourceName_ = parentFullResourceName_; + if (versionedResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.versionedResources_ = versionedResources_; + } else { + result.versionedResources_ = versionedResourcesBuilder_.build(); + } + if (attachedResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + attachedResources_ = java.util.Collections.unmodifiableList(attachedResources_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.attachedResources_ = attachedResources_; + } else { + result.attachedResources_ = attachedResourcesBuilder_.build(); + } + result.relationships_ = internalGetRelationships(); + result.relationships_.makeImmutable(); + if (((bitField0_ & 0x00000040) != 0)) { + tagKeys_ = tagKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.tagKeys_ = tagKeys_; + if (((bitField0_ & 0x00000080) != 0)) { + tagValues_ = tagValues_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.tagValues_ = tagValues_; + if (((bitField0_ & 0x00000100) != 0)) { + tagValueIds_ = tagValueIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.tagValueIds_ = tagValueIds_; + result.parentAssetType_ = parentAssetType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.ResourceSearchResult) { + return mergeFrom((com.google.cloud.asset.v1.ResourceSearchResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ResourceSearchResult other) { + if (other == com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + if (!other.folders_.isEmpty()) { + if (folders_.isEmpty()) { + folders_ = other.folders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFoldersIsMutable(); + folders_.addAll(other.folders_); + } + onChanged(); + } + if (!other.getOrganization().isEmpty()) { + organization_ = other.organization_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getState().isEmpty()) { + state_ = other.state_; + onChanged(); + } + if (other.hasAdditionalAttributes()) { + mergeAdditionalAttributes(other.getAdditionalAttributes()); + } + if (!other.getParentFullResourceName().isEmpty()) { + parentFullResourceName_ = other.parentFullResourceName_; + onChanged(); + } + if (versionedResourcesBuilder_ == null) { + if (!other.versionedResources_.isEmpty()) { + if (versionedResources_.isEmpty()) { + versionedResources_ = other.versionedResources_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureVersionedResourcesIsMutable(); + versionedResources_.addAll(other.versionedResources_); + } + onChanged(); + } + } else { + if (!other.versionedResources_.isEmpty()) { + if (versionedResourcesBuilder_.isEmpty()) { + versionedResourcesBuilder_.dispose(); + versionedResourcesBuilder_ = null; + versionedResources_ = other.versionedResources_; + bitField0_ = (bitField0_ & ~0x00000008); + versionedResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVersionedResourcesFieldBuilder() : null; + } else { + versionedResourcesBuilder_.addAllMessages(other.versionedResources_); + } + } + } + if (attachedResourcesBuilder_ == null) { + if (!other.attachedResources_.isEmpty()) { + if (attachedResources_.isEmpty()) { + attachedResources_ = other.attachedResources_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAttachedResourcesIsMutable(); + attachedResources_.addAll(other.attachedResources_); + } + onChanged(); + } + } else { + if (!other.attachedResources_.isEmpty()) { + if (attachedResourcesBuilder_.isEmpty()) { + attachedResourcesBuilder_.dispose(); + attachedResourcesBuilder_ = null; + attachedResources_ = other.attachedResources_; + bitField0_ = (bitField0_ & ~0x00000010); + attachedResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAttachedResourcesFieldBuilder() : null; + } else { + attachedResourcesBuilder_.addAllMessages(other.attachedResources_); + } + } + } + internalGetMutableRelationships().mergeFrom( + other.internalGetRelationships()); + if (!other.tagKeys_.isEmpty()) { + if (tagKeys_.isEmpty()) { + tagKeys_ = other.tagKeys_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureTagKeysIsMutable(); + tagKeys_.addAll(other.tagKeys_); + } + onChanged(); + } + if (!other.tagValues_.isEmpty()) { + if (tagValues_.isEmpty()) { + tagValues_ = other.tagValues_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureTagValuesIsMutable(); + tagValues_.addAll(other.tagValues_); + } + onChanged(); + } + if (!other.tagValueIds_.isEmpty()) { + if (tagValueIds_.isEmpty()) { + tagValueIds_ = other.tagValueIds_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureTagValueIdsIsMutable(); + tagValueIds_.addAll(other.tagValueIds_); + } + onChanged(); + } + if (!other.getParentAssetType().isEmpty()) { + parentAssetType_ = other.parentAssetType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ResourceSearchResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ResourceSearchResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The full resource name of this resource. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `name`:
+     * * use a field query. Example: `name:instance1`
+     * * use a free text query. Example: `instance1`
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full resource name of this resource. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `name`:
+     * * use a field query. Example: `name:instance1`
+     * * use a free text query. Example: `instance1`
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full resource name of this resource. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `name`:
+     * * use a field query. Example: `name:instance1`
+     * * use a free text query. Example: `instance1`
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The full resource name of this resource. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `name`:
+     * * use a field query. Example: `name:instance1`
+     * * use a free text query. Example: `instance1`
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The full resource name of this resource. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Cloud Asset Inventory Resource Name
+     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * for more information.
+     * To search against the `name`:
+     * * use a field query. Example: `name:instance1`
+     * * use a free text query. Example: `instance1`
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of this resource. Example: `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_type` field in your search request.
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of this resource. Example: `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_type` field in your search request.
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of this resource. Example: `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_type` field in your search request.
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of this resource. Example: `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_type` field in your search request.
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of this resource. Example: `compute.googleapis.com/Disk`.
+     * To search against the `asset_type`:
+     * * specify the `asset_type` field in your search request.
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private java.lang.Object project_ = ""; + /** + *
+     * The project that this resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. This field is available when the resource
+     * belongs to a project.
+     * To search against `project`:
+     * * use a field query. Example: `project:12345`
+     * * use a free text query. Example: `12345`
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 3; + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. This field is available when the resource
+     * belongs to a project.
+     * To search against `project`:
+     * * use a field query. Example: `project:12345`
+     * * use a free text query. Example: `12345`
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 3; + * @return The bytes for project. + */ + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. This field is available when the resource
+     * belongs to a project.
+     * To search against `project`:
+     * * use a field query. Example: `project:12345`
+     * * use a free text query. Example: `12345`
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 3; + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. This field is available when the resource
+     * belongs to a project.
+     * To search against `project`:
+     * * use a field query. Example: `project:12345`
+     * * use a free text query. Example: `12345`
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 3; + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * projects/{PROJECT_NUMBER}. This field is available when the resource
+     * belongs to a project.
+     * To search against `project`:
+     * * use a field query. Example: `project:12345`
+     * * use a free text query. Example: `12345`
+     * * specify the `scope` field as this project in your search request.
+     * 
+ * + * string project = 3; + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureFoldersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + folders_ = new com.google.protobuf.LazyStringArrayList(folders_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @return A list containing the folders. + */ + public com.google.protobuf.ProtocolStringList + getFoldersList() { + return folders_.getUnmodifiableView(); + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @return The count of folders. + */ + public int getFoldersCount() { + return folders_.size(); + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @param index The index of the element to return. + * @return The folders at the given index. + */ + public java.lang.String getFolders(int index) { + return folders_.get(index); + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + public com.google.protobuf.ByteString + getFoldersBytes(int index) { + return folders_.getByteString(index); + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @param index The index to set the value at. + * @param value The folders to set. + * @return This builder for chaining. + */ + public Builder setFolders( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFoldersIsMutable(); + folders_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @param value The folders to add. + * @return This builder for chaining. + */ + public Builder addFolders( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFoldersIsMutable(); + folders_.add(value); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @param values The folders to add. + * @return This builder for chaining. + */ + public Builder addAllFolders( + java.lang.Iterable values) { + ensureFoldersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, folders_); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @return This builder for chaining. + */ + public Builder clearFolders() { + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The folder(s) that this resource belongs to, in the form of
+     * folders/{FOLDER_NUMBER}. This field is available when the resource
+     * belongs to one or more folders.
+     * To search against `folders`:
+     * * use a field query. Example: `folders:(123 OR 456)`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this folder in your search request.
+     * 
+ * + * repeated string folders = 17; + * @param value The bytes of the folders to add. + * @return This builder for chaining. + */ + public Builder addFoldersBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFoldersIsMutable(); + folders_.add(value); + onChanged(); + return this; + } + + private java.lang.Object organization_ = ""; + /** + *
+     * The organization that this resource belongs to, in the form of
+     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * resource belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 18; + * @return The organization. + */ + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The organization that this resource belongs to, in the form of
+     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * resource belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 18; + * @return The bytes for organization. + */ + public com.google.protobuf.ByteString + getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The organization that this resource belongs to, in the form of
+     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * resource belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 18; + * @param value The organization to set. + * @return This builder for chaining. + */ + public Builder setOrganization( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + organization_ = value; + onChanged(); + return this; + } + /** + *
+     * The organization that this resource belongs to, in the form of
+     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * resource belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 18; + * @return This builder for chaining. + */ + public Builder clearOrganization() { + + organization_ = getDefaultInstance().getOrganization(); + onChanged(); + return this; + } + /** + *
+     * The organization that this resource belongs to, in the form of
+     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+     * resource belongs to an organization.
+     * To search against `organization`:
+     * * use a field query. Example: `organization:123`
+     * * use a free text query. Example: `123`
+     * * specify the `scope` field as this organization in your search request.
+     * 
+ * + * string organization = 18; + * @param value The bytes for organization to set. + * @return This builder for chaining. + */ + public Builder setOrganizationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + organization_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The display name of this resource. This field is available only when the
+     * resource's Protobuf contains it.
+     * To search against the `display_name`:
+     * * use a field query. Example: `displayName:"My Instance"`
+     * * use a free text query. Example: `"My Instance"`
+     * 
+ * + * string display_name = 4; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The display name of this resource. This field is available only when the
+     * resource's Protobuf contains it.
+     * To search against the `display_name`:
+     * * use a field query. Example: `displayName:"My Instance"`
+     * * use a free text query. Example: `"My Instance"`
+     * 
+ * + * string display_name = 4; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The display name of this resource. This field is available only when the
+     * resource's Protobuf contains it.
+     * To search against the `display_name`:
+     * * use a field query. Example: `displayName:"My Instance"`
+     * * use a free text query. Example: `"My Instance"`
+     * 
+ * + * string display_name = 4; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The display name of this resource. This field is available only when the
+     * resource's Protobuf contains it.
+     * To search against the `display_name`:
+     * * use a field query. Example: `displayName:"My Instance"`
+     * * use a free text query. Example: `"My Instance"`
+     * 
+ * + * string display_name = 4; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The display name of this resource. This field is available only when the
+     * resource's Protobuf contains it.
+     * To search against the `display_name`:
+     * * use a field query. Example: `displayName:"My Instance"`
+     * * use a free text query. Example: `"My Instance"`
+     * 
+ * + * string display_name = 4; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `description`:
+     * * use a field query. Example: `description:"important instance"`
+     * * use a free text query. Example: `"important instance"`
+     * 
+ * + * string description = 5; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `description`:
+     * * use a field query. Example: `description:"important instance"`
+     * * use a free text query. Example: `"important instance"`
+     * 
+ * + * string description = 5; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `description`:
+     * * use a field query. Example: `description:"important instance"`
+     * * use a free text query. Example: `"important instance"`
+     * 
+ * + * string description = 5; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `description`:
+     * * use a field query. Example: `description:"important instance"`
+     * * use a free text query. Example: `"important instance"`
+     * 
+ * + * string description = 5; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `description`:
+     * * use a field query. Example: `description:"important instance"`
+     * * use a free text query. Example: `"important instance"`
+     * 
+ * + * string description = 5; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + *
+     * Location can be `global`, regional like `us-east1`, or zonal like
+     * `us-west1-b`. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against the `location`:
+     * * use a field query. Example: `location:us-west*`
+     * * use a free text query. Example: `us-west*`
+     * 
+ * + * string location = 6; + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Location can be `global`, regional like `us-east1`, or zonal like
+     * `us-west1-b`. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against the `location`:
+     * * use a field query. Example: `location:us-west*`
+     * * use a free text query. Example: `us-west*`
+     * 
+ * + * string location = 6; + * @return The bytes for location. + */ + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Location can be `global`, regional like `us-east1`, or zonal like
+     * `us-west1-b`. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against the `location`:
+     * * use a field query. Example: `location:us-west*`
+     * * use a free text query. Example: `us-west*`
+     * 
+ * + * string location = 6; + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + *
+     * Location can be `global`, regional like `us-east1`, or zonal like
+     * `us-west1-b`. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against the `location`:
+     * * use a field query. Example: `location:us-west*`
+     * * use a free text query. Example: `us-west*`
+     * 
+ * + * string location = 6; + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + *
+     * Location can be `global`, regional like `us-east1`, or zonal like
+     * `us-west1-b`. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against the `location`:
+     * * use a field query. Example: `location:us-west*`
+     * * use a free text query. Example: `us-west*`
+     * 
+ * + * string location = 6; + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `labels`:
+     * * use a field query:
+     *     - query on any label's key or value. Example: `labels:prod`
+     *     - query by a given label. Example: `labels.env:prod`
+     *     - query by a given label's existence. Example: `labels.env:*`
+     * * use a free text query. Example: `prod`
+     * 
+ * + * map<string, string> labels = 7; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `labels`:
+     * * use a field query:
+     *     - query on any label's key or value. Example: `labels:prod`
+     *     - query by a given label. Example: `labels.env:prod`
+     *     - query by a given label's existence. Example: `labels.env:*`
+     * * use a free text query. Example: `prod`
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `labels`:
+     * * use a field query:
+     *     - query on any label's key or value. Example: `labels:prod`
+     *     - query by a given label. Example: `labels.env:prod`
+     *     - query by a given label's existence. Example: `labels.env:*`
+     * * use a free text query. Example: `prod`
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `labels`:
+     * * use a field query:
+     *     - query on any label's key or value. Example: `labels:prod`
+     *     - query by a given label. Example: `labels.env:prod`
+     *     - query by a given label's existence. Example: `labels.env:*`
+     * * use a free text query. Example: `prod`
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `labels`:
+     * * use a field query:
+     *     - query on any label's key or value. Example: `labels:prod`
+     *     - query by a given label. Example: `labels.env:prod`
+     *     - query by a given label's existence. Example: `labels.env:*`
+     * * use a free text query. Example: `prod`
+     * 
+ * + * map<string, string> labels = 7; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `labels`:
+     * * use a field query:
+     *     - query on any label's key or value. Example: `labels:prod`
+     *     - query by a given label. Example: `labels.env:prod`
+     *     - query by a given label's existence. Example: `labels.env:*`
+     * * use a free text query. Example: `prod`
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `labels`:
+     * * use a field query:
+     *     - query on any label's key or value. Example: `labels:prod`
+     *     - query by a given label. Example: `labels.env:prod`
+     *     - query by a given label's existence. Example: `labels.env:*`
+     * * use a free text query. Example: `prod`
+     * 
+ * + * map<string, string> labels = 7; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNetworkTagsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList + getNetworkTagsList() { + return networkTags_.getUnmodifiableView(); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString + getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags( + java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, networkTags_); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information. This field is available only when the resource's
+     * Protobuf contains it.
+     * To search against the `network_tags`:
+     * * use a field query. Example: `networkTags:internal`
+     * * use a free text query. Example: `internal`
+     * 
+ * + * repeated string network_tags = 8; + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + + private java.lang.Object kmsKey_ = ""; + /** + *
+     * The Cloud KMS
+     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+     * name or
+     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+     * name. This field is available only when the resource's Protobuf contains
+     * it.
+     * To search against the `kms_key`:
+     * * use a field query. Example: `kmsKey:key`
+     * * use a free text query. Example: `key`
+     * 
+ * + * string kms_key = 10; + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The Cloud KMS
+     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+     * name or
+     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+     * name. This field is available only when the resource's Protobuf contains
+     * it.
+     * To search against the `kms_key`:
+     * * use a field query. Example: `kmsKey:key`
+     * * use a free text query. Example: `key`
+     * 
+ * + * string kms_key = 10; + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString + getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The Cloud KMS
+     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+     * name or
+     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+     * name. This field is available only when the resource's Protobuf contains
+     * it.
+     * To search against the `kms_key`:
+     * * use a field query. Example: `kmsKey:key`
+     * * use a free text query. Example: `key`
+     * 
+ * + * string kms_key = 10; + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKey_ = value; + onChanged(); + return this; + } + /** + *
+     * The Cloud KMS
+     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+     * name or
+     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+     * name. This field is available only when the resource's Protobuf contains
+     * it.
+     * To search against the `kms_key`:
+     * * use a field query. Example: `kmsKey:key`
+     * * use a free text query. Example: `key`
+     * 
+ * + * string kms_key = 10; + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + + kmsKey_ = getDefaultInstance().getKmsKey(); + onChanged(); + return this; + } + /** + *
+     * The Cloud KMS
+     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+     * name or
+     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+     * name. This field is available only when the resource's Protobuf contains
+     * it.
+     * To search against the `kms_key`:
+     * * use a field query. Example: `kmsKey:key`
+     * * use a free text query. Example: `key`
+     * 
+ * + * string kms_key = 10; + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKey_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * The create timestamp of this resource, at which the resource was created.
+     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+     * is available only when the resource's Protobuf contains it.
+     * To search against `create_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+     *     - value in date string. Example: `createTime > 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `createTime >
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The last update timestamp of this resource, at which the resource was last
+     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+     * always be 0. This field is available only when the resource's Protobuf
+     * contains it.
+     * To search against `update_time`:
+     * * use a field query.
+     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+     *     - value in date string. Example: `updateTime < 2021-01-01`
+     *     - value in date-time string (must be quoted). Example: `updateTime <
+     *     "2021-01-01T00:00:00"`
+     * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object state_ = ""; + /** + *
+     * The state of this resource. Different resources types have different state
+     * definitions that are mapped from various fields of different resource
+     * types. This field is available only when the resource's Protobuf contains
+     * it.
+     * Example:
+     * If the resource is an instance provided by Compute Engine,
+     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+     * in [API
+     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+     * If the resource is a project provided by Cloud Resource Manager, its state
+     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+     * To search against the `state`:
+     * * use a field query. Example: `state:RUNNING`
+     * * use a free text query. Example: `RUNNING`
+     * 
+ * + * string state = 13; + * @return The state. + */ + public java.lang.String getState() { + java.lang.Object ref = state_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + state_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The state of this resource. Different resources types have different state
+     * definitions that are mapped from various fields of different resource
+     * types. This field is available only when the resource's Protobuf contains
+     * it.
+     * Example:
+     * If the resource is an instance provided by Compute Engine,
+     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+     * in [API
+     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+     * If the resource is a project provided by Cloud Resource Manager, its state
+     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+     * To search against the `state`:
+     * * use a field query. Example: `state:RUNNING`
+     * * use a free text query. Example: `RUNNING`
+     * 
+ * + * string state = 13; + * @return The bytes for state. + */ + public com.google.protobuf.ByteString + getStateBytes() { + java.lang.Object ref = state_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + state_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The state of this resource. Different resources types have different state
+     * definitions that are mapped from various fields of different resource
+     * types. This field is available only when the resource's Protobuf contains
+     * it.
+     * Example:
+     * If the resource is an instance provided by Compute Engine,
+     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+     * in [API
+     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+     * If the resource is a project provided by Cloud Resource Manager, its state
+     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+     * To search against the `state`:
+     * * use a field query. Example: `state:RUNNING`
+     * * use a free text query. Example: `RUNNING`
+     * 
+ * + * string state = 13; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value; + onChanged(); + return this; + } + /** + *
+     * The state of this resource. Different resources types have different state
+     * definitions that are mapped from various fields of different resource
+     * types. This field is available only when the resource's Protobuf contains
+     * it.
+     * Example:
+     * If the resource is an instance provided by Compute Engine,
+     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+     * in [API
+     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+     * If the resource is a project provided by Cloud Resource Manager, its state
+     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+     * To search against the `state`:
+     * * use a field query. Example: `state:RUNNING`
+     * * use a free text query. Example: `RUNNING`
+     * 
+ * + * string state = 13; + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = getDefaultInstance().getState(); + onChanged(); + return this; + } + /** + *
+     * The state of this resource. Different resources types have different state
+     * definitions that are mapped from various fields of different resource
+     * types. This field is available only when the resource's Protobuf contains
+     * it.
+     * Example:
+     * If the resource is an instance provided by Compute Engine,
+     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+     * in [API
+     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+     * If the resource is a project provided by Cloud Resource Manager, its state
+     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+     * To search against the `state`:
+     * * use a field query. Example: `state:RUNNING`
+     * * use a free text query. Example: `RUNNING`
+     * 
+ * + * string state = 13; + * @param value The bytes for state to set. + * @return This builder for chaining. + */ + public Builder setStateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + state_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct additionalAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> additionalAttributesBuilder_; + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + * @return Whether the additionalAttributes field is set. + */ + public boolean hasAdditionalAttributes() { + return additionalAttributesBuilder_ != null || additionalAttributes_ != null; + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + * @return The additionalAttributes. + */ + public com.google.protobuf.Struct getAdditionalAttributes() { + if (additionalAttributesBuilder_ == null) { + return additionalAttributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : additionalAttributes_; + } else { + return additionalAttributesBuilder_.getMessage(); + } + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + public Builder setAdditionalAttributes(com.google.protobuf.Struct value) { + if (additionalAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + additionalAttributes_ = value; + onChanged(); + } else { + additionalAttributesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + public Builder setAdditionalAttributes( + com.google.protobuf.Struct.Builder builderForValue) { + if (additionalAttributesBuilder_ == null) { + additionalAttributes_ = builderForValue.build(); + onChanged(); + } else { + additionalAttributesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + public Builder mergeAdditionalAttributes(com.google.protobuf.Struct value) { + if (additionalAttributesBuilder_ == null) { + if (additionalAttributes_ != null) { + additionalAttributes_ = + com.google.protobuf.Struct.newBuilder(additionalAttributes_).mergeFrom(value).buildPartial(); + } else { + additionalAttributes_ = value; + } + onChanged(); + } else { + additionalAttributesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + public Builder clearAdditionalAttributes() { + if (additionalAttributesBuilder_ == null) { + additionalAttributes_ = null; + onChanged(); + } else { + additionalAttributes_ = null; + additionalAttributesBuilder_ = null; + } + + return this; + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + public com.google.protobuf.Struct.Builder getAdditionalAttributesBuilder() { + + onChanged(); + return getAdditionalAttributesFieldBuilder().getBuilder(); + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { + if (additionalAttributesBuilder_ != null) { + return additionalAttributesBuilder_.getMessageOrBuilder(); + } else { + return additionalAttributes_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : additionalAttributes_; + } + } + /** + *
+     * The additional searchable attributes of this resource. The attributes may
+     * vary from one resource type to another. Examples: `projectId` for Project,
+     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+     * metadata fields that are returned by the List or Get APIs provided by the
+     * corresponding GCP service (e.g., Compute Engine). see [API references and
+     * supported searchable
+     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+     * to see which fields are included.
+     * You can search values of these fields through free text search. However,
+     * you should not consume the field programically as the field names and
+     * values may change as the GCP service updates to a new incompatible API
+     * version.
+     * To search against the `additional_attributes`:
+     * * use a free text query to match the attributes values. Example: to search
+     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+     *   `foobar`.
+     * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getAdditionalAttributesFieldBuilder() { + if (additionalAttributesBuilder_ == null) { + additionalAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getAdditionalAttributes(), + getParentForChildren(), + isClean()); + additionalAttributes_ = null; + } + return additionalAttributesBuilder_; + } + + private java.lang.Object parentFullResourceName_ = ""; + /** + *
+     * The full resource name of this resource's parent, if it has one.
+     * To search against the `parent_full_resource_name`:
+     * * use a field query. Example:
+     * `parentFullResourceName:"project-name"`
+     * * use a free text query. Example:
+     * `project-name`
+     * 
+ * + * string parent_full_resource_name = 19; + * @return The parentFullResourceName. + */ + public java.lang.String getParentFullResourceName() { + java.lang.Object ref = parentFullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentFullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full resource name of this resource's parent, if it has one.
+     * To search against the `parent_full_resource_name`:
+     * * use a field query. Example:
+     * `parentFullResourceName:"project-name"`
+     * * use a free text query. Example:
+     * `project-name`
+     * 
+ * + * string parent_full_resource_name = 19; + * @return The bytes for parentFullResourceName. + */ + public com.google.protobuf.ByteString + getParentFullResourceNameBytes() { + java.lang.Object ref = parentFullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentFullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full resource name of this resource's parent, if it has one.
+     * To search against the `parent_full_resource_name`:
+     * * use a field query. Example:
+     * `parentFullResourceName:"project-name"`
+     * * use a free text query. Example:
+     * `project-name`
+     * 
+ * + * string parent_full_resource_name = 19; + * @param value The parentFullResourceName to set. + * @return This builder for chaining. + */ + public Builder setParentFullResourceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parentFullResourceName_ = value; + onChanged(); + return this; + } + /** + *
+     * The full resource name of this resource's parent, if it has one.
+     * To search against the `parent_full_resource_name`:
+     * * use a field query. Example:
+     * `parentFullResourceName:"project-name"`
+     * * use a free text query. Example:
+     * `project-name`
+     * 
+ * + * string parent_full_resource_name = 19; + * @return This builder for chaining. + */ + public Builder clearParentFullResourceName() { + + parentFullResourceName_ = getDefaultInstance().getParentFullResourceName(); + onChanged(); + return this; + } + /** + *
+     * The full resource name of this resource's parent, if it has one.
+     * To search against the `parent_full_resource_name`:
+     * * use a field query. Example:
+     * `parentFullResourceName:"project-name"`
+     * * use a free text query. Example:
+     * `project-name`
+     * 
+ * + * string parent_full_resource_name = 19; + * @param value The bytes for parentFullResourceName to set. + * @return This builder for chaining. + */ + public Builder setParentFullResourceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parentFullResourceName_ = value; + onChanged(); + return this; + } + + private java.util.List versionedResources_ = + java.util.Collections.emptyList(); + private void ensureVersionedResourcesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + versionedResources_ = new java.util.ArrayList(versionedResources_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> versionedResourcesBuilder_; + + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public java.util.List getVersionedResourcesList() { + if (versionedResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(versionedResources_); + } else { + return versionedResourcesBuilder_.getMessageList(); + } + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public int getVersionedResourcesCount() { + if (versionedResourcesBuilder_ == null) { + return versionedResources_.size(); + } else { + return versionedResourcesBuilder_.getCount(); + } + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { + if (versionedResourcesBuilder_ == null) { + return versionedResources_.get(index); + } else { + return versionedResourcesBuilder_.getMessage(index); + } + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder setVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource value) { + if (versionedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionedResourcesIsMutable(); + versionedResources_.set(index, value); + onChanged(); + } else { + versionedResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder setVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.set(index, builderForValue.build()); + onChanged(); + } else { + versionedResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder addVersionedResources(com.google.cloud.asset.v1.VersionedResource value) { + if (versionedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionedResourcesIsMutable(); + versionedResources_.add(value); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder addVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource value) { + if (versionedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVersionedResourcesIsMutable(); + versionedResources_.add(index, value); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder addVersionedResources( + com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.add(builderForValue.build()); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder addVersionedResources( + int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.add(index, builderForValue.build()); + onChanged(); + } else { + versionedResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder addAllVersionedResources( + java.lang.Iterable values) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, versionedResources_); + onChanged(); + } else { + versionedResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder clearVersionedResources() { + if (versionedResourcesBuilder_ == null) { + versionedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + versionedResourcesBuilder_.clear(); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public Builder removeVersionedResources(int index) { + if (versionedResourcesBuilder_ == null) { + ensureVersionedResourcesIsMutable(); + versionedResources_.remove(index); + onChanged(); + } else { + versionedResourcesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public com.google.cloud.asset.v1.VersionedResource.Builder getVersionedResourcesBuilder( + int index) { + return getVersionedResourcesFieldBuilder().getBuilder(index); + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( + int index) { + if (versionedResourcesBuilder_ == null) { + return versionedResources_.get(index); } else { + return versionedResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public java.util.List + getVersionedResourcesOrBuilderList() { + if (versionedResourcesBuilder_ != null) { + return versionedResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(versionedResources_); + } + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder() { + return getVersionedResourcesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder( + int index) { + return getVersionedResourcesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); + } + /** + *
+     * Versioned resource representations of this resource. This is repeated
+     * because there could be multiple versions of resource representations during
+     * version migration.
+     * This `versioned_resources` field is not searchable. Some attributes of the
+     * resource representations are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + public java.util.List + getVersionedResourcesBuilderList() { + return getVersionedResourcesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> + getVersionedResourcesFieldBuilder() { + if (versionedResourcesBuilder_ == null) { + versionedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder>( + versionedResources_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + versionedResources_ = null; + } + return versionedResourcesBuilder_; + } + + private java.util.List attachedResources_ = + java.util.Collections.emptyList(); + private void ensureAttachedResourcesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + attachedResources_ = new java.util.ArrayList(attachedResources_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AttachedResource, com.google.cloud.asset.v1.AttachedResource.Builder, com.google.cloud.asset.v1.AttachedResourceOrBuilder> attachedResourcesBuilder_; + + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public java.util.List getAttachedResourcesList() { + if (attachedResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(attachedResources_); + } else { + return attachedResourcesBuilder_.getMessageList(); + } + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public int getAttachedResourcesCount() { + if (attachedResourcesBuilder_ == null) { + return attachedResources_.size(); + } else { + return attachedResourcesBuilder_.getCount(); + } + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index) { + if (attachedResourcesBuilder_ == null) { + return attachedResources_.get(index); + } else { + return attachedResourcesBuilder_.getMessage(index); + } + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder setAttachedResources( + int index, com.google.cloud.asset.v1.AttachedResource value) { + if (attachedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttachedResourcesIsMutable(); + attachedResources_.set(index, value); + onChanged(); + } else { + attachedResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder setAttachedResources( + int index, com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) { + if (attachedResourcesBuilder_ == null) { + ensureAttachedResourcesIsMutable(); + attachedResources_.set(index, builderForValue.build()); + onChanged(); + } else { + attachedResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder addAttachedResources(com.google.cloud.asset.v1.AttachedResource value) { + if (attachedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttachedResourcesIsMutable(); + attachedResources_.add(value); + onChanged(); + } else { + attachedResourcesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder addAttachedResources( + int index, com.google.cloud.asset.v1.AttachedResource value) { + if (attachedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttachedResourcesIsMutable(); + attachedResources_.add(index, value); + onChanged(); + } else { + attachedResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder addAttachedResources( + com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) { + if (attachedResourcesBuilder_ == null) { + ensureAttachedResourcesIsMutable(); + attachedResources_.add(builderForValue.build()); + onChanged(); + } else { + attachedResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder addAttachedResources( + int index, com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) { + if (attachedResourcesBuilder_ == null) { + ensureAttachedResourcesIsMutable(); + attachedResources_.add(index, builderForValue.build()); + onChanged(); + } else { + attachedResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder addAllAttachedResources( + java.lang.Iterable values) { + if (attachedResourcesBuilder_ == null) { + ensureAttachedResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attachedResources_); + onChanged(); + } else { + attachedResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder clearAttachedResources() { + if (attachedResourcesBuilder_ == null) { + attachedResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + attachedResourcesBuilder_.clear(); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public Builder removeAttachedResources(int index) { + if (attachedResourcesBuilder_ == null) { + ensureAttachedResourcesIsMutable(); + attachedResources_.remove(index); + onChanged(); + } else { + attachedResourcesBuilder_.remove(index); + } + return this; + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public com.google.cloud.asset.v1.AttachedResource.Builder getAttachedResourcesBuilder( + int index) { + return getAttachedResourcesFieldBuilder().getBuilder(index); + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder( + int index) { + if (attachedResourcesBuilder_ == null) { + return attachedResources_.get(index); } else { + return attachedResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public java.util.List + getAttachedResourcesOrBuilderList() { + if (attachedResourcesBuilder_ != null) { + return attachedResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attachedResources_); + } + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public com.google.cloud.asset.v1.AttachedResource.Builder addAttachedResourcesBuilder() { + return getAttachedResourcesFieldBuilder().addBuilder( + com.google.cloud.asset.v1.AttachedResource.getDefaultInstance()); + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public com.google.cloud.asset.v1.AttachedResource.Builder addAttachedResourcesBuilder( + int index) { + return getAttachedResourcesFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.AttachedResource.getDefaultInstance()); + } + /** + *
+     * Attached resources of this resource. For example, an OSConfig
+     * Inventory is an attached resource of a Compute Instance. This field is
+     * repeated because a resource could have multiple attached resources.
+     * This `attached_resources` field is not searchable. Some attributes
+     * of the attached resources are exposed in `additional_attributes` field, so
+     * as to allow users to search on them.
+     * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + public java.util.List + getAttachedResourcesBuilderList() { + return getAttachedResourcesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AttachedResource, com.google.cloud.asset.v1.AttachedResource.Builder, com.google.cloud.asset.v1.AttachedResourceOrBuilder> + getAttachedResourcesFieldBuilder() { + if (attachedResourcesBuilder_ == null) { + attachedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AttachedResource, com.google.cloud.asset.v1.AttachedResource.Builder, com.google.cloud.asset.v1.AttachedResourceOrBuilder>( + attachedResources_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + attachedResources_ = null; + } + return attachedResourcesBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1.RelatedResources> relationships_; + private com.google.protobuf.MapField + internalGetRelationships() { + if (relationships_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RelationshipsDefaultEntryHolder.defaultEntry); + } + return relationships_; + } + private com.google.protobuf.MapField + internalGetMutableRelationships() { + onChanged();; + if (relationships_ == null) { + relationships_ = com.google.protobuf.MapField.newMapField( + RelationshipsDefaultEntryHolder.defaultEntry); + } + if (!relationships_.isMutable()) { + relationships_ = relationships_.copy(); + } + return relationships_; + } + + public int getRelationshipsCount() { + return internalGetRelationships().getMap().size(); + } + /** + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + + @java.lang.Override + public boolean containsRelationships( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRelationships().getMap().containsKey(key); + } + /** + * Use {@link #getRelationshipsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRelationships() { + return getRelationshipsMap(); + } + /** + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + + public java.util.Map getRelationshipsMap() { + return internalGetRelationships().getMap(); + } + /** + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( + java.lang.String key, + com.google.cloud.asset.v1.RelatedResources defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRelationships().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + @java.lang.Override + + public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetRelationships().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRelationships() { + internalGetMutableRelationships().getMutableMap() + .clear(); + return this; + } + /** + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + + public Builder removeRelationships( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableRelationships().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableRelationships() { + return internalGetMutableRelationships().getMutableMap(); + } + /** + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + public Builder putRelationships( + java.lang.String key, + com.google.cloud.asset.v1.RelatedResources value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableRelationships().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * A map of related resources of this resource, keyed by the
+     * relationship type. A relationship type is in the format of
+     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+     * See [supported relationship
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+     * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + + public Builder putAllRelationships( + java.util.Map values) { + internalGetMutableRelationships().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagKeysIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + tagKeys_ = new com.google.protobuf.LazyStringArrayList(tagKeys_); + bitField0_ |= 0x00000040; + } + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @return A list containing the tagKeys. + */ + public com.google.protobuf.ProtocolStringList + getTagKeysList() { + return tagKeys_.getUnmodifiableView(); + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @return The count of tagKeys. + */ + public int getTagKeysCount() { + return tagKeys_.size(); + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @param index The index of the element to return. + * @return The tagKeys at the given index. + */ + public java.lang.String getTagKeys(int index) { + return tagKeys_.get(index); + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @param index The index of the value to return. + * @return The bytes of the tagKeys at the given index. + */ + public com.google.protobuf.ByteString + getTagKeysBytes(int index) { + return tagKeys_.getByteString(index); + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @param index The index to set the value at. + * @param value The tagKeys to set. + * @return This builder for chaining. + */ + public Builder setTagKeys( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagKeysIsMutable(); + tagKeys_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @param value The tagKeys to add. + * @return This builder for chaining. + */ + public Builder addTagKeys( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagKeysIsMutable(); + tagKeys_.add(value); + onChanged(); + return this; + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @param values The tagKeys to add. + * @return This builder for chaining. + */ + public Builder addAllTagKeys( + java.lang.Iterable values) { + ensureTagKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tagKeys_); + onChanged(); + return this; + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @return This builder for chaining. + */ + public Builder clearTagKeys() { + tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+     * To search against the `tagKeys`:
+     * * use a field query. Example:
+     *     - `tagKeys:"123456789/env*"`
+     *     - `tagKeys="123456789/env"`
+     *     - `tagKeys:"env"`
+     * * use a free text query. Example:
+     *     - `env`
+     * 
+ * + * repeated string tag_keys = 23; + * @param value The bytes of the tagKeys to add. + * @return This builder for chaining. + */ + public Builder addTagKeysBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagKeysIsMutable(); + tagKeys_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagValuesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + tagValues_ = new com.google.protobuf.LazyStringArrayList(tagValues_); + bitField0_ |= 0x00000080; + } + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @return A list containing the tagValues. + */ + public com.google.protobuf.ProtocolStringList + getTagValuesList() { + return tagValues_.getUnmodifiableView(); + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @return The count of tagValues. + */ + public int getTagValuesCount() { + return tagValues_.size(); + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @param index The index of the element to return. + * @return The tagValues at the given index. + */ + public java.lang.String getTagValues(int index) { + return tagValues_.get(index); + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @param index The index of the value to return. + * @return The bytes of the tagValues at the given index. + */ + public com.google.protobuf.ByteString + getTagValuesBytes(int index) { + return tagValues_.getByteString(index); + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @param index The index to set the value at. + * @param value The tagValues to set. + * @return This builder for chaining. + */ + public Builder setTagValues( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagValuesIsMutable(); + tagValues_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @param value The tagValues to add. + * @return This builder for chaining. + */ + public Builder addTagValues( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagValuesIsMutable(); + tagValues_.add(value); + onChanged(); + return this; + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @param values The tagValues to add. + * @return This builder for chaining. + */ + public Builder addAllTagValues( + java.lang.Iterable values) { + ensureTagValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tagValues_); + onChanged(); + return this; + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @return This builder for chaining. + */ + public Builder clearTagValues() { + tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + *
+     * TagValue namespaced names, in the format of
+     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+     * To search against the `tagValues`:
+     * * use a field query. Example:
+     *     - `tagValues:"env"`
+     *     - `tagValues:"env/prod"`
+     *     - `tagValues:"123456789/env/prod*"`
+     *     - `tagValues="123456789/env/prod"`
+     * * use a free text query. Example:
+     *     - `prod`
+     * 
+ * + * repeated string tag_values = 25; + * @param value The bytes of the tagValues to add. + * @return This builder for chaining. + */ + public Builder addTagValuesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagValuesIsMutable(); + tagValues_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagValueIdsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + tagValueIds_ = new com.google.protobuf.LazyStringArrayList(tagValueIds_); + bitField0_ |= 0x00000100; + } + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @return A list containing the tagValueIds. + */ + public com.google.protobuf.ProtocolStringList + getTagValueIdsList() { + return tagValueIds_.getUnmodifiableView(); + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @return The count of tagValueIds. + */ + public int getTagValueIdsCount() { + return tagValueIds_.size(); + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @param index The index of the element to return. + * @return The tagValueIds at the given index. + */ + public java.lang.String getTagValueIds(int index) { + return tagValueIds_.get(index); + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @param index The index of the value to return. + * @return The bytes of the tagValueIds at the given index. + */ + public com.google.protobuf.ByteString + getTagValueIdsBytes(int index) { + return tagValueIds_.getByteString(index); + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @param index The index to set the value at. + * @param value The tagValueIds to set. + * @return This builder for chaining. + */ + public Builder setTagValueIds( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagValueIdsIsMutable(); + tagValueIds_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @param value The tagValueIds to add. + * @return This builder for chaining. + */ + public Builder addTagValueIds( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagValueIdsIsMutable(); + tagValueIds_.add(value); + onChanged(); + return this; + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @param values The tagValueIds to add. + * @return This builder for chaining. + */ + public Builder addAllTagValueIds( + java.lang.Iterable values) { + ensureTagValueIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tagValueIds_); + onChanged(); + return this; + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @return This builder for chaining. + */ + public Builder clearTagValueIds() { + tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + *
+     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+     * To search against the `tagValueIds`:
+     * * use a field query. Example:
+     *     - `tagValueIds:"456"`
+     *     - `tagValueIds="tagValues/456"`
+     * * use a free text query. Example:
+     *     - `456`
+     * 
+ * + * repeated string tag_value_ids = 26; + * @param value The bytes of the tagValueIds to add. + * @return This builder for chaining. + */ + public Builder addTagValueIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagValueIdsIsMutable(); + tagValueIds_.add(value); + onChanged(); + return this; + } + + private java.lang.Object parentAssetType_ = ""; + /** + *
+     * The type of this resource's immediate parent, if there is one.
+     * To search against the `parent_asset_type`:
+     * * use a field query. Example:
+     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+     * * use a free text query. Example:
+     * `cloudresourcemanager.googleapis.com/Project`
+     * 
+ * + * string parent_asset_type = 103; + * @return The parentAssetType. + */ + public java.lang.String getParentAssetType() { + java.lang.Object ref = parentAssetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentAssetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of this resource's immediate parent, if there is one.
+     * To search against the `parent_asset_type`:
+     * * use a field query. Example:
+     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+     * * use a free text query. Example:
+     * `cloudresourcemanager.googleapis.com/Project`
+     * 
+ * + * string parent_asset_type = 103; + * @return The bytes for parentAssetType. + */ + public com.google.protobuf.ByteString + getParentAssetTypeBytes() { + java.lang.Object ref = parentAssetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentAssetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of this resource's immediate parent, if there is one.
+     * To search against the `parent_asset_type`:
+     * * use a field query. Example:
+     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+     * * use a free text query. Example:
+     * `cloudresourcemanager.googleapis.com/Project`
+     * 
+ * + * string parent_asset_type = 103; + * @param value The parentAssetType to set. + * @return This builder for chaining. + */ + public Builder setParentAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parentAssetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of this resource's immediate parent, if there is one.
+     * To search against the `parent_asset_type`:
+     * * use a field query. Example:
+     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+     * * use a free text query. Example:
+     * `cloudresourcemanager.googleapis.com/Project`
+     * 
+ * + * string parent_asset_type = 103; + * @return This builder for chaining. + */ + public Builder clearParentAssetType() { + + parentAssetType_ = getDefaultInstance().getParentAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of this resource's immediate parent, if there is one.
+     * To search against the `parent_asset_type`:
+     * * use a field query. Example:
+     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+     * * use a free text query. Example:
+     * `cloudresourcemanager.googleapis.com/Project`
+     * 
+ * + * string parent_asset_type = 103; + * @param value The bytes for parentAssetType to set. + * @return This builder for chaining. + */ + public Builder setParentAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parentAssetType_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ResourceSearchResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ResourceSearchResult) + private static final com.google.cloud.asset.v1.ResourceSearchResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ResourceSearchResult(); + } + + public static com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceSearchResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceSearchResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java new file mode 100644 index 000000000000..b79fffcafc2a --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java @@ -0,0 +1,1209 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface ResourceSearchResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ResourceSearchResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The full resource name of this resource. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `name`:
+   * * use a field query. Example: `name:instance1`
+   * * use a free text query. Example: `instance1`
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The full resource name of this resource. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Cloud Asset Inventory Resource Name
+   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * for more information.
+   * To search against the `name`:
+   * * use a field query. Example: `name:instance1`
+   * * use a free text query. Example: `instance1`
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of this resource. Example: `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_type` field in your search request.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of this resource. Example: `compute.googleapis.com/Disk`.
+   * To search against the `asset_type`:
+   * * specify the `asset_type` field in your search request.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * The project that this resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. This field is available when the resource
+   * belongs to a project.
+   * To search against `project`:
+   * * use a field query. Example: `project:12345`
+   * * use a free text query. Example: `12345`
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 3; + * @return The project. + */ + java.lang.String getProject(); + /** + *
+   * The project that this resource belongs to, in the form of
+   * projects/{PROJECT_NUMBER}. This field is available when the resource
+   * belongs to a project.
+   * To search against `project`:
+   * * use a field query. Example: `project:12345`
+   * * use a free text query. Example: `12345`
+   * * specify the `scope` field as this project in your search request.
+   * 
+ * + * string project = 3; + * @return The bytes for project. + */ + com.google.protobuf.ByteString + getProjectBytes(); + + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @return A list containing the folders. + */ + java.util.List + getFoldersList(); + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @return The count of folders. + */ + int getFoldersCount(); + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @param index The index of the element to return. + * @return The folders at the given index. + */ + java.lang.String getFolders(int index); + /** + *
+   * The folder(s) that this resource belongs to, in the form of
+   * folders/{FOLDER_NUMBER}. This field is available when the resource
+   * belongs to one or more folders.
+   * To search against `folders`:
+   * * use a field query. Example: `folders:(123 OR 456)`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this folder in your search request.
+   * 
+ * + * repeated string folders = 17; + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + com.google.protobuf.ByteString + getFoldersBytes(int index); + + /** + *
+   * The organization that this resource belongs to, in the form of
+   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * resource belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 18; + * @return The organization. + */ + java.lang.String getOrganization(); + /** + *
+   * The organization that this resource belongs to, in the form of
+   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
+   * resource belongs to an organization.
+   * To search against `organization`:
+   * * use a field query. Example: `organization:123`
+   * * use a free text query. Example: `123`
+   * * specify the `scope` field as this organization in your search request.
+   * 
+ * + * string organization = 18; + * @return The bytes for organization. + */ + com.google.protobuf.ByteString + getOrganizationBytes(); + + /** + *
+   * The display name of this resource. This field is available only when the
+   * resource's Protobuf contains it.
+   * To search against the `display_name`:
+   * * use a field query. Example: `displayName:"My Instance"`
+   * * use a free text query. Example: `"My Instance"`
+   * 
+ * + * string display_name = 4; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The display name of this resource. This field is available only when the
+   * resource's Protobuf contains it.
+   * To search against the `display_name`:
+   * * use a field query. Example: `displayName:"My Instance"`
+   * * use a free text query. Example: `"My Instance"`
+   * 
+ * + * string display_name = 4; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `description`:
+   * * use a field query. Example: `description:"important instance"`
+   * * use a free text query. Example: `"important instance"`
+   * 
+ * + * string description = 5; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `description`:
+   * * use a field query. Example: `description:"important instance"`
+   * * use a free text query. Example: `"important instance"`
+   * 
+ * + * string description = 5; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Location can be `global`, regional like `us-east1`, or zonal like
+   * `us-west1-b`. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against the `location`:
+   * * use a field query. Example: `location:us-west*`
+   * * use a free text query. Example: `us-west*`
+   * 
+ * + * string location = 6; + * @return The location. + */ + java.lang.String getLocation(); + /** + *
+   * Location can be `global`, regional like `us-east1`, or zonal like
+   * `us-west1-b`. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against the `location`:
+   * * use a field query. Example: `location:us-west*`
+   * * use a free text query. Example: `us-west*`
+   * 
+ * + * string location = 6; + * @return The bytes for location. + */ + com.google.protobuf.ByteString + getLocationBytes(); + + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + int getLabelsCount(); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `labels`:
+   * * use a field query:
+   *     - query on any label's key or value. Example: `labels:prod`
+   *     - query by a given label. Example: `labels.env:prod`
+   *     - query by a given label's existence. Example: `labels.env:*`
+   * * use a free text query. Example: `prod`
+   * 
+ * + * map<string, string> labels = 7; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @return A list containing the networkTags. + */ + java.util.List + getNetworkTagsList(); + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information. This field is available only when the resource's
+   * Protobuf contains it.
+   * To search against the `network_tags`:
+   * * use a field query. Example: `networkTags:internal`
+   * * use a free text query. Example: `internal`
+   * 
+ * + * repeated string network_tags = 8; + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString + getNetworkTagsBytes(int index); + + /** + *
+   * The Cloud KMS
+   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+   * name or
+   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+   * name. This field is available only when the resource's Protobuf contains
+   * it.
+   * To search against the `kms_key`:
+   * * use a field query. Example: `kmsKey:key`
+   * * use a free text query. Example: `key`
+   * 
+ * + * string kms_key = 10; + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + *
+   * The Cloud KMS
+   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
+   * name or
+   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
+   * name. This field is available only when the resource's Protobuf contains
+   * it.
+   * To search against the `kms_key`:
+   * * use a field query. Example: `kmsKey:key`
+   * * use a free text query. Example: `key`
+   * 
+ * + * string kms_key = 10; + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString + getKmsKeyBytes(); + + /** + *
+   * The create timestamp of this resource, at which the resource was created.
+   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+   * is available only when the resource's Protobuf contains it.
+   * To search against `create_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+   *     - value in date string. Example: `createTime > 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `createTime >
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * The create timestamp of this resource, at which the resource was created.
+   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+   * is available only when the resource's Protobuf contains it.
+   * To search against `create_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+   *     - value in date string. Example: `createTime > 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `createTime >
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * The create timestamp of this resource, at which the resource was created.
+   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
+   * is available only when the resource's Protobuf contains it.
+   * To search against `create_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
+   *     - value in date string. Example: `createTime > 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `createTime >
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp create_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * The last update timestamp of this resource, at which the resource was last
+   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+   * always be 0. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against `update_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+   *     - value in date string. Example: `updateTime < 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `updateTime <
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The last update timestamp of this resource, at which the resource was last
+   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+   * always be 0. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against `update_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+   *     - value in date string. Example: `updateTime < 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `updateTime <
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The last update timestamp of this resource, at which the resource was last
+   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
+   * always be 0. This field is available only when the resource's Protobuf
+   * contains it.
+   * To search against `update_time`:
+   * * use a field query.
+   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
+   *     - value in date string. Example: `updateTime < 2021-01-01`
+   *     - value in date-time string (must be quoted). Example: `updateTime <
+   *     "2021-01-01T00:00:00"`
+   * 
+ * + * .google.protobuf.Timestamp update_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * The state of this resource. Different resources types have different state
+   * definitions that are mapped from various fields of different resource
+   * types. This field is available only when the resource's Protobuf contains
+   * it.
+   * Example:
+   * If the resource is an instance provided by Compute Engine,
+   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+   * in [API
+   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+   * If the resource is a project provided by Cloud Resource Manager, its state
+   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+   * To search against the `state`:
+   * * use a field query. Example: `state:RUNNING`
+   * * use a free text query. Example: `RUNNING`
+   * 
+ * + * string state = 13; + * @return The state. + */ + java.lang.String getState(); + /** + *
+   * The state of this resource. Different resources types have different state
+   * definitions that are mapped from various fields of different resource
+   * types. This field is available only when the resource's Protobuf contains
+   * it.
+   * Example:
+   * If the resource is an instance provided by Compute Engine,
+   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
+   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
+   * in [API
+   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
+   * If the resource is a project provided by Cloud Resource Manager, its state
+   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
+   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
+   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
+   * To search against the `state`:
+   * * use a field query. Example: `state:RUNNING`
+   * * use a free text query. Example: `RUNNING`
+   * 
+ * + * string state = 13; + * @return The bytes for state. + */ + com.google.protobuf.ByteString + getStateBytes(); + + /** + *
+   * The additional searchable attributes of this resource. The attributes may
+   * vary from one resource type to another. Examples: `projectId` for Project,
+   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+   * metadata fields that are returned by the List or Get APIs provided by the
+   * corresponding GCP service (e.g., Compute Engine). see [API references and
+   * supported searchable
+   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+   * to see which fields are included.
+   * You can search values of these fields through free text search. However,
+   * you should not consume the field programically as the field names and
+   * values may change as the GCP service updates to a new incompatible API
+   * version.
+   * To search against the `additional_attributes`:
+   * * use a free text query to match the attributes values. Example: to search
+   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+   *   `foobar`.
+   * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + * @return Whether the additionalAttributes field is set. + */ + boolean hasAdditionalAttributes(); + /** + *
+   * The additional searchable attributes of this resource. The attributes may
+   * vary from one resource type to another. Examples: `projectId` for Project,
+   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+   * metadata fields that are returned by the List or Get APIs provided by the
+   * corresponding GCP service (e.g., Compute Engine). see [API references and
+   * supported searchable
+   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+   * to see which fields are included.
+   * You can search values of these fields through free text search. However,
+   * you should not consume the field programically as the field names and
+   * values may change as the GCP service updates to a new incompatible API
+   * version.
+   * To search against the `additional_attributes`:
+   * * use a free text query to match the attributes values. Example: to search
+   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+   *   `foobar`.
+   * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + * @return The additionalAttributes. + */ + com.google.protobuf.Struct getAdditionalAttributes(); + /** + *
+   * The additional searchable attributes of this resource. The attributes may
+   * vary from one resource type to another. Examples: `projectId` for Project,
+   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
+   * metadata fields that are returned by the List or Get APIs provided by the
+   * corresponding GCP service (e.g., Compute Engine). see [API references and
+   * supported searchable
+   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
+   * to see which fields are included.
+   * You can search values of these fields through free text search. However,
+   * you should not consume the field programically as the field names and
+   * values may change as the GCP service updates to a new incompatible API
+   * version.
+   * To search against the `additional_attributes`:
+   * * use a free text query to match the attributes values. Example: to search
+   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
+   *   `foobar`.
+   * 
+ * + * .google.protobuf.Struct additional_attributes = 9; + */ + com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder(); + + /** + *
+   * The full resource name of this resource's parent, if it has one.
+   * To search against the `parent_full_resource_name`:
+   * * use a field query. Example:
+   * `parentFullResourceName:"project-name"`
+   * * use a free text query. Example:
+   * `project-name`
+   * 
+ * + * string parent_full_resource_name = 19; + * @return The parentFullResourceName. + */ + java.lang.String getParentFullResourceName(); + /** + *
+   * The full resource name of this resource's parent, if it has one.
+   * To search against the `parent_full_resource_name`:
+   * * use a field query. Example:
+   * `parentFullResourceName:"project-name"`
+   * * use a free text query. Example:
+   * `project-name`
+   * 
+ * + * string parent_full_resource_name = 19; + * @return The bytes for parentFullResourceName. + */ + com.google.protobuf.ByteString + getParentFullResourceNameBytes(); + + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + java.util.List + getVersionedResourcesList(); + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index); + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + int getVersionedResourcesCount(); + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + java.util.List + getVersionedResourcesOrBuilderList(); + /** + *
+   * Versioned resource representations of this resource. This is repeated
+   * because there could be multiple versions of resource representations during
+   * version migration.
+   * This `versioned_resources` field is not searchable. Some attributes of the
+   * resource representations are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; + */ + com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( + int index); + + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + java.util.List + getAttachedResourcesList(); + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index); + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + int getAttachedResourcesCount(); + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + java.util.List + getAttachedResourcesOrBuilderList(); + /** + *
+   * Attached resources of this resource. For example, an OSConfig
+   * Inventory is an attached resource of a Compute Instance. This field is
+   * repeated because a resource could have multiple attached resources.
+   * This `attached_resources` field is not searchable. Some attributes
+   * of the attached resources are exposed in `additional_attributes` field, so
+   * as to allow users to search on them.
+   * 
+ * + * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; + */ + com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder( + int index); + + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + int getRelationshipsCount(); + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + boolean containsRelationships( + java.lang.String key); + /** + * Use {@link #getRelationshipsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getRelationships(); + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + java.util.Map + getRelationshipsMap(); + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + + /* nullable */ +com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.asset.v1.RelatedResources defaultValue); + /** + *
+   * A map of related resources of this resource, keyed by the
+   * relationship type. A relationship type is in the format of
+   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
+   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
+   * See [supported relationship
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
+   * 
+ * + * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; + */ + + com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow( + java.lang.String key); + + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @return A list containing the tagKeys. + */ + java.util.List + getTagKeysList(); + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @return The count of tagKeys. + */ + int getTagKeysCount(); + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @param index The index of the element to return. + * @return The tagKeys at the given index. + */ + java.lang.String getTagKeys(int index); + /** + *
+   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
+   * To search against the `tagKeys`:
+   * * use a field query. Example:
+   *     - `tagKeys:"123456789/env*"`
+   *     - `tagKeys="123456789/env"`
+   *     - `tagKeys:"env"`
+   * * use a free text query. Example:
+   *     - `env`
+   * 
+ * + * repeated string tag_keys = 23; + * @param index The index of the value to return. + * @return The bytes of the tagKeys at the given index. + */ + com.google.protobuf.ByteString + getTagKeysBytes(int index); + + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @return A list containing the tagValues. + */ + java.util.List + getTagValuesList(); + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @return The count of tagValues. + */ + int getTagValuesCount(); + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @param index The index of the element to return. + * @return The tagValues at the given index. + */ + java.lang.String getTagValues(int index); + /** + *
+   * TagValue namespaced names, in the format of
+   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
+   * To search against the `tagValues`:
+   * * use a field query. Example:
+   *     - `tagValues:"env"`
+   *     - `tagValues:"env/prod"`
+   *     - `tagValues:"123456789/env/prod*"`
+   *     - `tagValues="123456789/env/prod"`
+   * * use a free text query. Example:
+   *     - `prod`
+   * 
+ * + * repeated string tag_values = 25; + * @param index The index of the value to return. + * @return The bytes of the tagValues at the given index. + */ + com.google.protobuf.ByteString + getTagValuesBytes(int index); + + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @return A list containing the tagValueIds. + */ + java.util.List + getTagValueIdsList(); + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @return The count of tagValueIds. + */ + int getTagValueIdsCount(); + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @param index The index of the element to return. + * @return The tagValueIds at the given index. + */ + java.lang.String getTagValueIds(int index); + /** + *
+   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
+   * To search against the `tagValueIds`:
+   * * use a field query. Example:
+   *     - `tagValueIds:"456"`
+   *     - `tagValueIds="tagValues/456"`
+   * * use a free text query. Example:
+   *     - `456`
+   * 
+ * + * repeated string tag_value_ids = 26; + * @param index The index of the value to return. + * @return The bytes of the tagValueIds at the given index. + */ + com.google.protobuf.ByteString + getTagValueIdsBytes(int index); + + /** + *
+   * The type of this resource's immediate parent, if there is one.
+   * To search against the `parent_asset_type`:
+   * * use a field query. Example:
+   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+   * * use a free text query. Example:
+   * `cloudresourcemanager.googleapis.com/Project`
+   * 
+ * + * string parent_asset_type = 103; + * @return The parentAssetType. + */ + java.lang.String getParentAssetType(); + /** + *
+   * The type of this resource's immediate parent, if there is one.
+   * To search against the `parent_asset_type`:
+   * * use a field query. Example:
+   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
+   * * use a free text query. Example:
+   * `cloudresourcemanager.googleapis.com/Project`
+   * 
+ * + * string parent_asset_type = 103; + * @return The bytes for parentAssetType. + */ + com.google.protobuf.ByteString + getParentAssetTypeBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java new file mode 100644 index 000000000000..94c7f12605a8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java @@ -0,0 +1,3055 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A saved query which can be shared with others or used later.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SavedQuery} + */ +public final class SavedQuery extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SavedQuery) + SavedQueryOrBuilder { +private static final long serialVersionUID = 0L; + // Use SavedQuery.newBuilder() to construct. + private SavedQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SavedQuery() { + name_ = ""; + description_ = ""; + creator_ = ""; + lastUpdater_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SavedQuery(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SavedQuery( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + creator_ = s; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastUpdateTime_ != null) { + subBuilder = lastUpdateTime_.toBuilder(); + } + lastUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastUpdateTime_); + lastUpdateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + lastUpdater_ = s; + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 66: { + com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder subBuilder = null; + if (content_ != null) { + subBuilder = content_.toBuilder(); + } + content_ = input.readMessage(com.google.cloud.asset.v1.SavedQuery.QueryContent.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(content_); + content_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SavedQuery.class, com.google.cloud.asset.v1.SavedQuery.Builder.class); + } + + public interface QueryContentOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SavedQuery.QueryContent) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * An IAM Policy Analysis query, which could be used in
+     * the
+     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+     * rpc or the
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + * @return Whether the iamPolicyAnalysisQuery field is set. + */ + boolean hasIamPolicyAnalysisQuery(); + /** + *
+     * An IAM Policy Analysis query, which could be used in
+     * the
+     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+     * rpc or the
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + * @return The iamPolicyAnalysisQuery. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery getIamPolicyAnalysisQuery(); + /** + *
+     * An IAM Policy Analysis query, which could be used in
+     * the
+     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+     * rpc or the
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getIamPolicyAnalysisQueryOrBuilder(); + + public com.google.cloud.asset.v1.SavedQuery.QueryContent.QueryContentCase getQueryContentCase(); + } + /** + *
+   * The query content.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SavedQuery.QueryContent} + */ + public static final class QueryContent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SavedQuery.QueryContent) + QueryContentOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryContent.newBuilder() to construct. + private QueryContent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QueryContent() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryContent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryContent( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (queryContentCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_).toBuilder(); + } + queryContent_ = + input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); + queryContent_ = subBuilder.buildPartial(); + } + queryContentCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SavedQuery.QueryContent.class, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder.class); + } + + private int queryContentCase_ = 0; + private java.lang.Object queryContent_; + public enum QueryContentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + IAM_POLICY_ANALYSIS_QUERY(1), + QUERYCONTENT_NOT_SET(0); + private final int value; + private QueryContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static QueryContentCase valueOf(int value) { + return forNumber(value); + } + + public static QueryContentCase forNumber(int value) { + switch (value) { + case 1: return IAM_POLICY_ANALYSIS_QUERY; + case 0: return QUERYCONTENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public QueryContentCase + getQueryContentCase() { + return QueryContentCase.forNumber( + queryContentCase_); + } + + public static final int IAM_POLICY_ANALYSIS_QUERY_FIELD_NUMBER = 1; + /** + *
+     * An IAM Policy Analysis query, which could be used in
+     * the
+     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+     * rpc or the
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + * @return Whether the iamPolicyAnalysisQuery field is set. + */ + @java.lang.Override + public boolean hasIamPolicyAnalysisQuery() { + return queryContentCase_ == 1; + } + /** + *
+     * An IAM Policy Analysis query, which could be used in
+     * the
+     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+     * rpc or the
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + * @return The iamPolicyAnalysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getIamPolicyAnalysisQuery() { + if (queryContentCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + /** + *
+     * An IAM Policy Analysis query, which could be used in
+     * the
+     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+     * rpc or the
+     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+     * rpc.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getIamPolicyAnalysisQueryOrBuilder() { + if (queryContentCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (queryContentCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (queryContentCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.SavedQuery.QueryContent)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.SavedQuery.QueryContent other = (com.google.cloud.asset.v1.SavedQuery.QueryContent) obj; + + if (!getQueryContentCase().equals(other.getQueryContentCase())) return false; + switch (queryContentCase_) { + case 1: + if (!getIamPolicyAnalysisQuery() + .equals(other.getIamPolicyAnalysisQuery())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (queryContentCase_) { + case 1: + hash = (37 * hash) + IAM_POLICY_ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicyAnalysisQuery().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.SavedQuery.QueryContent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The query content.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SavedQuery.QueryContent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SavedQuery.QueryContent) + com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SavedQuery.QueryContent.class, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.SavedQuery.QueryContent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + queryContentCase_ = 0; + queryContent_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery.QueryContent getDefaultInstanceForType() { + return com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery.QueryContent build() { + com.google.cloud.asset.v1.SavedQuery.QueryContent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery.QueryContent buildPartial() { + com.google.cloud.asset.v1.SavedQuery.QueryContent result = new com.google.cloud.asset.v1.SavedQuery.QueryContent(this); + if (queryContentCase_ == 1) { + if (iamPolicyAnalysisQueryBuilder_ == null) { + result.queryContent_ = queryContent_; + } else { + result.queryContent_ = iamPolicyAnalysisQueryBuilder_.build(); + } + } + result.queryContentCase_ = queryContentCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.SavedQuery.QueryContent) { + return mergeFrom((com.google.cloud.asset.v1.SavedQuery.QueryContent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.SavedQuery.QueryContent other) { + if (other == com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance()) return this; + switch (other.getQueryContentCase()) { + case IAM_POLICY_ANALYSIS_QUERY: { + mergeIamPolicyAnalysisQuery(other.getIamPolicyAnalysisQuery()); + break; + } + case QUERYCONTENT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.SavedQuery.QueryContent parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.SavedQuery.QueryContent) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int queryContentCase_ = 0; + private java.lang.Object queryContent_; + public QueryContentCase + getQueryContentCase() { + return QueryContentCase.forNumber( + queryContentCase_); + } + + public Builder clearQueryContent() { + queryContentCase_ = 0; + queryContent_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> iamPolicyAnalysisQueryBuilder_; + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + * @return Whether the iamPolicyAnalysisQuery field is set. + */ + @java.lang.Override + public boolean hasIamPolicyAnalysisQuery() { + return queryContentCase_ == 1; + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + * @return The iamPolicyAnalysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getIamPolicyAnalysisQuery() { + if (iamPolicyAnalysisQueryBuilder_ == null) { + if (queryContentCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } else { + if (queryContentCase_ == 1) { + return iamPolicyAnalysisQueryBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + public Builder setIamPolicyAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (iamPolicyAnalysisQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryContent_ = value; + onChanged(); + } else { + iamPolicyAnalysisQueryBuilder_.setMessage(value); + } + queryContentCase_ = 1; + return this; + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + public Builder setIamPolicyAnalysisQuery( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (iamPolicyAnalysisQueryBuilder_ == null) { + queryContent_ = builderForValue.build(); + onChanged(); + } else { + iamPolicyAnalysisQueryBuilder_.setMessage(builderForValue.build()); + } + queryContentCase_ = 1; + return this; + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + public Builder mergeIamPolicyAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (iamPolicyAnalysisQueryBuilder_ == null) { + if (queryContentCase_ == 1 && + queryContent_ != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance()) { + queryContent_ = com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_) + .mergeFrom(value).buildPartial(); + } else { + queryContent_ = value; + } + onChanged(); + } else { + if (queryContentCase_ == 1) { + iamPolicyAnalysisQueryBuilder_.mergeFrom(value); + } else { + iamPolicyAnalysisQueryBuilder_.setMessage(value); + } + } + queryContentCase_ = 1; + return this; + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + public Builder clearIamPolicyAnalysisQuery() { + if (iamPolicyAnalysisQueryBuilder_ == null) { + if (queryContentCase_ == 1) { + queryContentCase_ = 0; + queryContent_ = null; + onChanged(); + } + } else { + if (queryContentCase_ == 1) { + queryContentCase_ = 0; + queryContent_ = null; + } + iamPolicyAnalysisQueryBuilder_.clear(); + } + return this; + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getIamPolicyAnalysisQueryBuilder() { + return getIamPolicyAnalysisQueryFieldBuilder().getBuilder(); + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getIamPolicyAnalysisQueryOrBuilder() { + if ((queryContentCase_ == 1) && (iamPolicyAnalysisQueryBuilder_ != null)) { + return iamPolicyAnalysisQueryBuilder_.getMessageOrBuilder(); + } else { + if (queryContentCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + } + /** + *
+       * An IAM Policy Analysis query, which could be used in
+       * the
+       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
+       * rpc or the
+       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
+       * rpc.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + getIamPolicyAnalysisQueryFieldBuilder() { + if (iamPolicyAnalysisQueryBuilder_ == null) { + if (!(queryContentCase_ == 1)) { + queryContent_ = com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + iamPolicyAnalysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_, + getParentForChildren(), + isClean()); + queryContent_ = null; + } + queryContentCase_ = 1; + onChanged();; + return iamPolicyAnalysisQueryBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SavedQuery.QueryContent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SavedQuery.QueryContent) + private static final com.google.cloud.asset.v1.SavedQuery.QueryContent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SavedQuery.QueryContent(); + } + + public static com.google.cloud.asset.v1.SavedQuery.QueryContent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryContent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryContent(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery.QueryContent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The resource name of the saved query. The format must be:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The resource name of the saved query. The format must be:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + *
+   * The description of this saved query. This value should be fewer than 255
+   * characters.
+   * 
+ * + * string description = 2; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * The description of this saved query. This value should be fewer than 255
+   * characters.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The create time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The create time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The create time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int CREATOR_FIELD_NUMBER = 4; + private volatile java.lang.Object creator_; + /** + *
+   * Output only. The account's email address who has created this saved query.
+   * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The creator. + */ + @java.lang.Override + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } + } + /** + *
+   * Output only. The account's email address who has created this saved query.
+   * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for creator. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastUpdateTime_; + /** + *
+   * Output only. The last update time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the lastUpdateTime field is set. + */ + @java.lang.Override + public boolean hasLastUpdateTime() { + return lastUpdateTime_ != null; + } + /** + *
+   * Output only. The last update time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUpdateTime() { + return lastUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastUpdateTime_; + } + /** + *
+   * Output only. The last update time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + return getLastUpdateTime(); + } + + public static final int LAST_UPDATER_FIELD_NUMBER = 6; + private volatile java.lang.Object lastUpdater_; + /** + *
+   * Output only. The account's email address who has updated this saved query
+   * most recently.
+   * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastUpdater. + */ + @java.lang.Override + public java.lang.String getLastUpdater() { + java.lang.Object ref = lastUpdater_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastUpdater_ = s; + return s; + } + } + /** + *
+   * Output only. The account's email address who has updated this saved query
+   * most recently.
+   * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for lastUpdater. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLastUpdaterBytes() { + java.lang.Object ref = lastUpdater_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lastUpdater_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 7; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CONTENT_FIELD_NUMBER = 8; + private com.google.cloud.asset.v1.SavedQuery.QueryContent content_; + /** + *
+   * The query content.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return content_ != null; + } + /** + *
+   * The query content.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + * @return The content. + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery.QueryContent getContent() { + return content_ == null ? com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance() : content_; + } + /** + *
+   * The query content.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder getContentOrBuilder() { + return getContent(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, creator_); + } + if (lastUpdateTime_ != null) { + output.writeMessage(5, getLastUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastUpdater_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, lastUpdater_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 7); + if (content_ != null) { + output.writeMessage(8, getContent()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getCreateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, creator_); + } + if (lastUpdateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getLastUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastUpdater_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, lastUpdater_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, labels__); + } + if (content_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getContent()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.SavedQuery)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.SavedQuery other = (com.google.cloud.asset.v1.SavedQuery) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime() + .equals(other.getCreateTime())) return false; + } + if (!getCreator() + .equals(other.getCreator())) return false; + if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; + if (hasLastUpdateTime()) { + if (!getLastUpdateTime() + .equals(other.getLastUpdateTime())) return false; + } + if (!getLastUpdater() + .equals(other.getLastUpdater())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent() + .equals(other.getContent())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + CREATOR_FIELD_NUMBER; + hash = (53 * hash) + getCreator().hashCode(); + if (hasLastUpdateTime()) { + hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdateTime().hashCode(); + } + hash = (37 * hash) + LAST_UPDATER_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdater().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SavedQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SavedQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.SavedQuery prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A saved query which can be shared with others or used later.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SavedQuery} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SavedQuery) + com.google.cloud.asset.v1.SavedQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SavedQuery.class, com.google.cloud.asset.v1.SavedQuery.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.SavedQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + creator_ = ""; + + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + lastUpdater_ = ""; + + internalGetMutableLabels().clear(); + if (contentBuilder_ == null) { + content_ = null; + } else { + content_ = null; + contentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery getDefaultInstanceForType() { + return com.google.cloud.asset.v1.SavedQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery build() { + com.google.cloud.asset.v1.SavedQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery buildPartial() { + com.google.cloud.asset.v1.SavedQuery result = new com.google.cloud.asset.v1.SavedQuery(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.creator_ = creator_; + if (lastUpdateTimeBuilder_ == null) { + result.lastUpdateTime_ = lastUpdateTime_; + } else { + result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); + } + result.lastUpdater_ = lastUpdater_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (contentBuilder_ == null) { + result.content_ = content_; + } else { + result.content_ = contentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.SavedQuery) { + return mergeFrom((com.google.cloud.asset.v1.SavedQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.SavedQuery other) { + if (other == com.google.cloud.asset.v1.SavedQuery.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getCreator().isEmpty()) { + creator_ = other.creator_; + onChanged(); + } + if (other.hasLastUpdateTime()) { + mergeLastUpdateTime(other.getLastUpdateTime()); + } + if (!other.getLastUpdater().isEmpty()) { + lastUpdater_ = other.lastUpdater_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + if (other.hasContent()) { + mergeContent(other.getContent()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.SavedQuery parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.SavedQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The resource name of the saved query. The format must be:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource name of the saved query. The format must be:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource name of the saved query. The format must be:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The resource name of the saved query. The format must be:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The resource name of the saved query. The format must be:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * The description of this saved query. This value should be fewer than 255
+     * characters.
+     * 
+ * + * string description = 2; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The description of this saved query. This value should be fewer than 255
+     * characters.
+     * 
+ * + * string description = 2; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The description of this saved query. This value should be fewer than 255
+     * characters.
+     * 
+ * + * string description = 2; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * The description of this saved query. This value should be fewer than 255
+     * characters.
+     * 
+ * + * string description = 2; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * The description of this saved query. This value should be fewer than 255
+     * characters.
+     * 
+ * + * string description = 2; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setCreateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + } + /** + *
+     * Output only. The create time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), + getParentForChildren(), + isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.lang.Object creator_ = ""; + /** + *
+     * Output only. The account's email address who has created this saved query.
+     * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The creator. + */ + public java.lang.String getCreator() { + java.lang.Object ref = creator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + creator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The account's email address who has created this saved query.
+     * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for creator. + */ + public com.google.protobuf.ByteString + getCreatorBytes() { + java.lang.Object ref = creator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + creator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The account's email address who has created this saved query.
+     * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The creator to set. + * @return This builder for chaining. + */ + public Builder setCreator( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + creator_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The account's email address who has created this saved query.
+     * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearCreator() { + + creator_ = getDefaultInstance().getCreator(); + onChanged(); + return this; + } + /** + *
+     * Output only. The account's email address who has created this saved query.
+     * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for creator to set. + * @return This builder for chaining. + */ + public Builder setCreatorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + creator_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastUpdateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastUpdateTimeBuilder_; + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the lastUpdateTime field is set. + */ + public boolean hasLastUpdateTime() { + return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastUpdateTime. + */ + public com.google.protobuf.Timestamp getLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + return lastUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastUpdateTime_; + } else { + return lastUpdateTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUpdateTime_ = value; + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setLastUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = builderForValue.build(); + onChanged(); + } else { + lastUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (lastUpdateTime_ != null) { + lastUpdateTime_ = + com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_).mergeFrom(value).buildPartial(); + } else { + lastUpdateTime_ = value; + } + onChanged(); + } else { + lastUpdateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = null; + onChanged(); + } else { + lastUpdateTime_ = null; + lastUpdateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { + + onChanged(); + return getLastUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + if (lastUpdateTimeBuilder_ != null) { + return lastUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUpdateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : lastUpdateTime_; + } + } + /** + *
+     * Output only. The last update time of this saved query.
+     * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getLastUpdateTimeFieldBuilder() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getLastUpdateTime(), + getParentForChildren(), + isClean()); + lastUpdateTime_ = null; + } + return lastUpdateTimeBuilder_; + } + + private java.lang.Object lastUpdater_ = ""; + /** + *
+     * Output only. The account's email address who has updated this saved query
+     * most recently.
+     * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastUpdater. + */ + public java.lang.String getLastUpdater() { + java.lang.Object ref = lastUpdater_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastUpdater_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The account's email address who has updated this saved query
+     * most recently.
+     * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for lastUpdater. + */ + public com.google.protobuf.ByteString + getLastUpdaterBytes() { + java.lang.Object ref = lastUpdater_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lastUpdater_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The account's email address who has updated this saved query
+     * most recently.
+     * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The lastUpdater to set. + * @return This builder for chaining. + */ + public Builder setLastUpdater( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lastUpdater_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The account's email address who has updated this saved query
+     * most recently.
+     * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return This builder for chaining. + */ + public Builder clearLastUpdater() { + + lastUpdater_ = getDefaultInstance().getLastUpdater(); + onChanged(); + return this; + } + /** + *
+     * Output only. The account's email address who has updated this saved query
+     * most recently.
+     * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param value The bytes for lastUpdater to set. + * @return This builder for chaining. + */ + public Builder setLastUpdaterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lastUpdater_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels applied on the resource.
+     * This value should not contain more than 10 entries. The key and value of
+     * each entry must be non-empty and fewer than 64 characters.
+     * 
+ * + * map<string, string> labels = 7; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels applied on the resource.
+     * This value should not contain more than 10 entries. The key and value of
+     * each entry must be non-empty and fewer than 64 characters.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels applied on the resource.
+     * This value should not contain more than 10 entries. The key and value of
+     * each entry must be non-empty and fewer than 64 characters.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels applied on the resource.
+     * This value should not contain more than 10 entries. The key and value of
+     * each entry must be non-empty and fewer than 64 characters.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels applied on the resource.
+     * This value should not contain more than 10 entries. The key and value of
+     * each entry must be non-empty and fewer than 64 characters.
+     * 
+ * + * map<string, string> labels = 7; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels applied on the resource.
+     * This value should not contain more than 10 entries. The key and value of
+     * each entry must be non-empty and fewer than 64 characters.
+     * 
+ * + * map<string, string> labels = 7; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels applied on the resource.
+     * This value should not contain more than 10 entries. The key and value of
+     * each entry must be non-empty and fewer than 64 characters.
+     * 
+ * + * map<string, string> labels = 7; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.cloud.asset.v1.SavedQuery.QueryContent content_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery.QueryContent, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder, com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder> contentBuilder_; + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + * @return Whether the content field is set. + */ + public boolean hasContent() { + return contentBuilder_ != null || content_ != null; + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + * @return The content. + */ + public com.google.cloud.asset.v1.SavedQuery.QueryContent getContent() { + if (contentBuilder_ == null) { + return content_ == null ? com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance() : content_; + } else { + return contentBuilder_.getMessage(); + } + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + public Builder setContent(com.google.cloud.asset.v1.SavedQuery.QueryContent value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + contentBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + public Builder setContent( + com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + public Builder mergeContent(com.google.cloud.asset.v1.SavedQuery.QueryContent value) { + if (contentBuilder_ == null) { + if (content_ != null) { + content_ = + com.google.cloud.asset.v1.SavedQuery.QueryContent.newBuilder(content_).mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + contentBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + public Builder clearContent() { + if (contentBuilder_ == null) { + content_ = null; + onChanged(); + } else { + content_ = null; + contentBuilder_ = null; + } + + return this; + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + public com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder getContentBuilder() { + + onChanged(); + return getContentFieldBuilder().getBuilder(); + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + public com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null ? + com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance() : content_; + } + } + /** + *
+     * The query content.
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery.QueryContent, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder, com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder> + getContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery.QueryContent, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder, com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder>( + getContent(), + getParentForChildren(), + isClean()); + content_ = null; + } + return contentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SavedQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SavedQuery) + private static final com.google.cloud.asset.v1.SavedQuery DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SavedQuery(); + } + + public static com.google.cloud.asset.v1.SavedQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SavedQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SavedQuery(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java new file mode 100644 index 000000000000..bd562e165a0a --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java @@ -0,0 +1,378 @@ +/* + * Copyright 2022 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.v1; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SavedQueryName implements ResourceName { + private static final PathTemplate PROJECT_SAVED_QUERY = + PathTemplate.createWithoutUrlEncoding("projects/{project}/savedQueries/{saved_query}"); + private static final PathTemplate FOLDER_SAVED_QUERY = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/savedQueries/{saved_query}"); + private static final PathTemplate ORGANIZATION_SAVED_QUERY = + PathTemplate.createWithoutUrlEncoding( + "organizations/{organization}/savedQueries/{saved_query}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String savedQuery; + private final String folder; + private final String organization; + + @Deprecated + protected SavedQueryName() { + project = null; + savedQuery = null; + folder = null; + organization = null; + } + + private SavedQueryName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + savedQuery = Preconditions.checkNotNull(builder.getSavedQuery()); + folder = null; + organization = null; + pathTemplate = PROJECT_SAVED_QUERY; + } + + private SavedQueryName(FolderSavedQueryBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + savedQuery = Preconditions.checkNotNull(builder.getSavedQuery()); + project = null; + organization = null; + pathTemplate = FOLDER_SAVED_QUERY; + } + + private SavedQueryName(OrganizationSavedQueryBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + savedQuery = Preconditions.checkNotNull(builder.getSavedQuery()); + project = null; + folder = null; + pathTemplate = ORGANIZATION_SAVED_QUERY; + } + + public String getProject() { + return project; + } + + public String getSavedQuery() { + return savedQuery; + } + + public String getFolder() { + return folder; + } + + public String getOrganization() { + return organization; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectSavedQueryBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderSavedQueryBuilder newFolderSavedQueryBuilder() { + return new FolderSavedQueryBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationSavedQueryBuilder newOrganizationSavedQueryBuilder() { + return new OrganizationSavedQueryBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SavedQueryName of(String project, String savedQuery) { + return newBuilder().setProject(project).setSavedQuery(savedQuery).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SavedQueryName ofProjectSavedQueryName(String project, String savedQuery) { + return newBuilder().setProject(project).setSavedQuery(savedQuery).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SavedQueryName ofFolderSavedQueryName(String folder, String savedQuery) { + return newFolderSavedQueryBuilder().setFolder(folder).setSavedQuery(savedQuery).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SavedQueryName ofOrganizationSavedQueryName( + String organization, String savedQuery) { + return newOrganizationSavedQueryBuilder() + .setOrganization(organization) + .setSavedQuery(savedQuery) + .build(); + } + + public static String format(String project, String savedQuery) { + return newBuilder().setProject(project).setSavedQuery(savedQuery).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectSavedQueryName(String project, String savedQuery) { + return newBuilder().setProject(project).setSavedQuery(savedQuery).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderSavedQueryName(String folder, String savedQuery) { + return newFolderSavedQueryBuilder() + .setFolder(folder) + .setSavedQuery(savedQuery) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationSavedQueryName(String organization, String savedQuery) { + return newOrganizationSavedQueryBuilder() + .setOrganization(organization) + .setSavedQuery(savedQuery) + .build() + .toString(); + } + + public static SavedQueryName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_SAVED_QUERY.matches(formattedString)) { + Map matchMap = PROJECT_SAVED_QUERY.match(formattedString); + return ofProjectSavedQueryName(matchMap.get("project"), matchMap.get("saved_query")); + } else if (FOLDER_SAVED_QUERY.matches(formattedString)) { + Map matchMap = FOLDER_SAVED_QUERY.match(formattedString); + return ofFolderSavedQueryName(matchMap.get("folder"), matchMap.get("saved_query")); + } else if (ORGANIZATION_SAVED_QUERY.matches(formattedString)) { + Map matchMap = ORGANIZATION_SAVED_QUERY.match(formattedString); + return ofOrganizationSavedQueryName( + matchMap.get("organization"), matchMap.get("saved_query")); + } + throw new ValidationException("SavedQueryName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SavedQueryName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_SAVED_QUERY.matches(formattedString) + || FOLDER_SAVED_QUERY.matches(formattedString) + || ORGANIZATION_SAVED_QUERY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (savedQuery != null) { + fieldMapBuilder.put("saved_query", savedQuery); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + SavedQueryName that = ((SavedQueryName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.savedQuery, that.savedQuery) + && Objects.equals(this.folder, that.folder) + && Objects.equals(this.organization, that.organization); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(savedQuery); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(organization); + return h; + } + + /** Builder for projects/{project}/savedQueries/{saved_query}. */ + public static class Builder { + private String project; + private String savedQuery; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getSavedQuery() { + return savedQuery; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setSavedQuery(String savedQuery) { + this.savedQuery = savedQuery; + return this; + } + + private Builder(SavedQueryName savedQueryName) { + Preconditions.checkArgument( + Objects.equals(savedQueryName.pathTemplate, PROJECT_SAVED_QUERY), + "toBuilder is only supported when SavedQueryName has the pattern of projects/{project}/savedQueries/{saved_query}"); + this.project = savedQueryName.project; + this.savedQuery = savedQueryName.savedQuery; + } + + public SavedQueryName build() { + return new SavedQueryName(this); + } + } + + /** Builder for folders/{folder}/savedQueries/{saved_query}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderSavedQueryBuilder { + private String folder; + private String savedQuery; + + protected FolderSavedQueryBuilder() {} + + public String getFolder() { + return folder; + } + + public String getSavedQuery() { + return savedQuery; + } + + public FolderSavedQueryBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderSavedQueryBuilder setSavedQuery(String savedQuery) { + this.savedQuery = savedQuery; + return this; + } + + public SavedQueryName build() { + return new SavedQueryName(this); + } + } + + /** Builder for organizations/{organization}/savedQueries/{saved_query}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationSavedQueryBuilder { + private String organization; + private String savedQuery; + + protected OrganizationSavedQueryBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getSavedQuery() { + return savedQuery; + } + + public OrganizationSavedQueryBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationSavedQueryBuilder setSavedQuery(String savedQuery) { + this.savedQuery = savedQuery; + return this; + } + + public SavedQueryName build() { + return new SavedQueryName(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java new file mode 100644 index 000000000000..96eeda6cf74d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java @@ -0,0 +1,246 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface SavedQueryOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SavedQuery) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The resource name of the saved query. The format must be:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The resource name of the saved query. The format must be:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The description of this saved query. This value should be fewer than 255
+   * characters.
+   * 
+ * + * string description = 2; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * The description of this saved query. This value should be fewer than 255
+   * characters.
+   * 
+ * + * string description = 2; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Output only. The create time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The create time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The create time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The account's email address who has created this saved query.
+   * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The creator. + */ + java.lang.String getCreator(); + /** + *
+   * Output only. The account's email address who has created this saved query.
+   * 
+ * + * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for creator. + */ + com.google.protobuf.ByteString + getCreatorBytes(); + + /** + *
+   * Output only. The last update time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return Whether the lastUpdateTime field is set. + */ + boolean hasLastUpdateTime(); + /** + *
+   * Output only. The last update time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastUpdateTime. + */ + com.google.protobuf.Timestamp getLastUpdateTime(); + /** + *
+   * Output only. The last update time of this saved query.
+   * 
+ * + * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); + + /** + *
+   * Output only. The account's email address who has updated this saved query
+   * most recently.
+   * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The lastUpdater. + */ + java.lang.String getLastUpdater(); + /** + *
+   * Output only. The account's email address who has updated this saved query
+   * most recently.
+   * 
+ * + * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return The bytes for lastUpdater. + */ + com.google.protobuf.ByteString + getLastUpdaterBytes(); + + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + int getLabelsCount(); + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels applied on the resource.
+   * This value should not contain more than 10 entries. The key and value of
+   * each entry must be non-empty and fewer than 64 characters.
+   * 
+ * + * map<string, string> labels = 7; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * The query content.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + * @return Whether the content field is set. + */ + boolean hasContent(); + /** + *
+   * The query content.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + * @return The content. + */ + com.google.cloud.asset.v1.SavedQuery.QueryContent getContent(); + /** + *
+   * The query content.
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; + */ + com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder getContentOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java new file mode 100644 index 000000000000..ee1eb9ddf53a --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java @@ -0,0 +1,2025 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Search all IAM policies request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesRequest} + */ +public final class SearchAllIamPoliciesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllIamPoliciesRequest) + SearchAllIamPoliciesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllIamPoliciesRequest.newBuilder() to construct. + private SearchAllIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllIamPoliciesRequest() { + scope_ = ""; + query_ = ""; + pageToken_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllIamPoliciesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllIamPoliciesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the IAM policies within the `scope`. The caller must
+   * be granted the
+   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the IAM policies within the `scope`. The caller must
+   * be granted the
+   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + private volatile java.lang.Object query_; + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * IAM policies within the specified `scope`. Note that the query string is
+   * compared against each Cloud IAM policy binding, including its principals,
+   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+   * contain the bindings that match your query. To learn more about the IAM
+   * policy structure, see the [IAM policy
+   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+   * Examples:
+   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+   *   "amy@gmail.com".
+   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+   *   the Compute Admin role.
+   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+   *   prefix of any word in the binding.
+   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+   *   bindings that specify a role containing "storage.buckets.update"
+   *   permission. Note that if callers don't have `iam.roles.get` access to a
+   *   role's included permissions, policy bindings that specify this role will
+   *   be dropped from the search results.
+   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+   *   role containing "upd" as a prefix of any word in the role permission.
+   *   Note that if callers don't have `iam.roles.get` access to a role's
+   *   included permissions, policy bindings that specify this role will be
+   *   dropped from the search results.
+   * * `resource:organizations/123456` to find IAM policy bindings
+   *   that are set on "organizations/123456".
+   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+   *   find IAM policy bindings that are set on the project named "myproject".
+   * * `Important` to find IAM policy bindings that contain "Important" as a
+   *   word in any of the searchable fields (except for the included
+   *   permissions).
+   * * `resource:(instance1 OR instance2) policy:amy` to find
+   *   IAM policy bindings that are set on resources "instance1" or
+   *   "instance2" and also specify user "amy".
+   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+   *   Compute Admin role.
+   * * `memberTypes:user` to find IAM policy bindings that contain the
+   *   principal type "user".
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * IAM policies within the specified `scope`. Note that the query string is
+   * compared against each Cloud IAM policy binding, including its principals,
+   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+   * contain the bindings that match your query. To learn more about the IAM
+   * policy structure, see the [IAM policy
+   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+   * Examples:
+   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+   *   "amy@gmail.com".
+   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+   *   the Compute Admin role.
+   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+   *   prefix of any word in the binding.
+   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+   *   bindings that specify a role containing "storage.buckets.update"
+   *   permission. Note that if callers don't have `iam.roles.get` access to a
+   *   role's included permissions, policy bindings that specify this role will
+   *   be dropped from the search results.
+   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+   *   role containing "upd" as a prefix of any word in the role permission.
+   *   Note that if callers don't have `iam.roles.get` access to a role's
+   *   included permissions, policy bindings that specify this role will be
+   *   dropped from the search results.
+   * * `resource:organizations/123456` to find IAM policy bindings
+   *   that are set on "organizations/123456".
+   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+   *   find IAM policy bindings that are set on the project named "myproject".
+   * * `Important` to find IAM policy bindings that contain "Important" as a
+   *   word in any of the searchable fields (except for the included
+   *   permissions).
+   * * `resource:(instance1 OR instance2) policy:amy` to find
+   *   IAM policy bindings that are set on resources "instance1" or
+   *   "instance2" and also specify user "amy".
+   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+   *   Compute Admin role.
+   * * `memberTypes:user` to find IAM policy bindings that contain the
+   *   principal type "user".
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+   * Optional. The page size for search result pagination. Page size is capped
+   * at 500 even if a larger value is given. If set to zero, server will pick an
+   * appropriate default. Returned results may be fewer than requested. When
+   * this happens, there could be more results as long as `next_page_token` is
+   * returned.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int ORDER_BY_FIELD_NUMBER = 7; + private volatile java.lang.Object orderBy_; + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "assetType DESC, resource".
+   * Only singular primitive fields in the response are sortable:
+   *   * resource
+   *   * assetType
+   *   * project
+   * All the other fields such as repeated fields (e.g., `folders`) and
+   * non-primitive fields (e.g., `policy`) are not supported.
+   * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "assetType DESC, resource".
+   * Only singular primitive fields in the response are sortable:
+   *   * resource
+   *   * assetType
+   *   * project
+   * All the other fields such as repeated fields (e.g., `folders`) and
+   * non-primitive fields (e.g., `policy`) are not supported.
+   * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, assetTypes_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest other = (com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) obj; + + if (!getScope() + .equals(other.getScope())) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllIamPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all IAM policies request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllIamPoliciesRequest) + com.google.cloud.asset.v1.SearchAllIamPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + scope_ = ""; + + query_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest build() { + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest buildPartial() { + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest result = new com.google.cloud.asset.v1.SearchAllIamPoliciesRequest(this); + int from_bitField0_ = bitField0_; + result.scope_ = scope_; + result.query_ = query_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) { + return mergeFrom((com.google.cloud.asset.v1.SearchAllIamPoliciesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllIamPoliciesRequest other) { + if (other == com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.getDefaultInstance()) return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object scope_ = ""; + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the IAM policies within the `scope`. The caller must
+     * be granted the
+     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the IAM policies within the `scope`. The caller must
+     * be granted the
+     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the IAM policies within the `scope`. The caller must
+     * be granted the
+     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the IAM policies within the `scope`. The caller must
+     * be granted the
+     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = getDefaultInstance().getScope(); + onChanged(); + return this; + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the IAM policies within the `scope`. The caller must
+     * be granted the
+     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scope_ = value; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * IAM policies within the specified `scope`. Note that the query string is
+     * compared against each Cloud IAM policy binding, including its principals,
+     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+     * contain the bindings that match your query. To learn more about the IAM
+     * policy structure, see the [IAM policy
+     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+     * Examples:
+     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+     *   "amy@gmail.com".
+     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+     *   the Compute Admin role.
+     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+     *   prefix of any word in the binding.
+     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+     *   bindings that specify a role containing "storage.buckets.update"
+     *   permission. Note that if callers don't have `iam.roles.get` access to a
+     *   role's included permissions, policy bindings that specify this role will
+     *   be dropped from the search results.
+     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+     *   role containing "upd" as a prefix of any word in the role permission.
+     *   Note that if callers don't have `iam.roles.get` access to a role's
+     *   included permissions, policy bindings that specify this role will be
+     *   dropped from the search results.
+     * * `resource:organizations/123456` to find IAM policy bindings
+     *   that are set on "organizations/123456".
+     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+     *   find IAM policy bindings that are set on the project named "myproject".
+     * * `Important` to find IAM policy bindings that contain "Important" as a
+     *   word in any of the searchable fields (except for the included
+     *   permissions).
+     * * `resource:(instance1 OR instance2) policy:amy` to find
+     *   IAM policy bindings that are set on resources "instance1" or
+     *   "instance2" and also specify user "amy".
+     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+     *   Compute Admin role.
+     * * `memberTypes:user` to find IAM policy bindings that contain the
+     *   principal type "user".
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * IAM policies within the specified `scope`. Note that the query string is
+     * compared against each Cloud IAM policy binding, including its principals,
+     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+     * contain the bindings that match your query. To learn more about the IAM
+     * policy structure, see the [IAM policy
+     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+     * Examples:
+     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+     *   "amy@gmail.com".
+     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+     *   the Compute Admin role.
+     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+     *   prefix of any word in the binding.
+     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+     *   bindings that specify a role containing "storage.buckets.update"
+     *   permission. Note that if callers don't have `iam.roles.get` access to a
+     *   role's included permissions, policy bindings that specify this role will
+     *   be dropped from the search results.
+     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+     *   role containing "upd" as a prefix of any word in the role permission.
+     *   Note that if callers don't have `iam.roles.get` access to a role's
+     *   included permissions, policy bindings that specify this role will be
+     *   dropped from the search results.
+     * * `resource:organizations/123456` to find IAM policy bindings
+     *   that are set on "organizations/123456".
+     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+     *   find IAM policy bindings that are set on the project named "myproject".
+     * * `Important` to find IAM policy bindings that contain "Important" as a
+     *   word in any of the searchable fields (except for the included
+     *   permissions).
+     * * `resource:(instance1 OR instance2) policy:amy` to find
+     *   IAM policy bindings that are set on resources "instance1" or
+     *   "instance2" and also specify user "amy".
+     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+     *   Compute Admin role.
+     * * `memberTypes:user` to find IAM policy bindings that contain the
+     *   principal type "user".
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * IAM policies within the specified `scope`. Note that the query string is
+     * compared against each Cloud IAM policy binding, including its principals,
+     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+     * contain the bindings that match your query. To learn more about the IAM
+     * policy structure, see the [IAM policy
+     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+     * Examples:
+     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+     *   "amy@gmail.com".
+     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+     *   the Compute Admin role.
+     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+     *   prefix of any word in the binding.
+     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+     *   bindings that specify a role containing "storage.buckets.update"
+     *   permission. Note that if callers don't have `iam.roles.get` access to a
+     *   role's included permissions, policy bindings that specify this role will
+     *   be dropped from the search results.
+     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+     *   role containing "upd" as a prefix of any word in the role permission.
+     *   Note that if callers don't have `iam.roles.get` access to a role's
+     *   included permissions, policy bindings that specify this role will be
+     *   dropped from the search results.
+     * * `resource:organizations/123456` to find IAM policy bindings
+     *   that are set on "organizations/123456".
+     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+     *   find IAM policy bindings that are set on the project named "myproject".
+     * * `Important` to find IAM policy bindings that contain "Important" as a
+     *   word in any of the searchable fields (except for the included
+     *   permissions).
+     * * `resource:(instance1 OR instance2) policy:amy` to find
+     *   IAM policy bindings that are set on resources "instance1" or
+     *   "instance2" and also specify user "amy".
+     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+     *   Compute Admin role.
+     * * `memberTypes:user` to find IAM policy bindings that contain the
+     *   principal type "user".
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * IAM policies within the specified `scope`. Note that the query string is
+     * compared against each Cloud IAM policy binding, including its principals,
+     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+     * contain the bindings that match your query. To learn more about the IAM
+     * policy structure, see the [IAM policy
+     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+     * Examples:
+     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+     *   "amy@gmail.com".
+     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+     *   the Compute Admin role.
+     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+     *   prefix of any word in the binding.
+     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+     *   bindings that specify a role containing "storage.buckets.update"
+     *   permission. Note that if callers don't have `iam.roles.get` access to a
+     *   role's included permissions, policy bindings that specify this role will
+     *   be dropped from the search results.
+     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+     *   role containing "upd" as a prefix of any word in the role permission.
+     *   Note that if callers don't have `iam.roles.get` access to a role's
+     *   included permissions, policy bindings that specify this role will be
+     *   dropped from the search results.
+     * * `resource:organizations/123456` to find IAM policy bindings
+     *   that are set on "organizations/123456".
+     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+     *   find IAM policy bindings that are set on the project named "myproject".
+     * * `Important` to find IAM policy bindings that contain "Important" as a
+     *   word in any of the searchable fields (except for the included
+     *   permissions).
+     * * `resource:(instance1 OR instance2) policy:amy` to find
+     *   IAM policy bindings that are set on resources "instance1" or
+     *   "instance2" and also specify user "amy".
+     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+     *   Compute Admin role.
+     * * `memberTypes:user` to find IAM policy bindings that contain the
+     *   principal type "user".
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * IAM policies within the specified `scope`. Note that the query string is
+     * compared against each Cloud IAM policy binding, including its principals,
+     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+     * contain the bindings that match your query. To learn more about the IAM
+     * policy structure, see the [IAM policy
+     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+     * Examples:
+     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+     *   "amy@gmail.com".
+     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+     *   the Compute Admin role.
+     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+     *   prefix of any word in the binding.
+     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+     *   bindings that specify a role containing "storage.buckets.update"
+     *   permission. Note that if callers don't have `iam.roles.get` access to a
+     *   role's included permissions, policy bindings that specify this role will
+     *   be dropped from the search results.
+     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+     *   role containing "upd" as a prefix of any word in the role permission.
+     *   Note that if callers don't have `iam.roles.get` access to a role's
+     *   included permissions, policy bindings that specify this role will be
+     *   dropped from the search results.
+     * * `resource:organizations/123456` to find IAM policy bindings
+     *   that are set on "organizations/123456".
+     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+     *   find IAM policy bindings that are set on the project named "myproject".
+     * * `Important` to find IAM policy bindings that contain "Important" as a
+     *   word in any of the searchable fields (except for the included
+     *   permissions).
+     * * `resource:(instance1 OR instance2) policy:amy` to find
+     *   IAM policy bindings that are set on resources "instance1" or
+     *   "instance2" and also specify user "amy".
+     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+     *   Compute Admin role.
+     * * `memberTypes:user` to find IAM policy bindings that contain the
+     *   principal type "user".
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The page size for search result pagination. Page size is capped
+     * at 500 even if a larger value is given. If set to zero, server will pick an
+     * appropriate default. Returned results may be fewer than requested. When
+     * this happens, there could be more results as long as `next_page_token` is
+     * returned.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped
+     * at 500 even if a larger value is given. If set to zero, server will pick an
+     * appropriate default. Returned results may be fewer than requested. When
+     * this happens, there could be more results as long as `next_page_token` is
+     * returned.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped
+     * at 500 even if a larger value is given. If set to zero, server will pick an
+     * appropriate default. Returned results may be fewer than requested. When
+     * this happens, there could be more results as long as `next_page_token` is
+     * returned.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding
+     * call to this method. `page_token` must be the value of `next_page_token`
+     * from the previous response. The values of all other method parameters must
+     * be identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that the IAM policies are attached to. If
+     * empty, it will search the IAM policies that are attached to all the
+     * [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+     * starts with "compute.googleapis.com".
+     * * ".*Instance" snapshots IAM policies attached to asset type ends with
+     * "Instance".
+     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+     * "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "assetType DESC, resource".
+     * Only singular primitive fields in the response are sortable:
+     *   * resource
+     *   * assetType
+     *   * project
+     * All the other fields such as repeated fields (e.g., `folders`) and
+     * non-primitive fields (e.g., `policy`) are not supported.
+     * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "assetType DESC, resource".
+     * Only singular primitive fields in the response are sortable:
+     *   * resource
+     *   * assetType
+     *   * project
+     * All the other fields such as repeated fields (e.g., `folders`) and
+     * non-primitive fields (e.g., `policy`) are not supported.
+     * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "assetType DESC, resource".
+     * Only singular primitive fields in the response are sortable:
+     *   * resource
+     *   * assetType
+     *   * project
+     * All the other fields such as repeated fields (e.g., `folders`) and
+     * non-primitive fields (e.g., `policy`) are not supported.
+     * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "assetType DESC, resource".
+     * Only singular primitive fields in the response are sortable:
+     *   * resource
+     *   * assetType
+     *   * project
+     * All the other fields such as repeated fields (e.g., `folders`) and
+     * non-primitive fields (e.g., `policy`) are not supported.
+     * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "assetType DESC, resource".
+     * Only singular primitive fields in the response are sortable:
+     *   * resource
+     *   * assetType
+     *   * project
+     * All the other fields such as repeated fields (e.g., `folders`) and
+     * non-primitive fields (e.g., `policy`) are not supported.
+     * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllIamPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllIamPoliciesRequest) + private static final com.google.cloud.asset.v1.SearchAllIamPoliciesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllIamPoliciesRequest(); + } + + public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllIamPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllIamPoliciesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..5922758b60d5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java @@ -0,0 +1,316 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface SearchAllIamPoliciesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllIamPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the IAM policies within the `scope`. The caller must
+   * be granted the
+   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + java.lang.String getScope(); + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the IAM policies within the `scope`. The caller must
+   * be granted the
+   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + com.google.protobuf.ByteString + getScopeBytes(); + + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * IAM policies within the specified `scope`. Note that the query string is
+   * compared against each Cloud IAM policy binding, including its principals,
+   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+   * contain the bindings that match your query. To learn more about the IAM
+   * policy structure, see the [IAM policy
+   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+   * Examples:
+   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+   *   "amy@gmail.com".
+   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+   *   the Compute Admin role.
+   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+   *   prefix of any word in the binding.
+   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+   *   bindings that specify a role containing "storage.buckets.update"
+   *   permission. Note that if callers don't have `iam.roles.get` access to a
+   *   role's included permissions, policy bindings that specify this role will
+   *   be dropped from the search results.
+   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+   *   role containing "upd" as a prefix of any word in the role permission.
+   *   Note that if callers don't have `iam.roles.get` access to a role's
+   *   included permissions, policy bindings that specify this role will be
+   *   dropped from the search results.
+   * * `resource:organizations/123456` to find IAM policy bindings
+   *   that are set on "organizations/123456".
+   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+   *   find IAM policy bindings that are set on the project named "myproject".
+   * * `Important` to find IAM policy bindings that contain "Important" as a
+   *   word in any of the searchable fields (except for the included
+   *   permissions).
+   * * `resource:(instance1 OR instance2) policy:amy` to find
+   *   IAM policy bindings that are set on resources "instance1" or
+   *   "instance2" and also specify user "amy".
+   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+   *   Compute Admin role.
+   * * `memberTypes:user` to find IAM policy bindings that contain the
+   *   principal type "user".
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * IAM policies within the specified `scope`. Note that the query string is
+   * compared against each Cloud IAM policy binding, including its principals,
+   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
+   * contain the bindings that match your query. To learn more about the IAM
+   * policy structure, see the [IAM policy
+   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
+   * Examples:
+   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
+   *   "amy@gmail.com".
+   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
+   *   the Compute Admin role.
+   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
+   *   prefix of any word in the binding.
+   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
+   *   bindings that specify a role containing "storage.buckets.update"
+   *   permission. Note that if callers don't have `iam.roles.get` access to a
+   *   role's included permissions, policy bindings that specify this role will
+   *   be dropped from the search results.
+   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
+   *   role containing "upd" as a prefix of any word in the role permission.
+   *   Note that if callers don't have `iam.roles.get` access to a role's
+   *   included permissions, policy bindings that specify this role will be
+   *   dropped from the search results.
+   * * `resource:organizations/123456` to find IAM policy bindings
+   *   that are set on "organizations/123456".
+   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
+   *   find IAM policy bindings that are set on the project named "myproject".
+   * * `Important` to find IAM policy bindings that contain "Important" as a
+   *   word in any of the searchable fields (except for the included
+   *   permissions).
+   * * `resource:(instance1 OR instance2) policy:amy` to find
+   *   IAM policy bindings that are set on resources "instance1" or
+   *   "instance2" and also specify user "amy".
+   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
+   *   Compute Admin role.
+   * * `memberTypes:user` to find IAM policy bindings that contain the
+   *   principal type "user".
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + + /** + *
+   * Optional. The page size for search result pagination. Page size is capped
+   * at 500 even if a larger value is given. If set to zero, server will pick an
+   * appropriate default. Returned results may be fewer than requested. When
+   * this happens, there could be more results as long as `next_page_token` is
+   * returned.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding
+   * call to this method. `page_token` must be the value of `next_page_token`
+   * from the previous response. The values of all other method parameters must
+   * be identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * Optional. A list of asset types that the IAM policies are attached to. If
+   * empty, it will search the IAM policies that are attached to all the
+   * [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
+   * starts with "compute.googleapis.com".
+   * * ".*Instance" snapshots IAM policies attached to asset type ends with
+   * "Instance".
+   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
+   * "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "assetType DESC, resource".
+   * Only singular primitive fields in the response are sortable:
+   *   * resource
+   *   * assetType
+   *   * project
+   * All the other fields such as repeated fields (e.g., `folders`) and
+   * non-primitive fields (e.g., `policy`) are not supported.
+   * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "assetType DESC, resource".
+   * Only singular primitive fields in the response are sortable:
+   *   * resource
+   *   * assetType
+   *   * project
+   * All the other fields such as repeated fields (e.g., `folders`) and
+   * non-primitive fields (e.g., `policy`) are not supported.
+   * 
+ * + * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java new file mode 100644 index 000000000000..fa526bc5f7ac --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java @@ -0,0 +1,1075 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Search all IAM policies response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesResponse} + */ +public final class SearchAllIamPoliciesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllIamPoliciesResponse) + SearchAllIamPoliciesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllIamPoliciesResponse.newBuilder() to construct. + private SearchAllIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllIamPoliciesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllIamPoliciesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllIamPoliciesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.asset.v1.IamPolicySearchResult.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResult getResults(int index) { + return results_.get(index); + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse other = (com.google.cloud.asset.v1.SearchAllIamPoliciesResponse) obj; + + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllIamPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all IAM policies response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllIamPoliciesResponse) + com.google.cloud.asset.v1.SearchAllIamPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse build() { + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse buildPartial() { + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse result = new com.google.cloud.asset.v1.SearchAllIamPoliciesResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesResponse) { + return mergeFrom((com.google.cloud.asset.v1.SearchAllIamPoliciesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllIamPoliciesResponse other) { + if (other == com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.getDefaultInstance()) return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.SearchAllIamPoliciesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicySearchResult, com.google.cloud.asset.v1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder> resultsBuilder_; + + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1.IamPolicySearchResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1.IamPolicySearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1.IamPolicySearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder addResults(com.google.cloud.asset.v1.IamPolicySearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1.IamPolicySearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder addResults( + com.google.cloud.asset.v1.IamPolicySearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1.IamPolicySearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1.IamPolicySearchResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1.IamPolicySearchResult.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance()); + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1.IamPolicySearchResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance()); + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicySearchResult, com.google.cloud.asset.v1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicySearchResult, com.google.cloud.asset.v1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllIamPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllIamPoliciesResponse) + private static final com.google.cloud.asset.v1.SearchAllIamPoliciesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllIamPoliciesResponse(); + } + + public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllIamPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllIamPoliciesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..e1866ae585cc --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface SearchAllIamPoliciesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllIamPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + java.util.List + getResultsList(); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + com.google.cloud.asset.v1.IamPolicySearchResult getResults(int index); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + int getResultsCount(); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; + */ + com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java new file mode 100644 index 000000000000..d1c31d44dcca --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java @@ -0,0 +1,2658 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Search all resources request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesRequest} + */ +public final class SearchAllResourcesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllResourcesRequest) + SearchAllResourcesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllResourcesRequest.newBuilder() to construct. + private SearchAllResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllResourcesRequest() { + scope_ = ""; + query_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllResourcesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllResourcesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: { + + pageSize_ = input.readInt32(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 66: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (readMask_ != null) { + subBuilder = readMask_.toBuilder(); + } + readMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readMask_); + readMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1.SearchAllResourcesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the resources within the `scope`. The caller must be
+   * granted the
+   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the resources within the `scope`. The caller must be
+   * granted the
+   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + private volatile java.lang.Object query_; + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * resources within the specified `scope`.
+   * Examples:
+   * * `name:Important` to find Cloud resources whose name contains
+   *   "Important" as a word.
+   * * `name=Important` to find the Cloud resource whose name is exactly
+   *   "Important".
+   * * `displayName:Impor*` to find Cloud resources whose display name
+   *   contains "Impor" as a prefix of any word in the field.
+   * * `location:us-west*` to find Cloud resources whose location contains both
+   *   "us" and "west" as prefixes.
+   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+   *   a key or value.
+   * * `labels.env:prod` to find Cloud resources that have a label "env"
+   *   and its value is "prod".
+   * * `labels.env:*` to find Cloud resources that have a label "env".
+   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+   *   encryption key whose name contains the word "key".
+   * * `relationships:instance-group-1` to find Cloud resources that have
+   *   relationships with "instance-group-1" in the related resource name.
+   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+   *   compute instances that have relationships with "instance-group-1" in the
+   *   compute instance group resource name, for relationship type
+   *   "INSTANCE_TO_INSTANCEGROUP".
+   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+   *   word.
+   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+   *   "ACTIVE" as a word.
+   * * `createTime<1609459200` to find Cloud resources that were created before
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `updateTime>1609459200` to find Cloud resources that were updated after
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `Important` to find Cloud resources that contain "Important" as a word
+   *   in any of the searchable fields.
+   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+   *   word in any of the searchable fields.
+   * * `Important location:(us-west1 OR global)` to find Cloud
+   *   resources that contain "Important" as a word in any of the searchable
+   *   fields and are also located in the "us-west1" region or the "global"
+   *   location.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * resources within the specified `scope`.
+   * Examples:
+   * * `name:Important` to find Cloud resources whose name contains
+   *   "Important" as a word.
+   * * `name=Important` to find the Cloud resource whose name is exactly
+   *   "Important".
+   * * `displayName:Impor*` to find Cloud resources whose display name
+   *   contains "Impor" as a prefix of any word in the field.
+   * * `location:us-west*` to find Cloud resources whose location contains both
+   *   "us" and "west" as prefixes.
+   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+   *   a key or value.
+   * * `labels.env:prod` to find Cloud resources that have a label "env"
+   *   and its value is "prod".
+   * * `labels.env:*` to find Cloud resources that have a label "env".
+   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+   *   encryption key whose name contains the word "key".
+   * * `relationships:instance-group-1` to find Cloud resources that have
+   *   relationships with "instance-group-1" in the related resource name.
+   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+   *   compute instances that have relationships with "instance-group-1" in the
+   *   compute instance group resource name, for relationship type
+   *   "INSTANCE_TO_INSTANCEGROUP".
+   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+   *   word.
+   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+   *   "ACTIVE" as a word.
+   * * `createTime<1609459200` to find Cloud resources that were created before
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `updateTime>1609459200` to find Cloud resources that were updated after
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `Important` to find Cloud resources that contain "Important" as a word
+   *   in any of the searchable fields.
+   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+   *   word in any of the searchable fields.
+   * * `Important location:(us-west1 OR global)` to find Cloud
+   *   resources that contain "Important" as a word in any of the searchable
+   *   fields and are also located in the "us-west1" region or the "global"
+   *   location.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + *
+   * Optional. The page size for search result pagination. Page size is capped
+   * at 500 even if a larger value is given. If set to zero, server will pick an
+   * appropriate default. Returned results may be fewer than requested. When
+   * this happens, there could be more results as long as `next_page_token` is
+   * returned.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pageToken_; + /** + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of all other
+   * method parameters, must be identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of all other
+   * method parameters, must be identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + private volatile java.lang.Object orderBy_; + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "location DESC, name".
+   * Only singular primitive fields in the response are sortable:
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * parentFullResourceName
+   *   * parentAssetType
+   * All the other fields such as repeated fields (e.g., `networkTags`), map
+   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+   * are not supported.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "location DESC, name".
+   * Only singular primitive fields in the response are sortable:
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * parentFullResourceName
+   *   * parentAssetType
+   * All the other fields such as repeated fields (e.g., `networkTags`), map
+   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+   * are not supported.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_MASK_FIELD_NUMBER = 8; + private com.google.protobuf.FieldMask readMask_; + /** + *
+   * Optional. A comma-separated list of fields specifying which fields to be
+   * returned in ResourceSearchResult. Only '*' or combination of top level
+   * fields can be specified. Field names of both snake_case and camelCase are
+   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+   * The read_mask paths must be valid field paths listed but not limited to
+   * (both snake_case and camelCase are supported):
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * tagKeys
+   *   * tagValues
+   *   * tagValueIds
+   *   * labels
+   *   * networkTags
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * additionalAttributes
+   *   * versionedResources
+   * If read_mask is not specified, all fields except versionedResources will
+   * be returned.
+   * If only '*' is specified, all fields including versionedResources will be
+   * returned.
+   * Any invalid field path will trigger INVALID_ARGUMENT error.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + *
+   * Optional. A comma-separated list of fields specifying which fields to be
+   * returned in ResourceSearchResult. Only '*' or combination of top level
+   * fields can be specified. Field names of both snake_case and camelCase are
+   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+   * The read_mask paths must be valid field paths listed but not limited to
+   * (both snake_case and camelCase are supported):
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * tagKeys
+   *   * tagValues
+   *   * tagValueIds
+   *   * labels
+   *   * networkTags
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * additionalAttributes
+   *   * versionedResources
+   * If read_mask is not specified, all fields except versionedResources will
+   * be returned.
+   * If only '*' is specified, all fields including versionedResources will be
+   * returned.
+   * Any invalid field path will trigger INVALID_ARGUMENT error.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + *
+   * Optional. A comma-separated list of fields specifying which fields to be
+   * returned in ResourceSearchResult. Only '*' or combination of top level
+   * fields can be specified. Field names of both snake_case and camelCase are
+   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+   * The read_mask paths must be valid field paths listed but not limited to
+   * (both snake_case and camelCase are supported):
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * tagKeys
+   *   * tagValues
+   *   * tagValueIds
+   *   * labels
+   *   * networkTags
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * additionalAttributes
+   *   * versionedResources
+   * If read_mask is not specified, all fields except versionedResources will
+   * be returned.
+   * If only '*' is specified, all fields including versionedResources will be
+   * returned.
+   * Any invalid field path will trigger INVALID_ARGUMENT error.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return getReadMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + if (readMask_ != null) { + output.writeMessage(8, getReadMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + if (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getReadMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.SearchAllResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.SearchAllResourcesRequest other = (com.google.cloud.asset.v1.SearchAllResourcesRequest) obj; + + if (!getScope() + .equals(other.getScope())) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (hasReadMask() != other.hasReadMask()) return false; + if (hasReadMask()) { + if (!getReadMask() + .equals(other.getReadMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + if (hasReadMask()) { + hash = (37 * hash) + READ_MASK_FIELD_NUMBER; + hash = (53 * hash) + getReadMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllResourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all resources request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllResourcesRequest) + com.google.cloud.asset.v1.SearchAllResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1.SearchAllResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.SearchAllResourcesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + scope_ = ""; + + query_ = ""; + + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + pageSize_ = 0; + + pageToken_ = ""; + + orderBy_ = ""; + + if (readMaskBuilder_ == null) { + readMask_ = null; + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.SearchAllResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesRequest build() { + com.google.cloud.asset.v1.SearchAllResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesRequest buildPartial() { + com.google.cloud.asset.v1.SearchAllResourcesRequest result = new com.google.cloud.asset.v1.SearchAllResourcesRequest(this); + int from_bitField0_ = bitField0_; + result.scope_ = scope_; + result.query_ = query_; + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.orderBy_ = orderBy_; + if (readMaskBuilder_ == null) { + result.readMask_ = readMask_; + } else { + result.readMask_ = readMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.SearchAllResourcesRequest) { + return mergeFrom((com.google.cloud.asset.v1.SearchAllResourcesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllResourcesRequest other) { + if (other == com.google.cloud.asset.v1.SearchAllResourcesRequest.getDefaultInstance()) return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (other.hasReadMask()) { + mergeReadMask(other.getReadMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.SearchAllResourcesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.SearchAllResourcesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object scope_ = ""; + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the resources within the `scope`. The caller must be
+     * granted the
+     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the resources within the `scope`. The caller must be
+     * granted the
+     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the resources within the `scope`. The caller must be
+     * granted the
+     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the resources within the `scope`. The caller must be
+     * granted the
+     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = getDefaultInstance().getScope(); + onChanged(); + return this; + } + /** + *
+     * Required. A scope can be a project, a folder, or an organization. The
+     * search is limited to the resources within the `scope`. The caller must be
+     * granted the
+     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+     * permission on the desired scope.
+     * The allowed values are:
+     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scope_ = value; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * resources within the specified `scope`.
+     * Examples:
+     * * `name:Important` to find Cloud resources whose name contains
+     *   "Important" as a word.
+     * * `name=Important` to find the Cloud resource whose name is exactly
+     *   "Important".
+     * * `displayName:Impor*` to find Cloud resources whose display name
+     *   contains "Impor" as a prefix of any word in the field.
+     * * `location:us-west*` to find Cloud resources whose location contains both
+     *   "us" and "west" as prefixes.
+     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+     *   a key or value.
+     * * `labels.env:prod` to find Cloud resources that have a label "env"
+     *   and its value is "prod".
+     * * `labels.env:*` to find Cloud resources that have a label "env".
+     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+     *   encryption key whose name contains the word "key".
+     * * `relationships:instance-group-1` to find Cloud resources that have
+     *   relationships with "instance-group-1" in the related resource name.
+     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+     *   compute instances that have relationships with "instance-group-1" in the
+     *   compute instance group resource name, for relationship type
+     *   "INSTANCE_TO_INSTANCEGROUP".
+     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+     *   word.
+     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+     *   "ACTIVE" as a word.
+     * * `createTime<1609459200` to find Cloud resources that were created before
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `updateTime>1609459200` to find Cloud resources that were updated after
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `Important` to find Cloud resources that contain "Important" as a word
+     *   in any of the searchable fields.
+     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+     *   word in any of the searchable fields.
+     * * `Important location:(us-west1 OR global)` to find Cloud
+     *   resources that contain "Important" as a word in any of the searchable
+     *   fields and are also located in the "us-west1" region or the "global"
+     *   location.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * resources within the specified `scope`.
+     * Examples:
+     * * `name:Important` to find Cloud resources whose name contains
+     *   "Important" as a word.
+     * * `name=Important` to find the Cloud resource whose name is exactly
+     *   "Important".
+     * * `displayName:Impor*` to find Cloud resources whose display name
+     *   contains "Impor" as a prefix of any word in the field.
+     * * `location:us-west*` to find Cloud resources whose location contains both
+     *   "us" and "west" as prefixes.
+     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+     *   a key or value.
+     * * `labels.env:prod` to find Cloud resources that have a label "env"
+     *   and its value is "prod".
+     * * `labels.env:*` to find Cloud resources that have a label "env".
+     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+     *   encryption key whose name contains the word "key".
+     * * `relationships:instance-group-1` to find Cloud resources that have
+     *   relationships with "instance-group-1" in the related resource name.
+     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+     *   compute instances that have relationships with "instance-group-1" in the
+     *   compute instance group resource name, for relationship type
+     *   "INSTANCE_TO_INSTANCEGROUP".
+     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+     *   word.
+     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+     *   "ACTIVE" as a word.
+     * * `createTime<1609459200` to find Cloud resources that were created before
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `updateTime>1609459200` to find Cloud resources that were updated after
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `Important` to find Cloud resources that contain "Important" as a word
+     *   in any of the searchable fields.
+     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+     *   word in any of the searchable fields.
+     * * `Important location:(us-west1 OR global)` to find Cloud
+     *   resources that contain "Important" as a word in any of the searchable
+     *   fields and are also located in the "us-west1" region or the "global"
+     *   location.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * resources within the specified `scope`.
+     * Examples:
+     * * `name:Important` to find Cloud resources whose name contains
+     *   "Important" as a word.
+     * * `name=Important` to find the Cloud resource whose name is exactly
+     *   "Important".
+     * * `displayName:Impor*` to find Cloud resources whose display name
+     *   contains "Impor" as a prefix of any word in the field.
+     * * `location:us-west*` to find Cloud resources whose location contains both
+     *   "us" and "west" as prefixes.
+     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+     *   a key or value.
+     * * `labels.env:prod` to find Cloud resources that have a label "env"
+     *   and its value is "prod".
+     * * `labels.env:*` to find Cloud resources that have a label "env".
+     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+     *   encryption key whose name contains the word "key".
+     * * `relationships:instance-group-1` to find Cloud resources that have
+     *   relationships with "instance-group-1" in the related resource name.
+     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+     *   compute instances that have relationships with "instance-group-1" in the
+     *   compute instance group resource name, for relationship type
+     *   "INSTANCE_TO_INSTANCEGROUP".
+     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+     *   word.
+     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+     *   "ACTIVE" as a word.
+     * * `createTime<1609459200` to find Cloud resources that were created before
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `updateTime>1609459200` to find Cloud resources that were updated after
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `Important` to find Cloud resources that contain "Important" as a word
+     *   in any of the searchable fields.
+     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+     *   word in any of the searchable fields.
+     * * `Important location:(us-west1 OR global)` to find Cloud
+     *   resources that contain "Important" as a word in any of the searchable
+     *   fields and are also located in the "us-west1" region or the "global"
+     *   location.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * resources within the specified `scope`.
+     * Examples:
+     * * `name:Important` to find Cloud resources whose name contains
+     *   "Important" as a word.
+     * * `name=Important` to find the Cloud resource whose name is exactly
+     *   "Important".
+     * * `displayName:Impor*` to find Cloud resources whose display name
+     *   contains "Impor" as a prefix of any word in the field.
+     * * `location:us-west*` to find Cloud resources whose location contains both
+     *   "us" and "west" as prefixes.
+     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+     *   a key or value.
+     * * `labels.env:prod` to find Cloud resources that have a label "env"
+     *   and its value is "prod".
+     * * `labels.env:*` to find Cloud resources that have a label "env".
+     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+     *   encryption key whose name contains the word "key".
+     * * `relationships:instance-group-1` to find Cloud resources that have
+     *   relationships with "instance-group-1" in the related resource name.
+     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+     *   compute instances that have relationships with "instance-group-1" in the
+     *   compute instance group resource name, for relationship type
+     *   "INSTANCE_TO_INSTANCEGROUP".
+     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+     *   word.
+     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+     *   "ACTIVE" as a word.
+     * * `createTime<1609459200` to find Cloud resources that were created before
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `updateTime>1609459200` to find Cloud resources that were updated after
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `Important` to find Cloud resources that contain "Important" as a word
+     *   in any of the searchable fields.
+     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+     *   word in any of the searchable fields.
+     * * `Important location:(us-west1 OR global)` to find Cloud
+     *   resources that contain "Important" as a word in any of the searchable
+     *   fields and are also located in the "us-west1" region or the "global"
+     *   location.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement. See [how to construct a
+     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+     * for more information. If not specified or empty, it will search all the
+     * resources within the specified `scope`.
+     * Examples:
+     * * `name:Important` to find Cloud resources whose name contains
+     *   "Important" as a word.
+     * * `name=Important` to find the Cloud resource whose name is exactly
+     *   "Important".
+     * * `displayName:Impor*` to find Cloud resources whose display name
+     *   contains "Impor" as a prefix of any word in the field.
+     * * `location:us-west*` to find Cloud resources whose location contains both
+     *   "us" and "west" as prefixes.
+     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+     *   a key or value.
+     * * `labels.env:prod` to find Cloud resources that have a label "env"
+     *   and its value is "prod".
+     * * `labels.env:*` to find Cloud resources that have a label "env".
+     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+     *   encryption key whose name contains the word "key".
+     * * `relationships:instance-group-1` to find Cloud resources that have
+     *   relationships with "instance-group-1" in the related resource name.
+     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+     *   compute instances that have relationships with "instance-group-1" in the
+     *   compute instance group resource name, for relationship type
+     *   "INSTANCE_TO_INSTANCEGROUP".
+     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+     *   word.
+     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+     *   "ACTIVE" as a word.
+     * * `createTime<1609459200` to find Cloud resources that were created before
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `updateTime>1609459200` to find Cloud resources that were updated after
+     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+     *   "2021-01-01 00:00:00 UTC" in seconds.
+     * * `Important` to find Cloud resources that contain "Important" as a word
+     *   in any of the searchable fields.
+     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+     *   word in any of the searchable fields.
+     * * `Important location:(us-west1 OR global)` to find Cloud
+     *   resources that contain "Important" as a word in any of the searchable
+     *   fields and are also located in the "us-west1" region or the "global"
+     *   location.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty,
+     * it will search all the [searchable asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The page size for search result pagination. Page size is capped
+     * at 500 even if a larger value is given. If set to zero, server will pick an
+     * appropriate default. Returned results may be fewer than requested. When
+     * this happens, there could be more results as long as `next_page_token` is
+     * returned.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped
+     * at 500 even if a larger value is given. If set to zero, server will pick an
+     * appropriate default. Returned results may be fewer than requested. When
+     * this happens, there could be more results as long as `next_page_token` is
+     * returned.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped
+     * at 500 even if a larger value is given. If set to zero, server will pick an
+     * appropriate default. Returned results may be fewer than requested. When
+     * this happens, there could be more results as long as `next_page_token` is
+     * returned.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of all other
+     * method parameters, must be identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of all other
+     * method parameters, must be identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of all other
+     * method parameters, must be identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of all other
+     * method parameters, must be identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the
+     * preceding call to this method. `page_token` must be the value of
+     * `next_page_token` from the previous response. The values of all other
+     * method parameters, must be identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "location DESC, name".
+     * Only singular primitive fields in the response are sortable:
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * parentFullResourceName
+     *   * parentAssetType
+     * All the other fields such as repeated fields (e.g., `networkTags`), map
+     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+     * are not supported.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "location DESC, name".
+     * Only singular primitive fields in the response are sortable:
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * parentFullResourceName
+     *   * parentAssetType
+     * All the other fields such as repeated fields (e.g., `networkTags`), map
+     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+     * are not supported.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "location DESC, name".
+     * Only singular primitive fields in the response are sortable:
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * parentFullResourceName
+     *   * parentAssetType
+     * All the other fields such as repeated fields (e.g., `networkTags`), map
+     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+     * are not supported.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "location DESC, name".
+     * Only singular primitive fields in the response are sortable:
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * parentFullResourceName
+     *   * parentAssetType
+     * All the other fields such as repeated fields (e.g., `networkTags`), map
+     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+     * are not supported.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying the sorting order of
+     * the results. The default order is ascending. Add " DESC" after the field
+     * name to indicate descending order. Redundant space characters are ignored.
+     * Example: "location DESC, name".
+     * Only singular primitive fields in the response are sortable:
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * parentFullResourceName
+     *   * parentAssetType
+     * All the other fields such as repeated fields (e.g., `networkTags`), map
+     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+     * are not supported.
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask readMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> readMaskBuilder_; + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return readMaskBuilder_ != null || readMask_ != null; + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readMask. + */ + public com.google.protobuf.FieldMask getReadMask() { + if (readMaskBuilder_ == null) { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } else { + return readMaskBuilder_.getMessage(); + } + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readMask_ = value; + onChanged(); + } else { + readMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setReadMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (readMaskBuilder_ == null) { + readMask_ = builderForValue.build(); + onChanged(); + } else { + readMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeReadMask(com.google.protobuf.FieldMask value) { + if (readMaskBuilder_ == null) { + if (readMask_ != null) { + readMask_ = + com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); + } else { + readMask_ = value; + } + onChanged(); + } else { + readMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearReadMask() { + if (readMaskBuilder_ == null) { + readMask_ = null; + onChanged(); + } else { + readMask_ = null; + readMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + *
+     * Optional. A comma-separated list of fields specifying which fields to be
+     * returned in ResourceSearchResult. Only '*' or combination of top level
+     * fields can be specified. Field names of both snake_case and camelCase are
+     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+     * The read_mask paths must be valid field paths listed but not limited to
+     * (both snake_case and camelCase are supported):
+     *   * name
+     *   * assetType
+     *   * project
+     *   * displayName
+     *   * description
+     *   * location
+     *   * tagKeys
+     *   * tagValues
+     *   * tagValueIds
+     *   * labels
+     *   * networkTags
+     *   * kmsKey
+     *   * createTime
+     *   * updateTime
+     *   * state
+     *   * additionalAttributes
+     *   * versionedResources
+     * If read_mask is not specified, all fields except versionedResources will
+     * be returned.
+     * If only '*' is specified, all fields including versionedResources will be
+     * returned.
+     * Any invalid field path will trigger INVALID_ARGUMENT error.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getReadMaskFieldBuilder() { + if (readMaskBuilder_ == null) { + readMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getReadMask(), + getParentForChildren(), + isClean()); + readMask_ = null; + } + return readMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllResourcesRequest) + private static final com.google.cloud.asset.v1.SearchAllResourcesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllResourcesRequest(); + } + + public static com.google.cloud.asset.v1.SearchAllResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllResourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllResourcesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java new file mode 100644 index 000000000000..65d5c36ec558 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java @@ -0,0 +1,444 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface SearchAllResourcesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the resources within the `scope`. The caller must be
+   * granted the
+   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + java.lang.String getScope(); + /** + *
+   * Required. A scope can be a project, a folder, or an organization. The
+   * search is limited to the resources within the `scope`. The caller must be
+   * granted the
+   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
+   * permission on the desired scope.
+   * The allowed values are:
+   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
+   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
+   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
+   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + com.google.protobuf.ByteString + getScopeBytes(); + + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * resources within the specified `scope`.
+   * Examples:
+   * * `name:Important` to find Cloud resources whose name contains
+   *   "Important" as a word.
+   * * `name=Important` to find the Cloud resource whose name is exactly
+   *   "Important".
+   * * `displayName:Impor*` to find Cloud resources whose display name
+   *   contains "Impor" as a prefix of any word in the field.
+   * * `location:us-west*` to find Cloud resources whose location contains both
+   *   "us" and "west" as prefixes.
+   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+   *   a key or value.
+   * * `labels.env:prod` to find Cloud resources that have a label "env"
+   *   and its value is "prod".
+   * * `labels.env:*` to find Cloud resources that have a label "env".
+   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+   *   encryption key whose name contains the word "key".
+   * * `relationships:instance-group-1` to find Cloud resources that have
+   *   relationships with "instance-group-1" in the related resource name.
+   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+   *   compute instances that have relationships with "instance-group-1" in the
+   *   compute instance group resource name, for relationship type
+   *   "INSTANCE_TO_INSTANCEGROUP".
+   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+   *   word.
+   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+   *   "ACTIVE" as a word.
+   * * `createTime<1609459200` to find Cloud resources that were created before
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `updateTime>1609459200` to find Cloud resources that were updated after
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `Important` to find Cloud resources that contain "Important" as a word
+   *   in any of the searchable fields.
+   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+   *   word in any of the searchable fields.
+   * * `Important location:(us-west1 OR global)` to find Cloud
+   *   resources that contain "Important" as a word in any of the searchable
+   *   fields and are also located in the "us-west1" region or the "global"
+   *   location.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Optional. The query statement. See [how to construct a
+   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
+   * for more information. If not specified or empty, it will search all the
+   * resources within the specified `scope`.
+   * Examples:
+   * * `name:Important` to find Cloud resources whose name contains
+   *   "Important" as a word.
+   * * `name=Important` to find the Cloud resource whose name is exactly
+   *   "Important".
+   * * `displayName:Impor*` to find Cloud resources whose display name
+   *   contains "Impor" as a prefix of any word in the field.
+   * * `location:us-west*` to find Cloud resources whose location contains both
+   *   "us" and "west" as prefixes.
+   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
+   *   a key or value.
+   * * `labels.env:prod` to find Cloud resources that have a label "env"
+   *   and its value is "prod".
+   * * `labels.env:*` to find Cloud resources that have a label "env".
+   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
+   *   encryption key whose name contains the word "key".
+   * * `relationships:instance-group-1` to find Cloud resources that have
+   *   relationships with "instance-group-1" in the related resource name.
+   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
+   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
+   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
+   *   compute instances that have relationships with "instance-group-1" in the
+   *   compute instance group resource name, for relationship type
+   *   "INSTANCE_TO_INSTANCEGROUP".
+   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
+   *   word.
+   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
+   *   "ACTIVE" as a word.
+   * * `createTime<1609459200` to find Cloud resources that were created before
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `updateTime>1609459200` to find Cloud resources that were updated after
+   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
+   *   "2021-01-01 00:00:00 UTC" in seconds.
+   * * `Important` to find Cloud resources that contain "Important" as a word
+   *   in any of the searchable fields.
+   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
+   *   word in any of the searchable fields.
+   * * `Important location:(us-west1 OR global)` to find Cloud
+   *   resources that contain "Important" as a word in any of the searchable
+   *   fields and are also located in the "us-west1" region or the "global"
+   *   location.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * Optional. A list of asset types that this request searches for. If empty,
+   * it will search all the [searchable asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Optional. The page size for search result pagination. Page size is capped
+   * at 500 even if a larger value is given. If set to zero, server will pick an
+   * appropriate default. Returned results may be fewer than requested. When
+   * this happens, there could be more results as long as `next_page_token` is
+   * returned.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of all other
+   * method parameters, must be identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. If present, then retrieve the next batch of results from the
+   * preceding call to this method. `page_token` must be the value of
+   * `next_page_token` from the previous response. The values of all other
+   * method parameters, must be identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "location DESC, name".
+   * Only singular primitive fields in the response are sortable:
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * parentFullResourceName
+   *   * parentAssetType
+   * All the other fields such as repeated fields (e.g., `networkTags`), map
+   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+   * are not supported.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. A comma-separated list of fields specifying the sorting order of
+   * the results. The default order is ascending. Add " DESC" after the field
+   * name to indicate descending order. Redundant space characters are ignored.
+   * Example: "location DESC, name".
+   * Only singular primitive fields in the response are sortable:
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * parentFullResourceName
+   *   * parentAssetType
+   * All the other fields such as repeated fields (e.g., `networkTags`), map
+   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
+   * are not supported.
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); + + /** + *
+   * Optional. A comma-separated list of fields specifying which fields to be
+   * returned in ResourceSearchResult. Only '*' or combination of top level
+   * fields can be specified. Field names of both snake_case and camelCase are
+   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+   * The read_mask paths must be valid field paths listed but not limited to
+   * (both snake_case and camelCase are supported):
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * tagKeys
+   *   * tagValues
+   *   * tagValueIds
+   *   * labels
+   *   * networkTags
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * additionalAttributes
+   *   * versionedResources
+   * If read_mask is not specified, all fields except versionedResources will
+   * be returned.
+   * If only '*' is specified, all fields including versionedResources will be
+   * returned.
+   * Any invalid field path will trigger INVALID_ARGUMENT error.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + *
+   * Optional. A comma-separated list of fields specifying which fields to be
+   * returned in ResourceSearchResult. Only '*' or combination of top level
+   * fields can be specified. Field names of both snake_case and camelCase are
+   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+   * The read_mask paths must be valid field paths listed but not limited to
+   * (both snake_case and camelCase are supported):
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * tagKeys
+   *   * tagValues
+   *   * tagValueIds
+   *   * labels
+   *   * networkTags
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * additionalAttributes
+   *   * versionedResources
+   * If read_mask is not specified, all fields except versionedResources will
+   * be returned.
+   * If only '*' is specified, all fields including versionedResources will be
+   * returned.
+   * Any invalid field path will trigger INVALID_ARGUMENT error.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + *
+   * Optional. A comma-separated list of fields specifying which fields to be
+   * returned in ResourceSearchResult. Only '*' or combination of top level
+   * fields can be specified. Field names of both snake_case and camelCase are
+   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
+   * The read_mask paths must be valid field paths listed but not limited to
+   * (both snake_case and camelCase are supported):
+   *   * name
+   *   * assetType
+   *   * project
+   *   * displayName
+   *   * description
+   *   * location
+   *   * tagKeys
+   *   * tagValues
+   *   * tagValueIds
+   *   * labels
+   *   * networkTags
+   *   * kmsKey
+   *   * createTime
+   *   * updateTime
+   *   * state
+   *   * additionalAttributes
+   *   * versionedResources
+   * If read_mask is not specified, all fields except versionedResources will
+   * be returned.
+   * If only '*' is specified, all fields including versionedResources will be
+   * returned.
+   * Any invalid field path will trigger INVALID_ARGUMENT error.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java new file mode 100644 index 000000000000..652140b9c30e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java @@ -0,0 +1,1075 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Search all resources response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesResponse} + */ +public final class SearchAllResourcesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllResourcesResponse) + SearchAllResourcesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllResourcesResponse.newBuilder() to construct. + private SearchAllResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllResourcesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllResourcesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllResourcesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.asset.v1.ResourceSearchResult.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1.SearchAllResourcesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.ResourceSearchResult getResults(int index) { + return results_.get(index); + } + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.ResourceSearchResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.SearchAllResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.SearchAllResourcesResponse other = (com.google.cloud.asset.v1.SearchAllResourcesResponse) obj; + + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllResourcesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all resources response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllResourcesResponse) + com.google.cloud.asset.v1.SearchAllResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1.SearchAllResourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.SearchAllResourcesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.SearchAllResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesResponse build() { + com.google.cloud.asset.v1.SearchAllResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesResponse buildPartial() { + com.google.cloud.asset.v1.SearchAllResourcesResponse result = new com.google.cloud.asset.v1.SearchAllResourcesResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.SearchAllResourcesResponse) { + return mergeFrom((com.google.cloud.asset.v1.SearchAllResourcesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllResourcesResponse other) { + if (other == com.google.cloud.asset.v1.SearchAllResourcesResponse.getDefaultInstance()) return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.SearchAllResourcesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.SearchAllResourcesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.ResourceSearchResult, com.google.cloud.asset.v1.ResourceSearchResult.Builder, com.google.cloud.asset.v1.ResourceSearchResultOrBuilder> resultsBuilder_; + + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public com.google.cloud.asset.v1.ResourceSearchResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1.ResourceSearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1.ResourceSearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder addResults(com.google.cloud.asset.v1.ResourceSearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1.ResourceSearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder addResults( + com.google.cloud.asset.v1.ResourceSearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1.ResourceSearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public com.google.cloud.asset.v1.ResourceSearchResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public com.google.cloud.asset.v1.ResourceSearchResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public com.google.cloud.asset.v1.ResourceSearchResult.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance()); + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public com.google.cloud.asset.v1.ResourceSearchResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance()); + } + /** + *
+     * A list of Resources that match the search query. It contains the resource
+     * standard metadata information.
+     * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.ResourceSearchResult, com.google.cloud.asset.v1.ResourceSearchResult.Builder, com.google.cloud.asset.v1.ResourceSearchResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.ResourceSearchResult, com.google.cloud.asset.v1.ResourceSearchResult.Builder, com.google.cloud.asset.v1.ResourceSearchResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllResourcesResponse) + private static final com.google.cloud.asset.v1.SearchAllResourcesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllResourcesResponse(); + } + + public static com.google.cloud.asset.v1.SearchAllResourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllResourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllResourcesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.SearchAllResourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java new file mode 100644 index 000000000000..d0999fac75c7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface SearchAllResourcesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + java.util.List + getResultsList(); + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + com.google.cloud.asset.v1.ResourceSearchResult getResults(int index); + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + int getResultsCount(); + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * A list of Resources that match the search query. It contains the resource
+   * standard metadata information.
+   * 
+ * + * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; + */ + com.google.cloud.asset.v1.ResourceSearchResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java new file mode 100644 index 000000000000..1bfbe370709e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java @@ -0,0 +1,1512 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A field in TableSchema.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TableFieldSchema} + */ +public final class TableFieldSchema extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TableFieldSchema) + TableFieldSchemaOrBuilder { +private static final long serialVersionUID = 0L; + // Use TableFieldSchema.newBuilder() to construct. + private TableFieldSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TableFieldSchema() { + field_ = ""; + type_ = ""; + mode_ = ""; + fields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TableFieldSchema(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TableFieldSchema( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + field_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + mode_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fields_.add( + input.readMessage(com.google.cloud.asset.v1.TableFieldSchema.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TableFieldSchema.class, com.google.cloud.asset.v1.TableFieldSchema.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private volatile java.lang.Object field_; + /** + *
+   * The field name. The name must contain only letters (a-z, A-Z),
+   * numbers (0-9), or underscores (_), and must start with a letter or
+   * underscore. The maximum length is 128 characters.
+   * 
+ * + * string field = 1; + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } + } + /** + *
+   * The field name. The name must contain only letters (a-z, A-Z),
+   * numbers (0-9), or underscores (_), and must start with a letter or
+   * underscore. The maximum length is 128 characters.
+   * 
+ * + * string field = 1; + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + *
+   * The field data type. Possible values include
+   * * STRING
+   * * BYTES
+   * * INTEGER
+   * * FLOAT
+   * * BOOLEAN
+   * * TIMESTAMP
+   * * DATE
+   * * TIME
+   * * DATETIME
+   * * GEOGRAPHY,
+   * * NUMERIC,
+   * * BIGNUMERIC,
+   * * RECORD
+   * (where RECORD indicates that the field contains a nested schema).
+   * 
+ * + * string type = 2; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * The field data type. Possible values include
+   * * STRING
+   * * BYTES
+   * * INTEGER
+   * * FLOAT
+   * * BOOLEAN
+   * * TIMESTAMP
+   * * DATE
+   * * TIME
+   * * DATETIME
+   * * GEOGRAPHY,
+   * * NUMERIC,
+   * * BIGNUMERIC,
+   * * RECORD
+   * (where RECORD indicates that the field contains a nested schema).
+   * 
+ * + * string type = 2; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODE_FIELD_NUMBER = 3; + private volatile java.lang.Object mode_; + /** + *
+   * The field mode. Possible values include NULLABLE, REQUIRED and
+   * REPEATED. The default value is NULLABLE.
+   * 
+ * + * string mode = 3; + * @return The mode. + */ + @java.lang.Override + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } + } + /** + *
+   * The field mode. Possible values include NULLABLE, REQUIRED and
+   * REPEATED. The default value is NULLABLE.
+   * 
+ * + * string mode = 3; + * @return The bytes for mode. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIELDS_FIELD_NUMBER = 4; + private java.util.List fields_; + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + @java.lang.Override + public java.util.List getFieldsList() { + return fields_; + } + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + @java.lang.Override + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + @java.lang.Override + public int getFieldsCount() { + return fields_.size(); + } + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { + return fields_.get(index); + } + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( + int index) { + return fields_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mode_); + } + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(4, fields_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mode_); + } + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, fields_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.TableFieldSchema)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.TableFieldSchema other = (com.google.cloud.asset.v1.TableFieldSchema) obj; + + if (!getField() + .equals(other.getField())) return false; + if (!getType() + .equals(other.getType())) return false; + if (!getMode() + .equals(other.getMode())) return false; + if (!getFieldsList() + .equals(other.getFieldsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.TableFieldSchema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A field in TableSchema.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TableFieldSchema} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TableFieldSchema) + com.google.cloud.asset.v1.TableFieldSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TableFieldSchema.class, com.google.cloud.asset.v1.TableFieldSchema.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.TableFieldSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = ""; + + type_ = ""; + + mode_ = ""; + + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchema getDefaultInstanceForType() { + return com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchema build() { + com.google.cloud.asset.v1.TableFieldSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchema buildPartial() { + com.google.cloud.asset.v1.TableFieldSchema result = new com.google.cloud.asset.v1.TableFieldSchema(this); + int from_bitField0_ = bitField0_; + result.field_ = field_; + result.type_ = type_; + result.mode_ = mode_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.TableFieldSchema) { + return mergeFrom((com.google.cloud.asset.v1.TableFieldSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.TableFieldSchema other) { + if (other == com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()) return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getMode().isEmpty()) { + mode_ = other.mode_; + onChanged(); + } + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFieldsFieldBuilder() : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.TableFieldSchema parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.TableFieldSchema) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object field_ = ""; + /** + *
+     * The field name. The name must contain only letters (a-z, A-Z),
+     * numbers (0-9), or underscores (_), and must start with a letter or
+     * underscore. The maximum length is 128 characters.
+     * 
+ * + * string field = 1; + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The field name. The name must contain only letters (a-z, A-Z),
+     * numbers (0-9), or underscores (_), and must start with a letter or
+     * underscore. The maximum length is 128 characters.
+     * 
+ * + * string field = 1; + * @return The bytes for field. + */ + public com.google.protobuf.ByteString + getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The field name. The name must contain only letters (a-z, A-Z),
+     * numbers (0-9), or underscores (_), and must start with a letter or
+     * underscore. The maximum length is 128 characters.
+     * 
+ * + * string field = 1; + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + field_ = value; + onChanged(); + return this; + } + /** + *
+     * The field name. The name must contain only letters (a-z, A-Z),
+     * numbers (0-9), or underscores (_), and must start with a letter or
+     * underscore. The maximum length is 128 characters.
+     * 
+ * + * string field = 1; + * @return This builder for chaining. + */ + public Builder clearField() { + + field_ = getDefaultInstance().getField(); + onChanged(); + return this; + } + /** + *
+     * The field name. The name must contain only letters (a-z, A-Z),
+     * numbers (0-9), or underscores (_), and must start with a letter or
+     * underscore. The maximum length is 128 characters.
+     * 
+ * + * string field = 1; + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + field_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * The field data type. Possible values include
+     * * STRING
+     * * BYTES
+     * * INTEGER
+     * * FLOAT
+     * * BOOLEAN
+     * * TIMESTAMP
+     * * DATE
+     * * TIME
+     * * DATETIME
+     * * GEOGRAPHY,
+     * * NUMERIC,
+     * * BIGNUMERIC,
+     * * RECORD
+     * (where RECORD indicates that the field contains a nested schema).
+     * 
+ * + * string type = 2; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The field data type. Possible values include
+     * * STRING
+     * * BYTES
+     * * INTEGER
+     * * FLOAT
+     * * BOOLEAN
+     * * TIMESTAMP
+     * * DATE
+     * * TIME
+     * * DATETIME
+     * * GEOGRAPHY,
+     * * NUMERIC,
+     * * BIGNUMERIC,
+     * * RECORD
+     * (where RECORD indicates that the field contains a nested schema).
+     * 
+ * + * string type = 2; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The field data type. Possible values include
+     * * STRING
+     * * BYTES
+     * * INTEGER
+     * * FLOAT
+     * * BOOLEAN
+     * * TIMESTAMP
+     * * DATE
+     * * TIME
+     * * DATETIME
+     * * GEOGRAPHY,
+     * * NUMERIC,
+     * * BIGNUMERIC,
+     * * RECORD
+     * (where RECORD indicates that the field contains a nested schema).
+     * 
+ * + * string type = 2; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The field data type. Possible values include
+     * * STRING
+     * * BYTES
+     * * INTEGER
+     * * FLOAT
+     * * BOOLEAN
+     * * TIMESTAMP
+     * * DATE
+     * * TIME
+     * * DATETIME
+     * * GEOGRAPHY,
+     * * NUMERIC,
+     * * BIGNUMERIC,
+     * * RECORD
+     * (where RECORD indicates that the field contains a nested schema).
+     * 
+ * + * string type = 2; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + *
+     * The field data type. Possible values include
+     * * STRING
+     * * BYTES
+     * * INTEGER
+     * * FLOAT
+     * * BOOLEAN
+     * * TIMESTAMP
+     * * DATE
+     * * TIME
+     * * DATETIME
+     * * GEOGRAPHY,
+     * * NUMERIC,
+     * * BIGNUMERIC,
+     * * RECORD
+     * (where RECORD indicates that the field contains a nested schema).
+     * 
+ * + * string type = 2; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object mode_ = ""; + /** + *
+     * The field mode. Possible values include NULLABLE, REQUIRED and
+     * REPEATED. The default value is NULLABLE.
+     * 
+ * + * string mode = 3; + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The field mode. Possible values include NULLABLE, REQUIRED and
+     * REPEATED. The default value is NULLABLE.
+     * 
+ * + * string mode = 3; + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString + getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The field mode. Possible values include NULLABLE, REQUIRED and
+     * REPEATED. The default value is NULLABLE.
+     * 
+ * + * string mode = 3; + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mode_ = value; + onChanged(); + return this; + } + /** + *
+     * The field mode. Possible values include NULLABLE, REQUIRED and
+     * REPEATED. The default value is NULLABLE.
+     * 
+ * + * string mode = 3; + * @return This builder for chaining. + */ + public Builder clearMode() { + + mode_ = getDefaultInstance().getMode(); + onChanged(); + return this; + } + /** + *
+     * The field mode. Possible values include NULLABLE, REQUIRED and
+     * REPEATED. The default value is NULLABLE.
+     * 
+ * + * string mode = 3; + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mode_ = value; + onChanged(); + return this; + } + + private java.util.List fields_ = + java.util.Collections.emptyList(); + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> fieldsBuilder_; + + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder setFields( + int index, com.google.cloud.asset.v1.TableFieldSchema value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder setFields( + int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder addFields(com.google.cloud.asset.v1.TableFieldSchema value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder addFields( + int index, com.google.cloud.asset.v1.TableFieldSchema value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder addFields( + com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder addFields( + int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public com.google.cloud.asset.v1.TableFieldSchema.Builder getFieldsBuilder( + int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( + int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder() { + return getFieldsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder( + int index) { + return getFieldsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); + } + /** + *
+     * Describes the nested schema fields if the type property is set
+     * to RECORD.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + public java.util.List + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder>( + fields_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TableFieldSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TableFieldSchema) + private static final com.google.cloud.asset.v1.TableFieldSchema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TableFieldSchema(); + } + + public static com.google.cloud.asset.v1.TableFieldSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableFieldSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableFieldSchema(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java new file mode 100644 index 000000000000..a77eb8040bc5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java @@ -0,0 +1,152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface TableFieldSchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TableFieldSchema) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The field name. The name must contain only letters (a-z, A-Z),
+   * numbers (0-9), or underscores (_), and must start with a letter or
+   * underscore. The maximum length is 128 characters.
+   * 
+ * + * string field = 1; + * @return The field. + */ + java.lang.String getField(); + /** + *
+   * The field name. The name must contain only letters (a-z, A-Z),
+   * numbers (0-9), or underscores (_), and must start with a letter or
+   * underscore. The maximum length is 128 characters.
+   * 
+ * + * string field = 1; + * @return The bytes for field. + */ + com.google.protobuf.ByteString + getFieldBytes(); + + /** + *
+   * The field data type. Possible values include
+   * * STRING
+   * * BYTES
+   * * INTEGER
+   * * FLOAT
+   * * BOOLEAN
+   * * TIMESTAMP
+   * * DATE
+   * * TIME
+   * * DATETIME
+   * * GEOGRAPHY,
+   * * NUMERIC,
+   * * BIGNUMERIC,
+   * * RECORD
+   * (where RECORD indicates that the field contains a nested schema).
+   * 
+ * + * string type = 2; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The field data type. Possible values include
+   * * STRING
+   * * BYTES
+   * * INTEGER
+   * * FLOAT
+   * * BOOLEAN
+   * * TIMESTAMP
+   * * DATE
+   * * TIME
+   * * DATETIME
+   * * GEOGRAPHY,
+   * * NUMERIC,
+   * * BIGNUMERIC,
+   * * RECORD
+   * (where RECORD indicates that the field contains a nested schema).
+   * 
+ * + * string type = 2; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * The field mode. Possible values include NULLABLE, REQUIRED and
+   * REPEATED. The default value is NULLABLE.
+   * 
+ * + * string mode = 3; + * @return The mode. + */ + java.lang.String getMode(); + /** + *
+   * The field mode. Possible values include NULLABLE, REQUIRED and
+   * REPEATED. The default value is NULLABLE.
+   * 
+ * + * string mode = 3; + * @return The bytes for mode. + */ + com.google.protobuf.ByteString + getModeBytes(); + + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + java.util.List + getFieldsList(); + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + com.google.cloud.asset.v1.TableFieldSchema getFields(int index); + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + int getFieldsCount(); + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + java.util.List + getFieldsOrBuilderList(); + /** + *
+   * Describes the nested schema fields if the type property is set
+   * to RECORD.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; + */ + com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java new file mode 100644 index 000000000000..4eb43d9df02d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java @@ -0,0 +1,872 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * BigQuery Compatible table schema.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TableSchema} + */ +public final class TableSchema extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TableSchema) + TableSchemaOrBuilder { +private static final long serialVersionUID = 0L; + // Use TableSchema.newBuilder() to construct. + private TableSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TableSchema() { + fields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TableSchema(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TableSchema( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fields_.add( + input.readMessage(com.google.cloud.asset.v1.TableFieldSchema.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TableSchema.class, com.google.cloud.asset.v1.TableSchema.Builder.class); + } + + public static final int FIELDS_FIELD_NUMBER = 1; + private java.util.List fields_; + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + @java.lang.Override + public java.util.List getFieldsList() { + return fields_; + } + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + @java.lang.Override + public java.util.List + getFieldsOrBuilderList() { + return fields_; + } + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + @java.lang.Override + public int getFieldsCount() { + return fields_.size(); + } + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { + return fields_.get(index); + } + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( + int index) { + return fields_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(1, fields_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fields_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.TableSchema)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.TableSchema other = (com.google.cloud.asset.v1.TableSchema) obj; + + if (!getFieldsList() + .equals(other.getFieldsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.TableSchema parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TableSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TableSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.TableSchema prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * BigQuery Compatible table schema.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TableSchema} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TableSchema) + com.google.cloud.asset.v1.TableSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TableSchema.class, com.google.cloud.asset.v1.TableSchema.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.TableSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableSchema getDefaultInstanceForType() { + return com.google.cloud.asset.v1.TableSchema.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableSchema build() { + com.google.cloud.asset.v1.TableSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableSchema buildPartial() { + com.google.cloud.asset.v1.TableSchema result = new com.google.cloud.asset.v1.TableSchema(this); + int from_bitField0_ = bitField0_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.TableSchema) { + return mergeFrom((com.google.cloud.asset.v1.TableSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.TableSchema other) { + if (other == com.google.cloud.asset.v1.TableSchema.getDefaultInstance()) return this; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFieldsFieldBuilder() : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.TableSchema parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.TableSchema) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List fields_ = + java.util.Collections.emptyList(); + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = new java.util.ArrayList(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> fieldsBuilder_; + + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public java.util.List getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder setFields( + int index, com.google.cloud.asset.v1.TableFieldSchema value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder setFields( + int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder addFields(com.google.cloud.asset.v1.TableFieldSchema value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder addFields( + int index, com.google.cloud.asset.v1.TableFieldSchema value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder addFields( + com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder addFields( + int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder addAllFields( + java.lang.Iterable values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public com.google.cloud.asset.v1.TableFieldSchema.Builder getFieldsBuilder( + int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( + int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public java.util.List + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder() { + return getFieldsFieldBuilder().addBuilder( + com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder( + int index) { + return getFieldsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); + } + /** + *
+     * Describes the fields in a table.
+     * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + public java.util.List + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder>( + fields_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TableSchema) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TableSchema) + private static final com.google.cloud.asset.v1.TableSchema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TableSchema(); + } + + public static com.google.cloud.asset.v1.TableSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TableSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableSchema(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TableSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java new file mode 100644 index 000000000000..80451085b595 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface TableSchemaOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TableSchema) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + java.util.List + getFieldsList(); + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + com.google.cloud.asset.v1.TableFieldSchema getFields(int index); + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + int getFieldsCount(); + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + java.util.List + getFieldsOrBuilderList(); + /** + *
+   * Describes the fields in a table.
+   * 
+ * + * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; + */ + com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java new file mode 100644 index 000000000000..0931ef8158b7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java @@ -0,0 +1,1535 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * An asset in Google Cloud and its temporal metadata, including the time window
+ * when it was observed and its status during that window.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TemporalAsset} + */ +public final class TemporalAsset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TemporalAsset) + TemporalAssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use TemporalAsset.newBuilder() to construct. + private TemporalAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TemporalAsset() { + priorAssetState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TemporalAsset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TemporalAsset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; + if (window_ != null) { + subBuilder = window_.toBuilder(); + } + window_ = input.readMessage(com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(window_); + window_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + deleted_ = input.readBool(); + break; + } + case 26: { + com.google.cloud.asset.v1.Asset.Builder subBuilder = null; + if (asset_ != null) { + subBuilder = asset_.toBuilder(); + } + asset_ = input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(asset_); + asset_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + int rawValue = input.readEnum(); + + priorAssetState_ = rawValue; + break; + } + case 42: { + com.google.cloud.asset.v1.Asset.Builder subBuilder = null; + if (priorAsset_ != null) { + subBuilder = priorAsset_.toBuilder(); + } + priorAsset_ = input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(priorAsset_); + priorAsset_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TemporalAsset.class, com.google.cloud.asset.v1.TemporalAsset.Builder.class); + } + + /** + *
+   * State of prior asset.
+   * 
+ * + * Protobuf enum {@code google.cloud.asset.v1.TemporalAsset.PriorAssetState} + */ + public enum PriorAssetState + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * prior_asset is not applicable for the current asset.
+     * 
+ * + * PRIOR_ASSET_STATE_UNSPECIFIED = 0; + */ + PRIOR_ASSET_STATE_UNSPECIFIED(0), + /** + *
+     * prior_asset is populated correctly.
+     * 
+ * + * PRESENT = 1; + */ + PRESENT(1), + /** + *
+     * Failed to set prior_asset.
+     * 
+ * + * INVALID = 2; + */ + INVALID(2), + /** + *
+     * Current asset is the first known state.
+     * 
+ * + * DOES_NOT_EXIST = 3; + */ + DOES_NOT_EXIST(3), + /** + *
+     * prior_asset is a deletion.
+     * 
+ * + * DELETED = 4; + */ + DELETED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * prior_asset is not applicable for the current asset.
+     * 
+ * + * PRIOR_ASSET_STATE_UNSPECIFIED = 0; + */ + public static final int PRIOR_ASSET_STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * prior_asset is populated correctly.
+     * 
+ * + * PRESENT = 1; + */ + public static final int PRESENT_VALUE = 1; + /** + *
+     * Failed to set prior_asset.
+     * 
+ * + * INVALID = 2; + */ + public static final int INVALID_VALUE = 2; + /** + *
+     * Current asset is the first known state.
+     * 
+ * + * DOES_NOT_EXIST = 3; + */ + public static final int DOES_NOT_EXIST_VALUE = 3; + /** + *
+     * prior_asset is a deletion.
+     * 
+ * + * DELETED = 4; + */ + public static final int DELETED_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PriorAssetState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PriorAssetState forNumber(int value) { + switch (value) { + case 0: return PRIOR_ASSET_STATE_UNSPECIFIED; + case 1: return PRESENT; + case 2: return INVALID; + case 3: return DOES_NOT_EXIST; + case 4: return DELETED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PriorAssetState> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PriorAssetState findValueByNumber(int number) { + return PriorAssetState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1.TemporalAsset.getDescriptor().getEnumTypes().get(0); + } + + private static final PriorAssetState[] VALUES = values(); + + public static PriorAssetState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PriorAssetState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.TemporalAsset.PriorAssetState) + } + + public static final int WINDOW_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.TimeWindow window_; + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + * @return Whether the window field is set. + */ + @java.lang.Override + public boolean hasWindow() { + return window_ != null; + } + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + * @return The window. + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow getWindow() { + return window_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : window_; + } + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindowOrBuilder getWindowOrBuilder() { + return getWindow(); + } + + public static final int DELETED_FIELD_NUMBER = 2; + private boolean deleted_; + /** + *
+   * Whether the asset has been deleted or not.
+   * 
+ * + * bool deleted = 2; + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + + public static final int ASSET_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.Asset asset_; + /** + *
+   * An asset in Google Cloud.
+   * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + * @return Whether the asset field is set. + */ + @java.lang.Override + public boolean hasAsset() { + return asset_ != null; + } + /** + *
+   * An asset in Google Cloud.
+   * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + * @return The asset. + */ + @java.lang.Override + public com.google.cloud.asset.v1.Asset getAsset() { + return asset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : asset_; + } + /** + *
+   * An asset in Google Cloud.
+   * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AssetOrBuilder getAssetOrBuilder() { + return getAsset(); + } + + public static final int PRIOR_ASSET_STATE_FIELD_NUMBER = 4; + private int priorAssetState_; + /** + *
+   * State of prior_asset.
+   * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @return The enum numeric value on the wire for priorAssetState. + */ + @java.lang.Override public int getPriorAssetStateValue() { + return priorAssetState_; + } + /** + *
+   * State of prior_asset.
+   * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @return The priorAssetState. + */ + @java.lang.Override public com.google.cloud.asset.v1.TemporalAsset.PriorAssetState getPriorAssetState() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.TemporalAsset.PriorAssetState result = com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.valueOf(priorAssetState_); + return result == null ? com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.UNRECOGNIZED : result; + } + + public static final int PRIOR_ASSET_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1.Asset priorAsset_; + /** + *
+   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+   * Currently this is only set for responses in Real-Time Feed.
+   * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + * @return Whether the priorAsset field is set. + */ + @java.lang.Override + public boolean hasPriorAsset() { + return priorAsset_ != null; + } + /** + *
+   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+   * Currently this is only set for responses in Real-Time Feed.
+   * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + * @return The priorAsset. + */ + @java.lang.Override + public com.google.cloud.asset.v1.Asset getPriorAsset() { + return priorAsset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : priorAsset_; + } + /** + *
+   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+   * Currently this is only set for responses in Real-Time Feed.
+   * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AssetOrBuilder getPriorAssetOrBuilder() { + return getPriorAsset(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (window_ != null) { + output.writeMessage(1, getWindow()); + } + if (deleted_ != false) { + output.writeBool(2, deleted_); + } + if (asset_ != null) { + output.writeMessage(3, getAsset()); + } + if (priorAssetState_ != com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.PRIOR_ASSET_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, priorAssetState_); + } + if (priorAsset_ != null) { + output.writeMessage(5, getPriorAsset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (window_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getWindow()); + } + if (deleted_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, deleted_); + } + if (asset_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAsset()); + } + if (priorAssetState_ != com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.PRIOR_ASSET_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, priorAssetState_); + } + if (priorAsset_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getPriorAsset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.TemporalAsset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.TemporalAsset other = (com.google.cloud.asset.v1.TemporalAsset) obj; + + if (hasWindow() != other.hasWindow()) return false; + if (hasWindow()) { + if (!getWindow() + .equals(other.getWindow())) return false; + } + if (getDeleted() + != other.getDeleted()) return false; + if (hasAsset() != other.hasAsset()) return false; + if (hasAsset()) { + if (!getAsset() + .equals(other.getAsset())) return false; + } + if (priorAssetState_ != other.priorAssetState_) return false; + if (hasPriorAsset() != other.hasPriorAsset()) return false; + if (hasPriorAsset()) { + if (!getPriorAsset() + .equals(other.getPriorAsset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasWindow()) { + hash = (37 * hash) + WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getWindow().hashCode(); + } + hash = (37 * hash) + DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeleted()); + if (hasAsset()) { + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + } + hash = (37 * hash) + PRIOR_ASSET_STATE_FIELD_NUMBER; + hash = (53 * hash) + priorAssetState_; + if (hasPriorAsset()) { + hash = (37 * hash) + PRIOR_ASSET_FIELD_NUMBER; + hash = (53 * hash) + getPriorAsset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TemporalAsset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TemporalAsset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TemporalAsset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.TemporalAsset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset in Google Cloud and its temporal metadata, including the time window
+   * when it was observed and its status during that window.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TemporalAsset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TemporalAsset) + com.google.cloud.asset.v1.TemporalAssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TemporalAsset.class, com.google.cloud.asset.v1.TemporalAsset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.TemporalAsset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (windowBuilder_ == null) { + window_ = null; + } else { + window_ = null; + windowBuilder_ = null; + } + deleted_ = false; + + if (assetBuilder_ == null) { + asset_ = null; + } else { + asset_ = null; + assetBuilder_ = null; + } + priorAssetState_ = 0; + + if (priorAssetBuilder_ == null) { + priorAsset_ = null; + } else { + priorAsset_ = null; + priorAssetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TemporalAsset getDefaultInstanceForType() { + return com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.TemporalAsset build() { + com.google.cloud.asset.v1.TemporalAsset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TemporalAsset buildPartial() { + com.google.cloud.asset.v1.TemporalAsset result = new com.google.cloud.asset.v1.TemporalAsset(this); + if (windowBuilder_ == null) { + result.window_ = window_; + } else { + result.window_ = windowBuilder_.build(); + } + result.deleted_ = deleted_; + if (assetBuilder_ == null) { + result.asset_ = asset_; + } else { + result.asset_ = assetBuilder_.build(); + } + result.priorAssetState_ = priorAssetState_; + if (priorAssetBuilder_ == null) { + result.priorAsset_ = priorAsset_; + } else { + result.priorAsset_ = priorAssetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.TemporalAsset) { + return mergeFrom((com.google.cloud.asset.v1.TemporalAsset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.TemporalAsset other) { + if (other == com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance()) return this; + if (other.hasWindow()) { + mergeWindow(other.getWindow()); + } + if (other.getDeleted() != false) { + setDeleted(other.getDeleted()); + } + if (other.hasAsset()) { + mergeAsset(other.getAsset()); + } + if (other.priorAssetState_ != 0) { + setPriorAssetStateValue(other.getPriorAssetStateValue()); + } + if (other.hasPriorAsset()) { + mergePriorAsset(other.getPriorAsset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.TemporalAsset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.TemporalAsset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.TimeWindow window_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> windowBuilder_; + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + * @return Whether the window field is set. + */ + public boolean hasWindow() { + return windowBuilder_ != null || window_ != null; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + * @return The window. + */ + public com.google.cloud.asset.v1.TimeWindow getWindow() { + if (windowBuilder_ == null) { + return window_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : window_; + } else { + return windowBuilder_.getMessage(); + } + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + public Builder setWindow(com.google.cloud.asset.v1.TimeWindow value) { + if (windowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + window_ = value; + onChanged(); + } else { + windowBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + public Builder setWindow( + com.google.cloud.asset.v1.TimeWindow.Builder builderForValue) { + if (windowBuilder_ == null) { + window_ = builderForValue.build(); + onChanged(); + } else { + windowBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + public Builder mergeWindow(com.google.cloud.asset.v1.TimeWindow value) { + if (windowBuilder_ == null) { + if (window_ != null) { + window_ = + com.google.cloud.asset.v1.TimeWindow.newBuilder(window_).mergeFrom(value).buildPartial(); + } else { + window_ = value; + } + onChanged(); + } else { + windowBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + public Builder clearWindow() { + if (windowBuilder_ == null) { + window_ = null; + onChanged(); + } else { + window_ = null; + windowBuilder_ = null; + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + public com.google.cloud.asset.v1.TimeWindow.Builder getWindowBuilder() { + + onChanged(); + return getWindowFieldBuilder().getBuilder(); + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + public com.google.cloud.asset.v1.TimeWindowOrBuilder getWindowOrBuilder() { + if (windowBuilder_ != null) { + return windowBuilder_.getMessageOrBuilder(); + } else { + return window_ == null ? + com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : window_; + } + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> + getWindowFieldBuilder() { + if (windowBuilder_ == null) { + windowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder>( + getWindow(), + getParentForChildren(), + isClean()); + window_ = null; + } + return windowBuilder_; + } + + private boolean deleted_ ; + /** + *
+     * Whether the asset has been deleted or not.
+     * 
+ * + * bool deleted = 2; + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + /** + *
+     * Whether the asset has been deleted or not.
+     * 
+ * + * bool deleted = 2; + * @param value The deleted to set. + * @return This builder for chaining. + */ + public Builder setDeleted(boolean value) { + + deleted_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether the asset has been deleted or not.
+     * 
+ * + * bool deleted = 2; + * @return This builder for chaining. + */ + public Builder clearDeleted() { + + deleted_ = false; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.Asset asset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> assetBuilder_; + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + * @return Whether the asset field is set. + */ + public boolean hasAsset() { + return assetBuilder_ != null || asset_ != null; + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + * @return The asset. + */ + public com.google.cloud.asset.v1.Asset getAsset() { + if (assetBuilder_ == null) { + return asset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : asset_; + } else { + return assetBuilder_.getMessage(); + } + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + public Builder setAsset(com.google.cloud.asset.v1.Asset value) { + if (assetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + asset_ = value; + onChanged(); + } else { + assetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + public Builder setAsset( + com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (assetBuilder_ == null) { + asset_ = builderForValue.build(); + onChanged(); + } else { + assetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + public Builder mergeAsset(com.google.cloud.asset.v1.Asset value) { + if (assetBuilder_ == null) { + if (asset_ != null) { + asset_ = + com.google.cloud.asset.v1.Asset.newBuilder(asset_).mergeFrom(value).buildPartial(); + } else { + asset_ = value; + } + onChanged(); + } else { + assetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + public Builder clearAsset() { + if (assetBuilder_ == null) { + asset_ = null; + onChanged(); + } else { + asset_ = null; + assetBuilder_ = null; + } + + return this; + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + public com.google.cloud.asset.v1.Asset.Builder getAssetBuilder() { + + onChanged(); + return getAssetFieldBuilder().getBuilder(); + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + public com.google.cloud.asset.v1.AssetOrBuilder getAssetOrBuilder() { + if (assetBuilder_ != null) { + return assetBuilder_.getMessageOrBuilder(); + } else { + return asset_ == null ? + com.google.cloud.asset.v1.Asset.getDefaultInstance() : asset_; + } + } + /** + *
+     * An asset in Google Cloud.
+     * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> + getAssetFieldBuilder() { + if (assetBuilder_ == null) { + assetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder>( + getAsset(), + getParentForChildren(), + isClean()); + asset_ = null; + } + return assetBuilder_; + } + + private int priorAssetState_ = 0; + /** + *
+     * State of prior_asset.
+     * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @return The enum numeric value on the wire for priorAssetState. + */ + @java.lang.Override public int getPriorAssetStateValue() { + return priorAssetState_; + } + /** + *
+     * State of prior_asset.
+     * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @param value The enum numeric value on the wire for priorAssetState to set. + * @return This builder for chaining. + */ + public Builder setPriorAssetStateValue(int value) { + + priorAssetState_ = value; + onChanged(); + return this; + } + /** + *
+     * State of prior_asset.
+     * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @return The priorAssetState. + */ + @java.lang.Override + public com.google.cloud.asset.v1.TemporalAsset.PriorAssetState getPriorAssetState() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.TemporalAsset.PriorAssetState result = com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.valueOf(priorAssetState_); + return result == null ? com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.UNRECOGNIZED : result; + } + /** + *
+     * State of prior_asset.
+     * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @param value The priorAssetState to set. + * @return This builder for chaining. + */ + public Builder setPriorAssetState(com.google.cloud.asset.v1.TemporalAsset.PriorAssetState value) { + if (value == null) { + throw new NullPointerException(); + } + + priorAssetState_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * State of prior_asset.
+     * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @return This builder for chaining. + */ + public Builder clearPriorAssetState() { + + priorAssetState_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.Asset priorAsset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> priorAssetBuilder_; + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + * @return Whether the priorAsset field is set. + */ + public boolean hasPriorAsset() { + return priorAssetBuilder_ != null || priorAsset_ != null; + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + * @return The priorAsset. + */ + public com.google.cloud.asset.v1.Asset getPriorAsset() { + if (priorAssetBuilder_ == null) { + return priorAsset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : priorAsset_; + } else { + return priorAssetBuilder_.getMessage(); + } + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + public Builder setPriorAsset(com.google.cloud.asset.v1.Asset value) { + if (priorAssetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + priorAsset_ = value; + onChanged(); + } else { + priorAssetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + public Builder setPriorAsset( + com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (priorAssetBuilder_ == null) { + priorAsset_ = builderForValue.build(); + onChanged(); + } else { + priorAssetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + public Builder mergePriorAsset(com.google.cloud.asset.v1.Asset value) { + if (priorAssetBuilder_ == null) { + if (priorAsset_ != null) { + priorAsset_ = + com.google.cloud.asset.v1.Asset.newBuilder(priorAsset_).mergeFrom(value).buildPartial(); + } else { + priorAsset_ = value; + } + onChanged(); + } else { + priorAssetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + public Builder clearPriorAsset() { + if (priorAssetBuilder_ == null) { + priorAsset_ = null; + onChanged(); + } else { + priorAsset_ = null; + priorAssetBuilder_ = null; + } + + return this; + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + public com.google.cloud.asset.v1.Asset.Builder getPriorAssetBuilder() { + + onChanged(); + return getPriorAssetFieldBuilder().getBuilder(); + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + public com.google.cloud.asset.v1.AssetOrBuilder getPriorAssetOrBuilder() { + if (priorAssetBuilder_ != null) { + return priorAssetBuilder_.getMessageOrBuilder(); + } else { + return priorAsset_ == null ? + com.google.cloud.asset.v1.Asset.getDefaultInstance() : priorAsset_; + } + } + /** + *
+     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+     * Currently this is only set for responses in Real-Time Feed.
+     * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> + getPriorAssetFieldBuilder() { + if (priorAssetBuilder_ == null) { + priorAssetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder>( + getPriorAsset(), + getParentForChildren(), + isClean()); + priorAsset_ = null; + } + return priorAssetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TemporalAsset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TemporalAsset) + private static final com.google.cloud.asset.v1.TemporalAsset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TemporalAsset(); + } + + public static com.google.cloud.asset.v1.TemporalAsset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TemporalAsset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TemporalAsset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TemporalAsset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java new file mode 100644 index 000000000000..40ba4db442af --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java @@ -0,0 +1,122 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface TemporalAssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TemporalAsset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + * @return Whether the window field is set. + */ + boolean hasWindow(); + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + * @return The window. + */ + com.google.cloud.asset.v1.TimeWindow getWindow(); + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1.TimeWindow window = 1; + */ + com.google.cloud.asset.v1.TimeWindowOrBuilder getWindowOrBuilder(); + + /** + *
+   * Whether the asset has been deleted or not.
+   * 
+ * + * bool deleted = 2; + * @return The deleted. + */ + boolean getDeleted(); + + /** + *
+   * An asset in Google Cloud.
+   * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + * @return Whether the asset field is set. + */ + boolean hasAsset(); + /** + *
+   * An asset in Google Cloud.
+   * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + * @return The asset. + */ + com.google.cloud.asset.v1.Asset getAsset(); + /** + *
+   * An asset in Google Cloud.
+   * 
+ * + * .google.cloud.asset.v1.Asset asset = 3; + */ + com.google.cloud.asset.v1.AssetOrBuilder getAssetOrBuilder(); + + /** + *
+   * State of prior_asset.
+   * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @return The enum numeric value on the wire for priorAssetState. + */ + int getPriorAssetStateValue(); + /** + *
+   * State of prior_asset.
+   * 
+ * + * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; + * @return The priorAssetState. + */ + com.google.cloud.asset.v1.TemporalAsset.PriorAssetState getPriorAssetState(); + + /** + *
+   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+   * Currently this is only set for responses in Real-Time Feed.
+   * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + * @return Whether the priorAsset field is set. + */ + boolean hasPriorAsset(); + /** + *
+   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+   * Currently this is only set for responses in Real-Time Feed.
+   * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + * @return The priorAsset. + */ + com.google.cloud.asset.v1.Asset getPriorAsset(); + /** + *
+   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
+   * Currently this is only set for responses in Real-Time Feed.
+   * 
+ * + * .google.cloud.asset.v1.Asset prior_asset = 5; + */ + com.google.cloud.asset.v1.AssetOrBuilder getPriorAssetOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java new file mode 100644 index 000000000000..b266998f22a8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java @@ -0,0 +1,913 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * A time window specified by its `start_time` and `end_time`.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TimeWindow} + */ +public final class TimeWindow extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TimeWindow) + TimeWindowOrBuilder { +private static final long serialVersionUID = 0L; + // Use TimeWindow.newBuilder() to construct. + private TimeWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TimeWindow() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TimeWindow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TimeWindow( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TimeWindow.class, com.google.cloud.asset.v1.TimeWindow.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * End time of the time window (inclusive). If not specified, the current
+   * timestamp is used instead.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * End time of the time window (inclusive). If not specified, the current
+   * timestamp is used instead.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * End time of the time window (inclusive). If not specified, the current
+   * timestamp is used instead.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.TimeWindow)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.TimeWindow other = (com.google.cloud.asset.v1.TimeWindow) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TimeWindow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TimeWindow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.TimeWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.TimeWindow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A time window specified by its `start_time` and `end_time`.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.TimeWindow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TimeWindow) + com.google.cloud.asset.v1.TimeWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.TimeWindow.class, com.google.cloud.asset.v1.TimeWindow.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.TimeWindow.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow getDefaultInstanceForType() { + return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow build() { + com.google.cloud.asset.v1.TimeWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow buildPartial() { + com.google.cloud.asset.v1.TimeWindow result = new com.google.cloud.asset.v1.TimeWindow(this); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.TimeWindow) { + return mergeFrom((com.google.cloud.asset.v1.TimeWindow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.TimeWindow other) { + if (other == com.google.cloud.asset.v1.TimeWindow.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.TimeWindow parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.TimeWindow) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * End time of the time window (inclusive). If not specified, the current
+     * timestamp is used instead.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TimeWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TimeWindow) + private static final com.google.cloud.asset.v1.TimeWindow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TimeWindow(); + } + + public static com.google.cloud.asset.v1.TimeWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeWindow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimeWindow(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.TimeWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java new file mode 100644 index 000000000000..81646f3d1e72 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface TimeWindowOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TimeWindow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * End time of the time window (inclusive). If not specified, the current
+   * timestamp is used instead.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * End time of the time window (inclusive). If not specified, the current
+   * timestamp is used instead.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * End time of the time window (inclusive). If not specified, the current
+   * timestamp is used instead.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java new file mode 100644 index 000000000000..e6a118b47f51 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java @@ -0,0 +1,973 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Update asset feed request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.UpdateFeedRequest} + */ +public final class UpdateFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.UpdateFeedRequest) + UpdateFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateFeedRequest.newBuilder() to construct. + private UpdateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateFeedRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.Feed.Builder subBuilder = null; + if (feed_ != null) { + subBuilder = feed_.toBuilder(); + } + feed_ = input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(feed_); + feed_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.UpdateFeedRequest.class, com.google.cloud.asset.v1.UpdateFeedRequest.Builder.class); + } + + public static final int FEED_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.Feed feed_; + /** + *
+   * Required. The new values of feed details. It must match an existing feed
+   * and the field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + @java.lang.Override + public boolean hasFeed() { + return feed_ != null; + } + /** + *
+   * Required. The new values of feed details. It must match an existing feed
+   * and the field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + @java.lang.Override + public com.google.cloud.asset.v1.Feed getFeed() { + return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; + } + /** + *
+   * Required. The new values of feed details. It must match an existing feed
+   * and the field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { + return getFeed(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (feed_ != null) { + output.writeMessage(1, getFeed()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (feed_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFeed()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.UpdateFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.UpdateFeedRequest other = (com.google.cloud.asset.v1.UpdateFeedRequest) obj; + + if (hasFeed() != other.hasFeed()) return false; + if (hasFeed()) { + if (!getFeed() + .equals(other.getFeed())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFeed()) { + hash = (37 * hash) + FEED_FIELD_NUMBER; + hash = (53 * hash) + getFeed().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.UpdateFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Update asset feed request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.UpdateFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.UpdateFeedRequest) + com.google.cloud.asset.v1.UpdateFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.UpdateFeedRequest.class, com.google.cloud.asset.v1.UpdateFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.UpdateFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (feedBuilder_ == null) { + feed_ = null; + } else { + feed_ = null; + feedBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.UpdateFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateFeedRequest build() { + com.google.cloud.asset.v1.UpdateFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateFeedRequest buildPartial() { + com.google.cloud.asset.v1.UpdateFeedRequest result = new com.google.cloud.asset.v1.UpdateFeedRequest(this); + if (feedBuilder_ == null) { + result.feed_ = feed_; + } else { + result.feed_ = feedBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.UpdateFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1.UpdateFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.UpdateFeedRequest other) { + if (other == com.google.cloud.asset.v1.UpdateFeedRequest.getDefaultInstance()) return this; + if (other.hasFeed()) { + mergeFeed(other.getFeed()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.UpdateFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.UpdateFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.Feed feed_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> feedBuilder_; + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + public boolean hasFeed() { + return feedBuilder_ != null || feed_ != null; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + public com.google.cloud.asset.v1.Feed getFeed() { + if (feedBuilder_ == null) { + return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; + } else { + return feedBuilder_.getMessage(); + } + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed(com.google.cloud.asset.v1.Feed value) { + if (feedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + feed_ = value; + onChanged(); + } else { + feedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed( + com.google.cloud.asset.v1.Feed.Builder builderForValue) { + if (feedBuilder_ == null) { + feed_ = builderForValue.build(); + onChanged(); + } else { + feedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFeed(com.google.cloud.asset.v1.Feed value) { + if (feedBuilder_ == null) { + if (feed_ != null) { + feed_ = + com.google.cloud.asset.v1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); + } else { + feed_ = value; + } + onChanged(); + } else { + feedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFeed() { + if (feedBuilder_ == null) { + feed_ = null; + onChanged(); + } else { + feed_ = null; + feedBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.Feed.Builder getFeedBuilder() { + + onChanged(); + return getFeedFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { + if (feedBuilder_ != null) { + return feedBuilder_.getMessageOrBuilder(); + } else { + return feed_ == null ? + com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; + } + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed
+     * and the field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> + getFeedFieldBuilder() { + if (feedBuilder_ == null) { + feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder>( + getFeed(), + getParentForChildren(), + isClean()); + feed_ = null; + } + return feedBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.UpdateFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.UpdateFeedRequest) + private static final com.google.cloud.asset.v1.UpdateFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.UpdateFeedRequest(); + } + + public static com.google.cloud.asset.v1.UpdateFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java new file mode 100644 index 000000000000..37dafabef416 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface UpdateFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.UpdateFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The new values of feed details. It must match an existing feed
+   * and the field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + boolean hasFeed(); + /** + *
+   * Required. The new values of feed details. It must match an existing feed
+   * and the field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + com.google.cloud.asset.v1.Feed getFeed(); + /** + *
+   * Required. The new values of feed details. It must match an existing feed
+   * and the field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder(); + + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java new file mode 100644 index 000000000000..f42dae545fa0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java @@ -0,0 +1,961 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Request to update a saved query.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.UpdateSavedQueryRequest} + */ +public final class UpdateSavedQueryRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.UpdateSavedQueryRequest) + UpdateSavedQueryRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateSavedQueryRequest.newBuilder() to construct. + private UpdateSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateSavedQueryRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateSavedQueryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateSavedQueryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1.SavedQuery.Builder subBuilder = null; + if (savedQuery_ != null) { + subBuilder = savedQuery_.toBuilder(); + } + savedQuery_ = input.readMessage(com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(savedQuery_); + savedQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.UpdateSavedQueryRequest.class, com.google.cloud.asset.v1.UpdateSavedQueryRequest.Builder.class); + } + + public static final int SAVED_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.SavedQuery savedQuery_; + /** + *
+   * Required. The saved query to update.
+   * The saved query's `name` field is used to identify the one to update,
+   * which has format as below:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the savedQuery field is set. + */ + @java.lang.Override + public boolean hasSavedQuery() { + return savedQuery_ != null; + } + /** + *
+   * Required. The saved query to update.
+   * The saved query's `name` field is used to identify the one to update,
+   * which has format as below:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { + return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; + } + /** + *
+   * Required. The saved query to update.
+   * The saved query's `name` field is used to identify the one to update,
+   * which has format as below:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { + return getSavedQuery(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Required. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Required. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Required. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (savedQuery_ != null) { + output.writeMessage(1, getSavedQuery()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (savedQuery_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getSavedQuery()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.UpdateSavedQueryRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.UpdateSavedQueryRequest other = (com.google.cloud.asset.v1.UpdateSavedQueryRequest) obj; + + if (hasSavedQuery() != other.hasSavedQuery()) return false; + if (hasSavedQuery()) { + if (!getSavedQuery() + .equals(other.getSavedQuery())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSavedQuery()) { + hash = (37 * hash) + SAVED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getSavedQuery().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.UpdateSavedQueryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Request to update a saved query.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.UpdateSavedQueryRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.UpdateSavedQueryRequest) + com.google.cloud.asset.v1.UpdateSavedQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.UpdateSavedQueryRequest.class, com.google.cloud.asset.v1.UpdateSavedQueryRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.UpdateSavedQueryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (savedQueryBuilder_ == null) { + savedQuery_ = null; + } else { + savedQuery_ = null; + savedQueryBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateSavedQueryRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.UpdateSavedQueryRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateSavedQueryRequest build() { + com.google.cloud.asset.v1.UpdateSavedQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateSavedQueryRequest buildPartial() { + com.google.cloud.asset.v1.UpdateSavedQueryRequest result = new com.google.cloud.asset.v1.UpdateSavedQueryRequest(this); + if (savedQueryBuilder_ == null) { + result.savedQuery_ = savedQuery_; + } else { + result.savedQuery_ = savedQueryBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.UpdateSavedQueryRequest) { + return mergeFrom((com.google.cloud.asset.v1.UpdateSavedQueryRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.UpdateSavedQueryRequest other) { + if (other == com.google.cloud.asset.v1.UpdateSavedQueryRequest.getDefaultInstance()) return this; + if (other.hasSavedQuery()) { + mergeSavedQuery(other.getSavedQuery()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.UpdateSavedQueryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.UpdateSavedQueryRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.SavedQuery savedQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> savedQueryBuilder_; + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the savedQuery field is set. + */ + public boolean hasSavedQuery() { + return savedQueryBuilder_ != null || savedQuery_ != null; + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQuery. + */ + public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { + if (savedQueryBuilder_ == null) { + return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; + } else { + return savedQueryBuilder_.getMessage(); + } + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { + if (savedQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + savedQuery_ = value; + onChanged(); + } else { + savedQueryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setSavedQuery( + com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { + if (savedQueryBuilder_ == null) { + savedQuery_ = builderForValue.build(); + onChanged(); + } else { + savedQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { + if (savedQueryBuilder_ == null) { + if (savedQuery_ != null) { + savedQuery_ = + com.google.cloud.asset.v1.SavedQuery.newBuilder(savedQuery_).mergeFrom(value).buildPartial(); + } else { + savedQuery_ = value; + } + onChanged(); + } else { + savedQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearSavedQuery() { + if (savedQueryBuilder_ == null) { + savedQuery_ = null; + onChanged(); + } else { + savedQuery_ = null; + savedQueryBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.SavedQuery.Builder getSavedQueryBuilder() { + + onChanged(); + return getSavedQueryFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { + if (savedQueryBuilder_ != null) { + return savedQueryBuilder_.getMessageOrBuilder(); + } else { + return savedQuery_ == null ? + com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; + } + } + /** + *
+     * Required. The saved query to update.
+     * The saved query's `name` field is used to identify the one to update,
+     * which has format as below:
+     * * projects/project_number/savedQueries/saved_query_id
+     * * folders/folder_number/savedQueries/saved_query_id
+     * * organizations/organization_number/savedQueries/saved_query_id
+     * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> + getSavedQueryFieldBuilder() { + if (savedQueryBuilder_ == null) { + savedQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder>( + getSavedQuery(), + getParentForChildren(), + isClean()); + savedQuery_ = null; + } + return savedQueryBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Required. The list of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.UpdateSavedQueryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.UpdateSavedQueryRequest) + private static final com.google.cloud.asset.v1.UpdateSavedQueryRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.UpdateSavedQueryRequest(); + } + + public static com.google.cloud.asset.v1.UpdateSavedQueryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSavedQueryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateSavedQueryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.UpdateSavedQueryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java new file mode 100644 index 000000000000..307da869bba4 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface UpdateSavedQueryRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.UpdateSavedQueryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The saved query to update.
+   * The saved query's `name` field is used to identify the one to update,
+   * which has format as below:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the savedQuery field is set. + */ + boolean hasSavedQuery(); + /** + *
+   * Required. The saved query to update.
+   * The saved query's `name` field is used to identify the one to update,
+   * which has format as below:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The savedQuery. + */ + com.google.cloud.asset.v1.SavedQuery getSavedQuery(); + /** + *
+   * Required. The saved query to update.
+   * The saved query's `name` field is used to identify the one to update,
+   * which has format as below:
+   * * projects/project_number/savedQueries/saved_query_id
+   * * folders/folder_number/savedQueries/saved_query_id
+   * * organizations/organization_number/savedQueries/saved_query_id
+   * 
+ * + * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder(); + + /** + *
+   * Required. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Required. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Required. The list of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java new file mode 100644 index 000000000000..a6dcee4cc3b1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java @@ -0,0 +1,969 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + *
+ * Resource representation as defined by the corresponding service providing the
+ * resource for a given API version.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.VersionedResource} + */ +public final class VersionedResource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.VersionedResource) + VersionedResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use VersionedResource.newBuilder() to construct. + private VersionedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VersionedResource() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VersionedResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VersionedResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.VersionedResource.class, com.google.cloud.asset.v1.VersionedResource.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+   * API version of the resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine v1 API as defined
+   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+   * version will be "v1".
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * API version of the resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine v1 API as defined
+   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+   * version will be "v1".
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 2; + private com.google.protobuf.Struct resource_; + /** + *
+   * JSON representation of the resource as defined by the corresponding
+   * service providing this resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine, this field will
+   * contain the JSON representation of the instance as defined by Compute
+   * Engine:
+   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+   * You can find the resource definition for each supported resource type in
+   * this table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * .google.protobuf.Struct resource = 2; + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * JSON representation of the resource as defined by the corresponding
+   * service providing this resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine, this field will
+   * contain the JSON representation of the instance as defined by Compute
+   * Engine:
+   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+   * You can find the resource definition for each supported resource type in
+   * this table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * .google.protobuf.Struct resource = 2; + * @return The resource. + */ + @java.lang.Override + public com.google.protobuf.Struct getResource() { + return resource_ == null ? com.google.protobuf.Struct.getDefaultInstance() : resource_; + } + /** + *
+   * JSON representation of the resource as defined by the corresponding
+   * service providing this resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine, this field will
+   * contain the JSON representation of the instance as defined by Compute
+   * Engine:
+   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+   * You can find the resource definition for each supported resource type in
+   * this table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * .google.protobuf.Struct resource = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getResourceOrBuilder() { + return getResource(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (resource_ != null) { + output.writeMessage(2, getResource()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getResource()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.VersionedResource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.VersionedResource other = (com.google.cloud.asset.v1.VersionedResource) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.VersionedResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.VersionedResource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1.VersionedResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1.VersionedResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Resource representation as defined by the corresponding service providing the
+   * resource for a given API version.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.VersionedResource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.VersionedResource) + com.google.cloud.asset.v1.VersionedResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.VersionedResource.class, com.google.cloud.asset.v1.VersionedResource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.VersionedResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResource getDefaultInstanceForType() { + return com.google.cloud.asset.v1.VersionedResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResource build() { + com.google.cloud.asset.v1.VersionedResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResource buildPartial() { + com.google.cloud.asset.v1.VersionedResource result = new com.google.cloud.asset.v1.VersionedResource(this); + result.version_ = version_; + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.VersionedResource) { + return mergeFrom((com.google.cloud.asset.v1.VersionedResource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.VersionedResource other) { + if (other == com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.VersionedResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.VersionedResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * API version of the resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine v1 API as defined
+     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+     * version will be "v1".
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * API version of the resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine v1 API as defined
+     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+     * version will be "v1".
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * API version of the resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine v1 API as defined
+     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+     * version will be "v1".
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * API version of the resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine v1 API as defined
+     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+     * version will be "v1".
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * API version of the resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine v1 API as defined
+     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+     * version will be "v1".
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> resourceBuilder_; + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + * @return The resource. + */ + public com.google.protobuf.Struct getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.google.protobuf.Struct.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + */ + public Builder setResource(com.google.protobuf.Struct value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + */ + public Builder setResource( + com.google.protobuf.Struct.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + */ + public Builder mergeResource(com.google.protobuf.Struct value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.protobuf.Struct.newBuilder(resource_).mergeFrom(value).buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + */ + public com.google.protobuf.Struct.Builder getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + */ + public com.google.protobuf.StructOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : resource_; + } + } + /** + *
+     * JSON representation of the resource as defined by the corresponding
+     * service providing this resource.
+     * Example:
+     * If the resource is an instance provided by Compute Engine, this field will
+     * contain the JSON representation of the instance as defined by Compute
+     * Engine:
+     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+     * You can find the resource definition for each supported resource type in
+     * this table:
+     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+     * 
+ * + * .google.protobuf.Struct resource = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.VersionedResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.VersionedResource) + private static final com.google.cloud.asset.v1.VersionedResource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.VersionedResource(); + } + + public static com.google.cloud.asset.v1.VersionedResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionedResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionedResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.VersionedResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java new file mode 100644 index 000000000000..9f9efa604b04 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface VersionedResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.VersionedResource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * API version of the resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine v1 API as defined
+   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+   * version will be "v1".
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * API version of the resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine v1 API as defined
+   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
+   * version will be "v1".
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * JSON representation of the resource as defined by the corresponding
+   * service providing this resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine, this field will
+   * contain the JSON representation of the instance as defined by Compute
+   * Engine:
+   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+   * You can find the resource definition for each supported resource type in
+   * this table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * .google.protobuf.Struct resource = 2; + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * JSON representation of the resource as defined by the corresponding
+   * service providing this resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine, this field will
+   * contain the JSON representation of the instance as defined by Compute
+   * Engine:
+   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+   * You can find the resource definition for each supported resource type in
+   * this table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * .google.protobuf.Struct resource = 2; + * @return The resource. + */ + com.google.protobuf.Struct getResource(); + /** + *
+   * JSON representation of the resource as defined by the corresponding
+   * service providing this resource.
+   * Example:
+   * If the resource is an instance provided by Compute Engine, this field will
+   * contain the JSON representation of the instance as defined by Compute
+   * Engine:
+   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
+   * You can find the resource definition for each supported resource type in
+   * this table:
+   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
+   * 
+ * + * .google.protobuf.Struct resource = 2; + */ + com.google.protobuf.StructOrBuilder getResourceOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto new file mode 100644 index 000000000000..1c34327291db --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto @@ -0,0 +1,2072 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/asset/v1/assets.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/expr.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1"; +option php_namespace = "Google\\Cloud\\Asset\\V1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // 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. + rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=*/*}:exportAssets" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1.ExportAssetsResponse" + metadata_type: "google.cloud.asset.v1.ExportAssetsRequest" + }; + } + + // Lists assets with time and resource types and returns paged results in + // response. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=*/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + + // 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. + rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) + returns (BatchGetAssetsHistoryResponse) { + option (google.api.http) = { + get: "/v1/{parent=*/*}:batchGetAssetsHistory" + }; + } + + // Creates a feed in a parent project/folder/organization to listen to its + // asset updates. + rpc CreateFeed(CreateFeedRequest) returns (Feed) { + option (google.api.http) = { + post: "/v1/{parent=*/*}/feeds" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about an asset feed. + rpc GetFeed(GetFeedRequest) returns (Feed) { + option (google.api.http) = { + get: "/v1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all asset feeds in a parent project/folder/organization. + rpc ListFeeds(ListFeedsRequest) returns (ListFeedsResponse) { + option (google.api.http) = { + get: "/v1/{parent=*/*}/feeds" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an asset feed configuration. + rpc UpdateFeed(UpdateFeedRequest) returns (Feed) { + option (google.api.http) = { + patch: "/v1/{feed.name=*/*/feeds/*}" + body: "*" + }; + option (google.api.method_signature) = "feed"; + } + + // Deletes an asset feed. + rpc DeleteFeed(DeleteFeedRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Searches all 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. + rpc SearchAllResources(SearchAllResourcesRequest) + returns (SearchAllResourcesResponse) { + option (google.api.http) = { + get: "/v1/{scope=*/*}:searchAllResources" + }; + option (google.api.method_signature) = "scope,query,asset_types"; + } + + // 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. + rpc SearchAllIamPolicies(SearchAllIamPoliciesRequest) + returns (SearchAllIamPoliciesResponse) { + option (google.api.http) = { + get: "/v1/{scope=*/*}:searchAllIamPolicies" + }; + option (google.api.method_signature) = "scope,query"; + } + + // Analyzes IAM policies to answer which identities have what accesses on + // which resources. + rpc AnalyzeIamPolicy(AnalyzeIamPolicyRequest) + returns (AnalyzeIamPolicyResponse) { + option (google.api.http) = { + get: "/v1/{analysis_query.scope=*/*}:analyzeIamPolicy" + }; + } + + // 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. + rpc AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{analysis_query.scope=*/*}:analyzeIamPolicyLongrunning" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse" + metadata_type: "google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata" + }; + } + + // 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. + rpc AnalyzeMove(AnalyzeMoveRequest) returns (AnalyzeMoveResponse) { + option (google.api.http) = { + get: "/v1/{resource=*/*}:analyzeMove" + }; + } + + // Issue a job that queries assets using a SQL statement compatible with + // [BigQuery Standard + // SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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. + rpc QueryAssets(QueryAssetsRequest) returns (QueryAssetsResponse) { + option (google.api.http) = { + post: "/v1/{parent=*/*}:queryAssets" + body: "*" + }; + } + + // Creates a saved query in a parent project/folder/organization. + rpc CreateSavedQuery(CreateSavedQueryRequest) returns (SavedQuery) { + option (google.api.http) = { + post: "/v1/{parent=*/*}/savedQueries" + body: "saved_query" + }; + option (google.api.method_signature) = "parent,saved_query,saved_query_id"; + } + + // Gets details about a saved query. + rpc GetSavedQuery(GetSavedQueryRequest) returns (SavedQuery) { + option (google.api.http) = { + get: "/v1/{name=*/*/savedQueries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all saved queries in a parent project/folder/organization. + rpc ListSavedQueries(ListSavedQueriesRequest) + returns (ListSavedQueriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=*/*}/savedQueries" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a saved query. + rpc UpdateSavedQuery(UpdateSavedQueryRequest) returns (SavedQuery) { + option (google.api.http) = { + patch: "/v1/{saved_query.name=*/*/savedQueries/*}" + body: "saved_query" + }; + option (google.api.method_signature) = "saved_query,update_mask"; + } + + // Deletes a saved query. + rpc DeleteSavedQuery(DeleteSavedQueryRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=*/*/savedQueries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets effective IAM policies for a batch of resources. + rpc BatchGetEffectiveIamPolicies(BatchGetEffectiveIamPoliciesRequest) + returns (BatchGetEffectiveIamPoliciesResponse) { + option (google.api.http) = { + get: "/v1/{scope=*/*}/effectiveIamPolicies:batchGet" + }; + } +} + +// Represents the metadata of the longrunning operation for the +// AnalyzeIamPolicyLongrunning rpc. +message AnalyzeIamPolicyLongrunningMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Export asset request. +message ExportAssetsRequest { + // Required. The relative name of the root asset. This can only be an + // organization number (such as "organizations/123"), a project ID (such as + // "projects/my-project-id"), or a project number (such as "projects/12345"), + // or a folder number (such as "folders/123"). + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; + + // Timestamp to take an asset snapshot. This can only be set to a timestamp + // between the current time and the current time minus 35 days (inclusive). + // If not specified, the current time will be used. Due to delays in resource + // data collection and indexing, there is a volatile window during which + // running the same query may get different results. + google.protobuf.Timestamp read_time = 2; + + // A list of asset types to take a snapshot for. For example: + // "compute.googleapis.com/Disk". + // + // Regular expressions are also supported. For example: + // + // * "compute.googleapis.com.*" snapshots resources whose asset type starts + // with "compute.googleapis.com". + // * ".*Instance" snapshots resources whose asset type ends with "Instance". + // * ".*Instance.*" snapshots resources whose asset type contains "Instance". + // + // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + // regular expression syntax. If the regular expression does not match any + // supported asset type, an INVALID_ARGUMENT error will be returned. + // + // If specified, only matching assets will be returned, otherwise, it will + // snapshot all asset types. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name will be + // returned. + ContentType content_type = 4; + + // Required. Output configuration indicating where the results will be output + // to. + OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; + + // A list of relationship types to export, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it snapshots specified relationships. It returns an error if + // any of the [relationship_types] doesn't belong to the supported + // relationship types of the [asset_types] or if any of the [asset_types] + // doesn't belong to the source types of the [relationship_types]. + // * Otherwise: + // it snapshots the supported relationships for all [asset_types] or returns + // an error if any of the [asset_types] has no relationship support. + // An unspecified asset types field means all supported asset_types. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + // supported asset types and relationship types. + repeated string relationship_types = 6; +} + +// The export asset response. This message is returned by the +// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] +// method in the returned +// [google.longrunning.Operation.response][google.longrunning.Operation.response] +// field. +message ExportAssetsResponse { + // Time the snapshot was taken. + google.protobuf.Timestamp read_time = 1; + + // Output configuration indicating where the results were output to. + OutputConfig output_config = 2; + + // Output result indicating where the assets were exported to. For example, a + // set of actual Google Cloud Storage object uris where the assets are + // exported to. The uris can be different from what [output_config] has + // specified, as the service will split the output object into multiple ones + // once it exceeds a single Google Cloud Storage object limit. + OutputResult output_result = 3; +} + +// ListAssets request. +message ListAssetsRequest { + // Required. Name of the organization, folder, or project the assets belong + // to. Format: "organizations/[organization-number]" (such as + // "organizations/123"), "projects/[project-id]" (such as + // "projects/my-project-id"), "projects/[project-number]" (such as + // "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; + + // Timestamp to take an asset snapshot. This can only be set to a timestamp + // between the current time and the current time minus 35 days (inclusive). + // If not specified, the current time will be used. Due to delays in resource + // data collection and indexing, there is a volatile window during which + // running the same query may get different results. + google.protobuf.Timestamp read_time = 2; + + // A list of asset types to take a snapshot for. For example: + // "compute.googleapis.com/Disk". + // + // Regular expression is also supported. For example: + // + // * "compute.googleapis.com.*" snapshots resources whose asset type starts + // with "compute.googleapis.com". + // * ".*Instance" snapshots resources whose asset type ends with "Instance". + // * ".*Instance.*" snapshots resources whose asset type contains "Instance". + // + // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + // regular expression syntax. If the regular expression does not match any + // supported asset type, an INVALID_ARGUMENT error will be returned. + // + // If specified, only matching assets will be returned, otherwise, it will + // snapshot all asset types. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name will + // be returned. + ContentType content_type = 4; + + // The maximum number of assets to be returned in a single response. Default + // is 100, minimum is 1, and maximum is 1000. + int32 page_size = 5; + + // The `next_page_token` returned from the previous `ListAssetsResponse`, or + // unspecified for the first `ListAssetsRequest`. It is a continuation of a + // prior `ListAssets` call, and the API should return the next page of assets. + string page_token = 6; + + // A list of relationship types to output, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it snapshots specified relationships. It returns an error if + // any of the [relationship_types] doesn't belong to the supported + // relationship types of the [asset_types] or if any of the [asset_types] + // doesn't belong to the source types of the [relationship_types]. + // * Otherwise: + // it snapshots the supported relationships for all [asset_types] or returns + // an error if any of the [asset_types] has no relationship support. + // An unspecified asset types field means all supported asset_types. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types and relationship types. + repeated string relationship_types = 7; +} + +// ListAssets response. +message ListAssetsResponse { + // Time the snapshot was taken. + google.protobuf.Timestamp read_time = 1; + + // Assets. + repeated Asset assets = 2; + + // Token to retrieve the next page of results. It expires 72 hours after the + // page token for the first page is generated. Set to empty if there are no + // remaining results. + string next_page_token = 3; +} + +// Batch get assets history request. +message BatchGetAssetsHistoryRequest { + // Required. The relative name of the root asset. It can only be an + // organization number (such as "organizations/123"), a project ID (such as + // "projects/my-project-id")", or a project number (such as "projects/12345"). + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; + + // A list of the full names of the assets. + // See: https://cloud.google.com/asset-inventory/docs/resource-name-format + // Example: + // + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // + // The request becomes a no-op if the asset name list is empty, and the max + // size of the asset name list is 100 in one request. + repeated string asset_names = 2; + + // Optional. The content type. + ContentType content_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The time window for the asset history. Both start_time and + // end_time are optional and if set, it must be after the current time minus + // 35 days. If end_time is not set, it is default to current timestamp. + // If start_time is not set, the snapshot of the assets at end_time will be + // returned. The returned results contain all temporal assets whose time + // window overlap with read_time_window. + TimeWindow read_time_window = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of relationship types to output, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it outputs specified relationships' history on the [asset_names]. It + // returns an error if any of the [relationship_types] doesn't belong to the + // supported relationship types of the [asset_names] or if any of the + // [asset_names]'s types doesn't belong to the source types of the + // [relationship_types]. + // * Otherwise: + // it outputs the supported relationships' history on the [asset_names] or + // returns an error if any of the [asset_names]'s types has no relationship + // support. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + // supported asset types and relationship types. + repeated string relationship_types = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Batch get assets history response. +message BatchGetAssetsHistoryResponse { + // A list of assets with valid time windows. + repeated TemporalAsset assets = 1; +} + +// Create asset feed request. +message CreateFeedRequest { + // Required. The name of the project/folder/organization where this feed + // should be created in. It can only be an organization number (such as + // "organizations/123"), a folder number (such as "folders/123"), a project ID + // (such as "projects/my-project-id")", or a project number (such as + // "projects/12345"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. This is the client-assigned asset feed identifier and it needs to + // be unique under a specific parent project/folder/organization. + string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The feed details. The field `name` must be empty and it will be + // generated in the format of: projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Get asset feed request. +message GetFeedRequest { + // Required. The name of the Feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloudasset.googleapis.com/Feed" } + ]; +} + +// List asset feeds request. +message ListFeedsRequest { + // Required. The parent project/folder/organization whose feeds are to be + // listed. It can only be using project/folder/organization number (such as + // "folders/12345")", or a project ID (such as "projects/my-project-id"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message ListFeedsResponse { + // A list of feeds. + repeated Feed feeds = 1; +} + +// Update asset feed request. +message UpdateFeedRequest { + // Required. The new values of feed details. It must match an existing feed + // and the field `name` must be in the format of: + // projects/project_number/feeds/feed_id or + // folders/folder_number/feeds/feed_id or + // organizations/organization_number/feeds/feed_id. + Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Only updates the `feed` fields indicated by this mask. + // The field mask must not be empty, and it must not contain fields that + // are immutable or only set by the server. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +message DeleteFeedRequest { + // Required. The name of the feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloudasset.googleapis.com/Feed" } + ]; +} + +// Output configuration for export assets destination. +message OutputConfig { + // Asset export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + + // Destination on BigQuery. The output table stores the fields in asset + // Protobuf as columns in BigQuery. + BigQueryDestination bigquery_destination = 2; + } +} + +// Output result of export assets. +message OutputResult { + // Asset export result. + oneof result { + // Export result on Cloud Storage. + GcsOutputResult gcs_result = 1; + } +} + +// A Cloud Storage output result. +message GcsOutputResult { + // List of uris of the Cloud Storage objects. Example: + // "gs://bucket_name/object_name". + repeated string uris = 1; +} + +// A Cloud Storage location. +message GcsDestination { + // Required. + oneof object_uri { + // The uri of the Cloud Storage object. It's the same uri that is used by + // gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + // + // If the specified Cloud Storage object already exists and there is no + // [hold](https://cloud.google.com/storage/docs/object-holds), it will be + // overwritten with the exported result. + string uri = 1; + + // The uri prefix of all generated Cloud Storage objects. Example: + // "gs://bucket_name/object_name_prefix". Each object uri is in format: + // "gs://bucket_name/object_name_prefix// and only + // contains assets for that type. starts from 0. Example: + // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is + // the first shard of output objects containing all + // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be + // returned if file with the same name "gs://bucket_name/object_name_prefix" + // already exists. + string uri_prefix = 2; + } +} + +// A BigQuery destination for exporting assets to. +message BigQueryDestination { + // Required. The BigQuery dataset in format + // "projects/projectId/datasets/datasetId", to which the snapshot result + // should be exported. If this dataset does not exist, the export call returns + // an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets` + // determines the + // [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema) + // of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also + // influences the schema. + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery table to which the snapshot result should be + // written. If this table does not exist, a new table with the given name + // will be created. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + + // If the destination table already exists and this flag is `TRUE`, the + // table will be overwritten by the contents of assets snapshot. If the flag + // is `FALSE` or unset and the destination table already exists, the export + // call returns an INVALID_ARGUMEMT error. + bool force = 3; + + // [partition_spec] determines whether to export to partitioned table(s) and + // how to partition the data. + // + // If [partition_spec] is unset or [partition_spec.partition_key] is unset or + // `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to + // non-partitioned table(s). [force] will decide whether to overwrite existing + // table(s). + // + // If [partition_spec] is specified. First, the snapshot results will be + // written to partitioned table(s) with two additional timestamp columns, + // readTime and requestTime, one of which will be the partition key. Secondly, + // in the case when any destination table already exists, it will first try to + // update existing table's schema as necessary by appending additional + // columns. Then, if [force] is `TRUE`, the corresponding partition will be + // overwritten by the snapshot results (data in different partitions will + // remain intact); if [force] is unset or `FALSE`, it will append the data. An + // error will be returned if the schema update or data appension fails. + PartitionSpec partition_spec = 4; + + // If this flag is `TRUE`, the snapshot results will be written to one or + // multiple tables, each of which contains results of one asset type. The + // [force] and [partition_spec] fields will apply to each of them. + // + // Field [table] will be concatenated with "_" and the asset type names (see + // https://cloud.google.com/asset-inventory/docs/supported-asset-types for + // supported asset types) to construct per-asset-type table names, in which + // all non-alphanumeric characters like "." and "/" will be substituted by + // "_". Example: if field [table] is "mytable" and snapshot results + // contain "storage.googleapis.com/Bucket" assets, the corresponding table + // name will be "mytable_storage_googleapis_com_Bucket". If any of these + // tables does not exist, a new table with the concatenated name will be + // created. + // + // When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of + // each table will include RECORD-type columns mapped to the nested fields in + // the Asset.resource.data field of that asset type (up to the 15 nested level + // BigQuery supports + // (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The + // fields in >15 nested levels will be stored in JSON format string as a child + // column of its parent RECORD column. + // + // If error occurs when exporting to any table, the whole export call will + // return an error but the export results that already succeed will persist. + // Example: if exporting to table_type_A succeeds when exporting to + // table_type_B fails during one export call, the results in table_type_A will + // persist and there will not be partial results persisting in a table. + bool separate_tables_per_asset_type = 5; +} + +// Specifications of BigQuery partitioned table as export destination. +message PartitionSpec { + // This enum is used to determine the partition key column when exporting + // assets to BigQuery partitioned table(s). Note that, if the partition key is + // a timestamp column, the actual partition is based on its date value + // (expressed in UTC. see details in + // https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables). + enum PartitionKey { + // Unspecified partition key. If used, it means using non-partitioned table. + PARTITION_KEY_UNSPECIFIED = 0; + + // The time when the snapshot is taken. If specified as partition key, the + // result table(s) is partitoned by the additional timestamp column, + // readTime. If [read_time] in ExportAssetsRequest is specified, the + // readTime column's value will be the same as it. Otherwise, its value will + // be the current time that is used to take the snapshot. + READ_TIME = 1; + + // The time when the request is received and started to be processed. If + // specified as partition key, the result table(s) is partitoned by the + // requestTime column, an additional timestamp column representing when the + // request was received. + REQUEST_TIME = 2; + } + + // The partition key for BigQuery partitioned table. + PartitionKey partition_key = 1; +} + +// A Pub/Sub destination. +message PubsubDestination { + // The name of the Pub/Sub topic to publish to. + // Example: `projects/PROJECT_ID/topics/TOPIC_ID`. + string topic = 1; +} + +// Output configuration for asset feed destination. +message FeedOutputConfig { + // Asset feed destination. + oneof destination { + // Destination on Pub/Sub. + PubsubDestination pubsub_destination = 1; + } +} + +// An asset feed used to export asset updates to a destinations. +// An asset feed filter controls what updates are exported. +// The asset feed must be created within a project, organization, or +// folder. Supported destinations are: +// Pub/Sub topics. +message Feed { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Feed" + pattern: "projects/{project}/feeds/{feed}" + pattern: "folders/{folder}/feeds/{feed}" + pattern: "organizations/{organization}/feeds/{feed}" + history: ORIGINALLY_SINGLE_PATTERN + }; + + // Required. The format will be + // projects/{project_number}/feeds/{client-assigned_feed_identifier} or + // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or + // organizations/{organization_number}/feeds/{client-assigned_feed_identifier} + // + // The client-assigned feed identifier must be unique within the parent + // project/folder/organization. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of the full names of the assets to receive updates. You must specify + // either or both of asset_names and asset_types. Only asset updates matching + // specified asset_names or asset_types are exported to the feed. + // Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // For a list of the full names for supported asset types, see [Resource + // name format](/asset-inventory/docs/resource-name-format). + repeated string asset_names = 2; + + // A list of types of the assets to receive updates. You must specify either + // or both of asset_names and asset_types. Only asset updates matching + // specified asset_names or asset_types are exported to the feed. + // Example: `"compute.googleapis.com/Disk"` + // + // For a list of all supported asset types, see + // [Supported asset types](/asset-inventory/docs/supported-asset-types). + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name and + // type will be returned. + ContentType content_type = 4; + + // Required. Feed output configuration defining where the asset updates are + // published to. + FeedOutputConfig feed_output_config = 5 + [(google.api.field_behavior) = REQUIRED]; + + // A condition which determines whether an asset update should be published. + // If specified, an asset will be returned only when the expression evaluates + // to true. + // When set, `expression` field in the `Expr` must be a valid [CEL expression] + // (https://github.com/google/cel-spec) on a TemporalAsset with name + // `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted + // == true") will only publish Asset deletions. Other fields of `Expr` are + // optional. + // + // See our [user + // guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition) + // for detailed instructions. + google.type.Expr condition = 6; + + // A list of relationship types to output, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it outputs specified relationship updates on the [asset_names] or the + // [asset_types]. It returns an error if any of the [relationship_types] + // doesn't belong to the supported relationship types of the [asset_names] or + // [asset_types], or any of the [asset_names] or the [asset_types] doesn't + // belong to the source types of the [relationship_types]. + // * Otherwise: + // it outputs the supported relationships of the types of [asset_names] and + // [asset_types] or returns an error if any of the [asset_names] or the + // [asset_types] has no replationship support. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types and relationship types. + repeated string relationship_types = 7; +} + +// Search all resources request. +message SearchAllResourcesRequest { + // Required. A scope can be a project, a folder, or an organization. The + // search is limited to the resources within the `scope`. The caller must be + // granted the + // [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + // permission on the desired scope. + // + // The allowed values are: + // + // * projects/{PROJECT_ID} (e.g., "projects/foo-bar") + // * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") + // * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") + // * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. See [how to construct a + // query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + // for more information. If not specified or empty, it will search all the + // resources within the specified `scope`. + // + // Examples: + // + // * `name:Important` to find Cloud resources whose name contains + // "Important" as a word. + // * `name=Important` to find the Cloud resource whose name is exactly + // "Important". + // * `displayName:Impor*` to find Cloud resources whose display name + // contains "Impor" as a prefix of any word in the field. + // * `location:us-west*` to find Cloud resources whose location contains both + // "us" and "west" as prefixes. + // * `labels:prod` to find Cloud resources whose labels contain "prod" as + // a key or value. + // * `labels.env:prod` to find Cloud resources that have a label "env" + // and its value is "prod". + // * `labels.env:*` to find Cloud resources that have a label "env". + // * `kmsKey:key` to find Cloud resources encrypted with a customer-managed + // encryption key whose name contains the word "key". + // * `relationships:instance-group-1` to find Cloud resources that have + // relationships with "instance-group-1" in the related resource name. + // * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that + // have relationships of type "INSTANCE_TO_INSTANCEGROUP". + // * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find + // compute instances that have relationships with "instance-group-1" in the + // compute instance group resource name, for relationship type + // "INSTANCE_TO_INSTANCEGROUP". + // * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a + // word. + // * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain + // "ACTIVE" as a word. + // * `createTime<1609459200` to find Cloud resources that were created before + // "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of + // "2021-01-01 00:00:00 UTC" in seconds. + // * `updateTime>1609459200` to find Cloud resources that were updated after + // "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of + // "2021-01-01 00:00:00 UTC" in seconds. + // * `Important` to find Cloud resources that contain "Important" as a word + // in any of the searchable fields. + // * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any + // word in any of the searchable fields. + // * `Important location:(us-west1 OR global)` to find Cloud + // resources that contain "Important" as a word in any of the searchable + // fields and are also located in the "us-west1" region or the "global" + // location. + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of asset types that this request searches for. If empty, + // it will search all the [searchable asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + // + // Regular expressions are also supported. For example: + // + // * "compute.googleapis.com.*" snapshots resources whose asset type starts + // with "compute.googleapis.com". + // * ".*Instance" snapshots resources whose asset type ends with "Instance". + // * ".*Instance.*" snapshots resources whose asset type contains "Instance". + // + // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + // regular expression syntax. If the regular expression does not match any + // supported asset type, an INVALID_ARGUMENT error will be returned. + repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped + // at 500 even if a larger value is given. If set to zero, server will pick an + // appropriate default. Returned results may be fewer than requested. When + // this happens, there could be more results as long as `next_page_token` is + // returned. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, then retrieve the next batch of results from the + // preceding call to this method. `page_token` must be the value of + // `next_page_token` from the previous response. The values of all other + // method parameters, must be identical to those in the previous call. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields specifying the sorting order of + // the results. The default order is ascending. Add " DESC" after the field + // name to indicate descending order. Redundant space characters are ignored. + // Example: "location DESC, name". + // Only singular primitive fields in the response are sortable: + // + // * name + // * assetType + // * project + // * displayName + // * description + // * location + // * kmsKey + // * createTime + // * updateTime + // * state + // * parentFullResourceName + // * parentAssetType + // + // All the other fields such as repeated fields (e.g., `networkTags`), map + // fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`) + // are not supported. + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields specifying which fields to be + // returned in ResourceSearchResult. Only '*' or combination of top level + // fields can be specified. Field names of both snake_case and camelCase are + // supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`. + // + // The read_mask paths must be valid field paths listed but not limited to + // (both snake_case and camelCase are supported): + // + // * name + // * assetType + // * project + // * displayName + // * description + // * location + // * tagKeys + // * tagValues + // * tagValueIds + // * labels + // * networkTags + // * kmsKey + // * createTime + // * updateTime + // * state + // * additionalAttributes + // * versionedResources + // + // If read_mask is not specified, all fields except versionedResources will + // be returned. + // If only '*' is specified, all fields including versionedResources will be + // returned. + // Any invalid field path will trigger INVALID_ARGUMENT error. + google.protobuf.FieldMask read_mask = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all resources response. +message SearchAllResourcesResponse { + // A list of Resources that match the search query. It contains the resource + // standard metadata information. + repeated ResourceSearchResult results = 1; + + // If there are more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; +} + +// Search all IAM policies request. +message SearchAllIamPoliciesRequest { + // Required. A scope can be a project, a folder, or an organization. The + // search is limited to the IAM policies within the `scope`. The caller must + // be granted the + // [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + // permission on the desired scope. + // + // The allowed values are: + // + // * projects/{PROJECT_ID} (e.g., "projects/foo-bar") + // * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") + // * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") + // * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. See [how to construct a + // query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) + // for more information. If not specified or empty, it will search all the + // IAM policies within the specified `scope`. Note that the query string is + // compared against each Cloud IAM policy binding, including its principals, + // roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + // contain the bindings that match your query. To learn more about the IAM + // policy structure, see the [IAM policy + // documentation](https://cloud.google.com/iam/help/allow-policies/structure). + // + // Examples: + // + // * `policy:amy@gmail.com` to find IAM policy bindings that specify user + // "amy@gmail.com". + // * `policy:roles/compute.admin` to find IAM policy bindings that specify + // the Compute Admin role. + // * `policy:comp*` to find IAM policy bindings that contain "comp" as a + // prefix of any word in the binding. + // * `policy.role.permissions:storage.buckets.update` to find IAM policy + // bindings that specify a role containing "storage.buckets.update" + // permission. Note that if callers don't have `iam.roles.get` access to a + // role's included permissions, policy bindings that specify this role will + // be dropped from the search results. + // * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + // role containing "upd" as a prefix of any word in the role permission. + // Note that if callers don't have `iam.roles.get` access to a role's + // included permissions, policy bindings that specify this role will be + // dropped from the search results. + // * `resource:organizations/123456` to find IAM policy bindings + // that are set on "organizations/123456". + // * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + // find IAM policy bindings that are set on the project named "myproject". + // * `Important` to find IAM policy bindings that contain "Important" as a + // word in any of the searchable fields (except for the included + // permissions). + // * `resource:(instance1 OR instance2) policy:amy` to find + // IAM policy bindings that are set on resources "instance1" or + // "instance2" and also specify user "amy". + // * `roles:roles/compute.admin` to find IAM policy bindings that specify the + // Compute Admin role. + // * `memberTypes:user` to find IAM policy bindings that contain the + // principal type "user". + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped + // at 500 even if a larger value is given. If set to zero, server will pick an + // appropriate default. Returned results may be fewer than requested. When + // this happens, there could be more results as long as `next_page_token` is + // returned. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieve the next batch of results from the preceding + // call to this method. `page_token` must be the value of `next_page_token` + // from the previous response. The values of all other method parameters must + // be identical to those in the previous call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of asset types that the IAM policies are attached to. If + // empty, it will search the IAM policies that are attached to all the + // [searchable asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + // + // Regular expressions are also supported. For example: + // + // * "compute.googleapis.com.*" snapshots IAM policies attached to asset type + // starts with "compute.googleapis.com". + // * ".*Instance" snapshots IAM policies attached to asset type ends with + // "Instance". + // * ".*Instance.*" snapshots IAM policies attached to asset type contains + // "Instance". + // + // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + // regular expression syntax. If the regular expression does not match any + // supported asset type, an INVALID_ARGUMENT error will be returned. + repeated string asset_types = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields specifying the sorting order of + // the results. The default order is ascending. Add " DESC" after the field + // name to indicate descending order. Redundant space characters are ignored. + // Example: "assetType DESC, resource". + // Only singular primitive fields in the response are sortable: + // * resource + // * assetType + // * project + // All the other fields such as repeated fields (e.g., `folders`) and + // non-primitive fields (e.g., `policy`) are not supported. + string order_by = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all IAM policies response. +message SearchAllIamPoliciesResponse { + // A list of IamPolicy that match the search query. Related information such + // as the associated resource is returned along with the policy. + repeated IamPolicySearchResult results = 1; + + // Set if there are more results than those appearing in this response; to get + // the next set of results, call this method again, using this value as the + // `page_token`. + string next_page_token = 2; +} + +// IAM policy analysis query message. +message IamPolicyAnalysisQuery { + // Specifies the resource to analyze for access policies, which may be set + // directly on the resource, or on ancestors such as organizations, folders or + // projects. + message ResourceSelector { + // Required. The [full resource name] + // (https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of a resource of [supported resource + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). + string full_resource_name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies an identity for which to determine resource access, based on + // roles assigned either directly to them or to the groups they belong to, + // directly or indirectly. + message IdentitySelector { + // Required. The identity appear in the form of principals in + // [IAM policy + // binding](https://cloud.google.com/iam/reference/rest/v1/Binding). + // + // The examples of supported forms are: + // "user:mike@example.com", + // "group:admins@example.com", + // "domain:google.com", + // "serviceAccount:my-project-id@appspot.gserviceaccount.com". + // + // Notice that wildcard characters (such as * and ?) are not supported. + // You must give a specific identity. + string identity = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies roles and/or permissions to analyze, to determine both the + // identities possessing them and the resources they control. If multiple + // values are specified, results will include roles or permissions matching + // any of them. The total number of roles and permissions should be equal or + // less than 10. + message AccessSelector { + // Optional. The roles to appear in result. + repeated string roles = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The permissions to appear in result. + repeated string permissions = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Contains query options. + message Options { + // Optional. If true, the identities section of the result will expand any + // Google groups appearing in an IAM policy binding. + // + // If + // [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] + // is specified, the identity in the result will be determined by the + // selector, and this flag is not allowed to set. + // + // If true, the default max expansion per group is 1000 for + // AssetService.AnalyzeIamPolicy][]. + // + // Default is false. + bool expand_groups = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the access section of result will expand any roles + // appearing in IAM policy bindings to include their permissions. + // + // If + // [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] + // is specified, the access section of the result will be determined by the + // selector, and this flag is not allowed to set. + // + // Default is false. + bool expand_roles = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true and + // [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] + // is not specified, the resource section of the result will expand any + // resource attached to an IAM policy to include resources lower in the + // resource hierarchy. + // + // For example, if the request analyzes for which resources user A has + // permission P, and the results include an IAM policy with P on a GCP + // folder, the results will also include resources in that folder with + // permission P. + // + // If true and + // [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] + // is specified, the resource section of the result will expand the + // specified resource to include resources lower in the resource hierarchy. + // Only project or lower resources are supported. Folder and organization + // resource cannot be used together with this option. + // + // For example, if the request analyzes for which users have permission P on + // a GCP project with this option enabled, the results will include all + // users who have permission P on that project or any lower resource. + // + // If true, the default max expansion per resource is 1000 for + // AssetService.AnalyzeIamPolicy][] and 100000 for + // AssetService.AnalyzeIamPolicyLongrunning][]. + // + // Default is false. + bool expand_resources = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the result will output the relevant parent/child + // relationships between resources. Default is false. + bool output_resource_edges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the result will output the relevant membership + // relationships between groups and other groups, and between groups and + // principals. Default is false. + bool output_group_edges = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include access analysis from + // identities to resources via service account impersonation. This is a very + // expensive operation, because many derived queries will be executed. We + // highly recommend you use + // [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] + // rpc instead. + // + // For example, if the request analyzes for which resources user A has + // permission P, and there's an IAM policy states user A has + // iam.serviceAccounts.getAccessToken permission to a service account SA, + // and there's another IAM policy states service account SA has permission P + // to a GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Another example, if the request analyzes for who has + // permission P to a GCP folder F, and there's an IAM policy states user A + // has iam.serviceAccounts.actAs permission to a service account SA, and + // there's another IAM policy states service account SA has permission P to + // the GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Only the following permissions are considered in this analysis: + // + // * `iam.serviceAccounts.actAs` + // * `iam.serviceAccounts.signBlob` + // * `iam.serviceAccounts.signJwt` + // * `iam.serviceAccounts.getAccessToken` + // * `iam.serviceAccounts.getOpenIdToken` + // * `iam.serviceAccounts.implicitDelegation` + // + // Default is false. + bool analyze_service_account_impersonation = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The IAM conditions context. + message ConditionContext { + // The IAM conditions time context. + oneof TimeContext { + // The hypothetical access timestamp to evaluate IAM conditions. Note that + // this value must not be earlier than the current time; otherwise, an + // INVALID_ARGUMENT error will be returned. + google.protobuf.Timestamp access_time = 1; + } + } + + // Required. The relative name of the root asset. Only resources and IAM + // policies within the scope will be analyzed. + // + // This can only be an organization number (such as "organizations/123"), a + // folder number (such as "folders/123"), a project ID (such as + // "projects/my-project-id"), or a project number (such as "projects/12345"). + // + // To know how to get organization id, visit [here + // ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + // + // To know how to get folder or project id, visit [here + // ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies a resource for analysis. + ResourceSelector resource_selector = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies an identity for analysis. + IdentitySelector identity_selector = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies roles or permissions for analysis. This is optional. + AccessSelector access_selector = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The query options. + Options options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The hypothetical context for IAM conditions evaluation. + ConditionContext condition_context = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message for +// [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyRequest { + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The name of a saved query, which must be in the format of: + // + // * projects/project_number/savedQueries/saved_query_id + // * folders/folder_number/savedQueries/saved_query_id + // * organizations/organization_number/savedQueries/saved_query_id + // + // If both `analysis_query` and `saved_analysis_query` are provided, they + // will be merged together with the `saved_analysis_query` as base and + // the `analysis_query` as overrides. For more details of the merge behavior, + // please refer to the + // [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + // page. + // + // Note that you cannot override primitive fields with default value, such as + // 0 or empty string, etc., because we use proto3, which doesn't support field + // presence yet. + string saved_analysis_query = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of time executable has to complete. See JSON + // representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + // + // If this field is set with a value less than the RPC deadline, and the + // execution of your query hasn't finished in the specified + // execution timeout, you will get a response with partial result. + // Otherwise, your query's execution will continue until the RPC deadline. + // If it's not finished until then, you will get a DEADLINE_EXCEEDED error. + // + // Default is empty. + google.protobuf.Duration execution_timeout = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for +// [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyResponse { + // An analysis message to group the query and results. + message IamPolicyAnalysis { + // The analysis query. + IamPolicyAnalysisQuery analysis_query = 1; + + // A list of + // [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult] + // that matches the analysis query, or empty if no result is found. + repeated IamPolicyAnalysisResult analysis_results = 2; + + // Represents whether all entries in the + // [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] + // have been fully explored to answer the query. + bool fully_explored = 3; + + // A list of non-critical errors happened during the query handling. + repeated IamPolicyAnalysisState non_critical_errors = 5; + } + + // The main analysis that matches the original request. + IamPolicyAnalysis main_analysis = 1; + + // The service account impersonation analysis if + // [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is + // enabled. + repeated IamPolicyAnalysis service_account_impersonation_analysis = 2; + + // Represents whether all entries in the + // [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] + // and + // [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] + // have been fully explored to answer the query in the request. + bool fully_explored = 3; +} + +// Output configuration for export IAM policy analysis destination. +message IamPolicyAnalysisOutputConfig { + // A Cloud Storage location. + message GcsDestination { + // Required. The uri of the Cloud Storage object. It's the same uri that is + // used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + // + // If the specified Cloud Storage object already exists and there is no + // [hold](https://cloud.google.com/storage/docs/object-holds), it will be + // overwritten with the analysis result. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A BigQuery destination. + message BigQueryDestination { + // This enum determines the partition key column for the bigquery tables. + // Partitioning can improve query performance and reduce query cost by + // filtering partitions. Refer to + // https://cloud.google.com/bigquery/docs/partitioned-tables for details. + enum PartitionKey { + // Unspecified partition key. Tables won't be partitioned using this + // option. + PARTITION_KEY_UNSPECIFIED = 0; + + // The time when the request is received. If specified as partition key, + // the result table(s) is partitoned by the RequestTime column, an + // additional timestamp column representing when the request was received. + REQUEST_TIME = 1; + } + + // Required. The BigQuery dataset in format + // "projects/projectId/datasets/datasetId", to which the analysis results + // should be exported. If this dataset does not exist, the export call will + // return an INVALID_ARGUMENT error. + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The prefix of the BigQuery tables to which the analysis results + // will be written. Tables will be created based on this table_prefix if not + // exist: + // * _analysis table will contain export operation's metadata. + // * _analysis_result will contain all the + // [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]. + // When [partition_key] is specified, both tables will be partitioned based + // on the [partition_key]. + string table_prefix = 2 [(google.api.field_behavior) = REQUIRED]; + + // The partition key for BigQuery partitioned table. + PartitionKey partition_key = 3; + + // Optional. Specifies the action that occurs if the destination table or + // partition already exists. The following values are supported: + // + // * WRITE_TRUNCATE: If the table or partition already exists, BigQuery + // overwrites the entire table or all the partitions data. + // * WRITE_APPEND: If the table or partition already exists, BigQuery + // appends the data to the table or the latest partition. + // * WRITE_EMPTY: If the table already exists and contains data, an error is + // returned. + // + // The default value is WRITE_APPEND. Each action is atomic and only occurs + // if BigQuery is able to complete the job successfully. Details are at + // https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file. + string write_disposition = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // IAM policy analysis export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + + // Destination on BigQuery. + BigQueryDestination bigquery_destination = 2; + } +} + +// A request message for +// [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. +message AnalyzeIamPolicyLongrunningRequest { + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The name of a saved query, which must be in the format of: + // + // * projects/project_number/savedQueries/saved_query_id + // * folders/folder_number/savedQueries/saved_query_id + // * organizations/organization_number/savedQueries/saved_query_id + // + // If both `analysis_query` and `saved_analysis_query` are provided, they + // will be merged together with the `saved_analysis_query` as base and + // the `analysis_query` as overrides. For more details of the merge behavior, + // please refer to the + // [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) + // doc. + // + // Note that you cannot override primitive fields with default value, such as + // 0 or empty string, etc., because we use proto3, which doesn't support field + // presence yet. + string saved_analysis_query = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Output configuration indicating where the results will be output + // to. + IamPolicyAnalysisOutputConfig output_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A response message for +// [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. +message AnalyzeIamPolicyLongrunningResponse {} + +// A saved query which can be shared with others or used later. +message SavedQuery { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/SavedQuery" + pattern: "projects/{project}/savedQueries/{saved_query}" + pattern: "folders/{folder}/savedQueries/{saved_query}" + pattern: "organizations/{organization}/savedQueries/{saved_query}" + }; + + // The query content. + message QueryContent { + oneof query_content { + // An IAM Policy Analysis query, which could be used in + // the + // [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy] + // rpc or the + // [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] + // rpc. + IamPolicyAnalysisQuery iam_policy_analysis_query = 1; + } + } + + // The resource name of the saved query. The format must be: + // + // * projects/project_number/savedQueries/saved_query_id + // * folders/folder_number/savedQueries/saved_query_id + // * organizations/organization_number/savedQueries/saved_query_id + string name = 1; + + // The description of this saved query. This value should be fewer than 255 + // characters. + string description = 2; + + // Output only. The create time of this saved query. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The account's email address who has created this saved query. + string creator = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this saved query. + google.protobuf.Timestamp last_update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The account's email address who has updated this saved query + // most recently. + string last_updater = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels applied on the resource. + // This value should not contain more than 10 entries. The key and value of + // each entry must be non-empty and fewer than 64 characters. + map labels = 7; + + // The query content. + QueryContent content = 8; +} + +// Request to create a saved query. +message CreateSavedQueryRequest { + // Required. The name of the project/folder/organization where this + // saved_query should be created in. It can only be an organization number + // (such as "organizations/123"), a folder number (such as "folders/123"), a + // project ID (such as "projects/my-project-id")", or a project number (such + // as "projects/12345"). + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/SavedQuery" + } + ]; + + // Required. The saved_query details. The `name` field must be empty as it + // will be generated based on the parent and saved_query_id. + SavedQuery saved_query = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the saved query, which must be unique in the + // specified parent. It will become the final component of the saved query's + // resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-z][0-9]-/. + // + // Notice that this field is required in the saved query creation, and the + // `name` field of the `saved_query` will be ignored. + string saved_query_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to get a saved query. +message GetSavedQueryRequest { + // Required. The name of the saved query and it must be in the format of: + // + // * projects/project_number/savedQueries/saved_query_id + // * folders/folder_number/savedQueries/saved_query_id + // * organizations/organization_number/savedQueries/saved_query_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/SavedQuery" + } + ]; +} + +// Request to list saved queries. +message ListSavedQueriesRequest { + // Required. The parent project/folder/organization whose savedQueries are to + // be listed. It can only be using project/folder/organization number (such as + // "folders/12345")", or a project ID (such as "projects/my-project-id"). + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/SavedQuery" + } + ]; + + // Optional. The expression to filter resources. + // The expression is a list of zero or more restrictions combined via logical + // operators `AND` and `OR`. When `AND` and `OR` are both used in the + // expression, parentheses must be appropriately used to group the + // combinations. The expression may also contain regular expressions. + // + // See https://google.aip.dev/160 for more information on the grammar. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of saved queries to return per page. The + // service may return fewer than this value. If unspecified, at most 50 will + // be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListSavedQueries` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListSavedQueries` must + // match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response of listing saved queries. +message ListSavedQueriesResponse { + // A list of savedQueries. + repeated SavedQuery saved_queries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request to update a saved query. +message UpdateSavedQueryRequest { + // Required. The saved query to update. + // + // The saved query's `name` field is used to identify the one to update, + // which has format as below: + // + // * projects/project_number/savedQueries/saved_query_id + // * folders/folder_number/savedQueries/saved_query_id + // * organizations/organization_number/savedQueries/saved_query_id + SavedQuery saved_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to delete a saved query. +message DeleteSavedQueryRequest { + // Required. The name of the saved query to delete. It must be in the format + // of: + // + // * projects/project_number/savedQueries/saved_query_id + // * folders/folder_number/savedQueries/saved_query_id + // * organizations/organization_number/savedQueries/saved_query_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/SavedQuery" + } + ]; +} + +// The request message for performing resource move analysis. +message AnalyzeMoveRequest { + // View enum for supporting partial analysis responses. + enum AnalysisView { + // The default/unset value. + // The API will default to the FULL view. + ANALYSIS_VIEW_UNSPECIFIED = 0; + + // Full analysis including all level of impacts of the specified resource + // move. + FULL = 1; + + // Basic analysis only including blockers which will prevent the specified + // resource move at runtime. + BASIC = 2; + } + + // Required. Name of the resource to perform the analysis against. + // Only GCP Project are supported as of today. Hence, this can only be Project + // ID (such as "projects/my-project-id") or a Project Number (such as + // "projects/12345"). + string resource = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of the GCP Folder or Organization to reparent the target + // resource. The analysis will be performed against hypothetically moving the + // resource to this specified desitination parent. This can only be a Folder + // number (such as "folders/123") or an Organization number (such as + // "organizations/123"). + string destination_parent = 2 [(google.api.field_behavior) = REQUIRED]; + + // Analysis view indicating what information should be included in the + // analysis response. If unspecified, the default view is FULL. + AnalysisView view = 3; +} + +// The response message for resource move analysis. +message AnalyzeMoveResponse { + // The list of analyses returned from performing the intended resource move + // analysis. The analysis is grouped by different Cloud services. + repeated MoveAnalysis move_analysis = 1; +} + +// A message to group the analysis information. +message MoveAnalysis { + // The user friendly display name of the analysis. E.g. IAM, Organization + // Policy etc. + string display_name = 1; + + oneof result { + // Analysis result of moving the target resource. + MoveAnalysisResult analysis = 2; + + // Description of error encountered when performing the analysis. + google.rpc.Status error = 3; + } +} + +// An analysis result including blockers and warnings. +message MoveAnalysisResult { + // Blocking information that would prevent the target resource from moving + // to the specified destination at runtime. + repeated MoveImpact blockers = 1; + + // Warning information indicating that moving the target resource to the + // specified destination might be unsafe. This can include important policy + // information and configuration changes, but will not block moves at runtime. + repeated MoveImpact warnings = 2; +} + +// A message to group impacts of moving the target resource. +message MoveImpact { + // User friendly impact detail in a free form message. + string detail = 1; +} + +// Output configuration query assets. +message QueryAssetsOutputConfig { + // BigQuery destination. + message BigQueryDestination { + // Required. The BigQuery dataset where the query results will be saved. It + // has the format of "projects/{projectId}/datasets/{datasetId}". + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery table where the query results will be saved. If + // this table does not exist, a new table with the given name will be + // created. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + + // Specifies the action that occurs if the destination table or partition + // already exists. The following values are supported: + // + // * WRITE_TRUNCATE: If the table or partition already exists, BigQuery + // overwrites the entire table or all the partitions data. + // * WRITE_APPEND: If the table or partition already exists, BigQuery + // appends the data to the table or the latest partition. + // * WRITE_EMPTY: If the table already exists and contains data, an error is + // returned. + string write_disposition = 3; + } + + // BigQuery destination where the query results will be saved. + BigQueryDestination bigquery_destination = 1; +} + +// QueryAssets request. +message QueryAssetsRequest { + // Required. The relative name of the root asset. This can only be an + // organization number (such as "organizations/123"), a project ID (such as + // "projects/my-project-id"), or a project number (such as "projects/12345"), + // or a folder number (such as "folders/123"). + // + // Only assets belonging to the `parent` will be returned. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; + + oneof query { + // Optional. A SQL statement that's compatible with [BigQuery Standard + // SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). + string statement = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reference to the query job, which is from the + // `QueryAssetsResponse` of previous `QueryAssets` call. + string job_reference = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The maximum number of rows to return in the results. Responses + // are limited to 10 MB and 1000 rows. + // + // By default, the maximum row count is 1000. When the byte or row count limit + // is reached, the rest of the query results will be paginated. + // + // The field will be ignored when [output_config] is specified. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token received from previous `QueryAssets`. + // + // The field will be ignored when [output_config] is specified. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the maximum amount of time that the client is willing + // to wait for the query to complete. By default, this limit is 5 min for the + // first query, and 1 minute for the following queries. If the query is + // complete, the `done` field in the `QueryAssetsResponse` is true, otherwise + // false. + // + // Like BigQuery [jobs.query + // API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) + // The call is not guaranteed to wait for the specified timeout; it typically + // returns after around 200 seconds (200,000 milliseconds), even if the query + // is not complete. + // + // The field will be ignored when [output_config] is specified. + google.protobuf.Duration timeout = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Specifies what time period or point in time to query asset metadata at. + // * unset - query asset metadata as it is right now + // * [read_time_window] - query asset metadata as it was at any point in time + // between [start_time] and [end_time]. + // * [read_time] - query asset metadata as it was at that point in time. + // If data for the timestamp/date range selected does not exist, + // it will simply return a valid response with no rows. + oneof time { + // Optional. [start_time] is required. [start_time] must be less than + // [end_time] Defaults [end_time] to now if [start_time] is set and + // [end_time] isn't. Maximum permitted time range is 7 days. + TimeWindow read_time_window = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Queries cloud assets as they appeared at the specified point in + // time. + google.protobuf.Timestamp read_time = 8 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Destination where the query results will be saved. + // + // When this field is specified, the query results won't be saved in the + // [QueryAssetsResponse.query_result]. Instead + // [QueryAssetsResponse.output_config] will be set. + // + // Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used + // to check the status of the query job when passed to a following + // [QueryAssets] API call. + QueryAssetsOutputConfig output_config = 9 + [(google.api.field_behavior) = OPTIONAL]; +} + +// QueryAssets response. +message QueryAssetsResponse { + // Reference to a query job. + string job_reference = 1; + + // The query response, which can be either an `error` or a valid `response`. + // + // If `done` == `false` and the query result is being saved in a output, the + // output_config field will be set. + // If `done` == `true`, exactly one of + // `error`, `query_result` or `output_config` will be set. + bool done = 2; + + oneof response { + // Error status. + google.rpc.Status error = 3; + + // Result of the query. + QueryResult query_result = 4; + + // Output configuration which indicates instead of being returned in API + // response on the fly, the query result will be saved in a specific output. + QueryAssetsOutputConfig output_config = 5; + } +} + +// Execution results of the query. +// +// The result is formatted as rows represented by BigQuery compatible [schema]. +// When pagination is necessary, it will contains the page token to retrieve +// the results of following pages. +message QueryResult { + // Each row hold a query result in the format of `Struct`. + repeated google.protobuf.Struct rows = 1; + + // Describes the format of the [rows]. + TableSchema schema = 2; + + // Token to retrieve the next page of the results. + string next_page_token = 3; + + // Total rows of the whole query results. + int64 total_rows = 4; +} + +// BigQuery Compatible table schema. +message TableSchema { + // Describes the fields in a table. + repeated TableFieldSchema fields = 1; +} + +// A field in TableSchema. +message TableFieldSchema { + // The field name. The name must contain only letters (a-z, A-Z), + // numbers (0-9), or underscores (_), and must start with a letter or + // underscore. The maximum length is 128 characters. + string field = 1; + + // The field data type. Possible values include + // * STRING + // * BYTES + // * INTEGER + // * FLOAT + // * BOOLEAN + // * TIMESTAMP + // * DATE + // * TIME + // * DATETIME + // * GEOGRAPHY, + // * NUMERIC, + // * BIGNUMERIC, + // * RECORD + // (where RECORD indicates that the field contains a nested schema). + string type = 2; + + // The field mode. Possible values include NULLABLE, REQUIRED and + // REPEATED. The default value is NULLABLE. + string mode = 3; + + // Describes the nested schema fields if the type property is set + // to RECORD. + repeated TableFieldSchema fields = 4; +} + +// A request message for +// [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. +message BatchGetEffectiveIamPoliciesRequest { + // Required. Only IAM policies on or below the scope will be returned. + // + // This can only be an organization number (such as "organizations/123"), a + // folder number (such as "folders/123"), a project ID (such as + // "projects/my-project-id"), or a project number (such as "projects/12345"). + // + // To know how to get organization id, visit [here + // ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + // + // To know how to get folder or project id, visit [here + // ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). + string scope = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { child_type: "*" } + ]; + + // Required. The names refer to the [full_resource_names] + // (https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of [searchable asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + // A maximum of 20 resources' effective policies can be retrieved in a batch. + repeated string names = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; +} + +// A response message for +// [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. +message BatchGetEffectiveIamPoliciesResponse { + // The effective IAM policies on one resource. + message EffectiveIamPolicy { + // The IAM policy and its attached resource. + message PolicyInfo { + // The full resource name the + // [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy] + // is directly attached to. + string attached_resource = 1; + + // The IAM policy that's directly attached to the + // [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]. + google.iam.v1.Policy policy = 2; + } + + // The [full_resource_name] + // (https://cloud.google.com/asset-inventory/docs/resource-name-format) + // for which the + // [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies] + // are computed. This is one of the + // [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names] + // the caller provides in the request. + string full_resource_name = 1; + + // The effective policies for the + // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]. + // + // These policies include the policy set on the + // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name] + // and those set on its parents and ancestors up to the + // [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope]. + // Note that these policies are not filtered according to the resource type + // of the + // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]. + // + // These policies are hierarchically ordered by + // [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource] + // starting from + // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name] + // itself to its parents and ancestors, such that policies[i]'s + // [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource] + // is the child of policies[i+1]'s + // [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource], + // if policies[i+1] exists. + repeated PolicyInfo policies = 2; + } + + // The effective policies for a batch of resources. Note that the results + // order is the same as the order of + // [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]. + // When a resource does not have any effective IAM policies, its corresponding + // policy_result will contain empty + // [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]. + repeated EffectiveIamPolicy policy_results = 2; +} + +// Asset content type. +enum ContentType { + // Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0; + + // Resource metadata. + RESOURCE = 1; + + // The actual IAM policy set on a resource. + IAM_POLICY = 2; + + // The Cloud Organization Policy set on an asset. + ORG_POLICY = 4; + + // The Cloud Access context manager Policy set on an asset. + ACCESS_POLICY = 5; + + // The runtime OS Inventory information. + OS_INVENTORY = 6; + + // The related resources. + RELATIONSHIP = 7; +} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto new file mode 100644 index 000000000000..83a23693ae80 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto @@ -0,0 +1,919 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1; + +import "google/api/resource.proto"; +import "google/cloud/orgpolicy/v1/orgpolicy.proto"; +import "google/cloud/osconfig/v1/inventory.proto"; +import "google/iam/v1/policy.proto"; +import "google/identity/accesscontextmanager/v1/access_level.proto"; +import "google/identity/accesscontextmanager/v1/access_policy.proto"; +import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/code.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1"; +option php_namespace = "Google\\Cloud\\Asset\\V1"; + +// An asset in Google Cloud and its temporal metadata, including the time window +// when it was observed and its status during that window. +message TemporalAsset { + // State of prior asset. + enum PriorAssetState { + // prior_asset is not applicable for the current asset. + PRIOR_ASSET_STATE_UNSPECIFIED = 0; + + // prior_asset is populated correctly. + PRESENT = 1; + + // Failed to set prior_asset. + INVALID = 2; + + // Current asset is the first known state. + DOES_NOT_EXIST = 3; + + // prior_asset is a deletion. + DELETED = 4; + } + + // The time window when the asset data and state was observed. + TimeWindow window = 1; + + // Whether the asset has been deleted or not. + bool deleted = 2; + + // An asset in Google Cloud. + Asset asset = 3; + + // State of prior_asset. + PriorAssetState prior_asset_state = 4; + + // Prior copy of the asset. Populated if prior_asset_state is PRESENT. + // Currently this is only set for responses in Real-Time Feed. + Asset prior_asset = 5; +} + +// A time window specified by its `start_time` and `end_time`. +message TimeWindow { + // Start time of the time window (exclusive). + google.protobuf.Timestamp start_time = 1; + + // End time of the time window (inclusive). If not specified, the current + // timestamp is used instead. + google.protobuf.Timestamp end_time = 2; +} + +// An asset in Google Cloud. An asset can be any resource in the Google Cloud +// [resource +// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), +// a resource outside the Google Cloud resource hierarchy (such as Google +// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy), +// or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship). +// See [Supported asset +// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) +// for more information. +message Asset { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + + // The last update timestamp of an asset. update_time is updated when + // create/update/delete operation is performed. + google.protobuf.Timestamp update_time = 11; + + // The full name of the asset. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + // + // See [Resource + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string name = 1; + + // The type of the asset. Example: `compute.googleapis.com/Disk` + // + // See [Supported asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + string asset_type = 2; + + // A representation of the resource. + Resource resource = 3; + + // A representation of the Cloud IAM policy set on a Google Cloud resource. + // There can be a maximum of one Cloud IAM policy set on any given resource. + // In addition, Cloud IAM policies inherit their granted access scope from any + // policies set on parent resources in the resource hierarchy. Therefore, the + // effectively policy is the union of both the policy set on this resource + // and each policy set on all of the resource's ancestry resource levels in + // the hierarchy. See + // [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance) + // for more information. + google.iam.v1.Policy iam_policy = 4; + + // A representation of an [organization + // policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). + // There can be more than one organization policy with different constraints + // set on a given resource. + repeated google.cloud.orgpolicy.v1.Policy org_policy = 6; + + // A representation of an [access + // policy](https://cloud.google.com/access-context-manager/docs/overview#access-policies). + oneof access_context_policy { + // Please also refer to the [access policy user + // guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). + google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + + // Please also refer to the [access level user + // guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). + google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + + // Please also refer to the [service perimeter user + // guide](https://cloud.google.com/vpc-service-controls/docs/overview). + google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = + 9; + } + + // A representation of runtime OS Inventory information. See [this + // topic](https://cloud.google.com/compute/docs/instances/os-inventory-management) + // for more information. + google.cloud.osconfig.v1.Inventory os_inventory = 12; + + // DEPRECATED. This field only presents for the purpose of + // backward-compatibility. The server will never generate responses with this + // field. + // The related assets of the asset of one relationship type. One asset + // only represents one type of relationship. + RelatedAssets related_assets = 13 [deprecated = true]; + + // One related asset of the current asset. + RelatedAsset related_asset = 15; + + // The ancestry path of an asset in Google Cloud [resource + // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path starts + // with the closest ancestor in the hierarchy and ends at root. If the asset + // is a project, folder, or organization, the ancestry path starts from the + // asset itself. + // + // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + repeated string ancestors = 10; +} + +// A representation of a Google Cloud resource. +message Resource { + // The API version. Example: `v1` + string version = 1; + + // The URL of the discovery document containing the resource's JSON schema. + // Example: + // `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` + // + // This value is unspecified for resources that do not have an API based on a + // discovery document, such as Cloud Bigtable. + string discovery_document_uri = 2; + + // The JSON schema name listed in the discovery document. Example: + // `Project` + // + // This value is unspecified for resources that do not have an API based on a + // discovery document, such as Cloud Bigtable. + string discovery_name = 3; + + // The REST URL for accessing the resource. An HTTP `GET` request using this + // URL returns the resource itself. Example: + // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` + // + // This value is unspecified for resources without a REST API. + string resource_url = 4; + + // The full name of the immediate parent of this resource. See + // [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + // + // For Google Cloud assets, this value is the parent resource defined in the + // [Cloud IAM policy + // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + // Example: + // `//cloudresourcemanager.googleapis.com/projects/my_project_123` + // + // For third-party assets, this field may be set differently. + string parent = 5; + + // The content of the resource, in which some sensitive fields are removed + // and may not be present. + google.protobuf.Struct data = 6; + + // The location of the resource in Google Cloud, such as its zone and region. + // For more information, see https://cloud.google.com/about/locations/. + string location = 8; +} + +// DEPRECATED. This message only presents for the purpose of +// backward-compatibility. The server will never populate this message in +// responses. +// The detailed related assets with the `relationship_type`. +message RelatedAssets { + option deprecated = true; + + // The detailed relationship attributes. + RelationshipAttributes relationship_attributes = 1; + + // The peer resources of the relationship. + repeated RelatedAsset assets = 2; +} + +// DEPRECATED. This message only presents for the purpose of +// backward-compatibility. The server will never populate this message in +// responses. +// The relationship attributes which include `type`, `source_resource_type`, +// `target_resource_type` and `action`. +message RelationshipAttributes { + option deprecated = true; + + // The unique identifier of the relationship type. Example: + // `INSTANCE_TO_INSTANCEGROUP` + string type = 4; + + // The source asset type. Example: `compute.googleapis.com/Instance` + string source_resource_type = 1; + + // The target asset type. Example: `compute.googleapis.com/Disk` + string target_resource_type = 2; + + // The detail of the relationship, e.g. `contains`, `attaches` + string action = 3; +} + +// An asset identifier in Google Cloud which contains its name, type and +// ancestors. An asset can be any resource in the Google Cloud [resource +// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), +// a resource outside the Google Cloud resource hierarchy (such as Google +// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). +// See [Supported asset +// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) +// for more information. +message RelatedAsset { + // The full name of the asset. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + // + // See [Resource + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string asset = 1 [(google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Asset" + }]; + + // The type of the asset. Example: `compute.googleapis.com/Disk` + // + // See [Supported asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + string asset_type = 2; + + // The ancestors of an asset in Google Cloud [resource + // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path starts + // with the closest ancestor in the hierarchy and ends at root. + // + // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + repeated string ancestors = 3; + + // The unique identifier of the relationship type. Example: + // `INSTANCE_TO_INSTANCEGROUP` + string relationship_type = 4; +} + +// A result of Resource Search, containing information of a cloud resource. +// Next ID: 29 +message ResourceSearchResult { + // The full resource name of this resource. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Cloud Asset Inventory Resource Name + // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // for more information. + // + // To search against the `name`: + // + // * use a field query. Example: `name:instance1` + // * use a free text query. Example: `instance1` + string name = 1; + + // The type of this resource. Example: `compute.googleapis.com/Disk`. + // + // To search against the `asset_type`: + // + // * specify the `asset_type` field in your search request. + string asset_type = 2; + + // The project that this resource belongs to, in the form of + // projects/{PROJECT_NUMBER}. This field is available when the resource + // belongs to a project. + // + // To search against `project`: + // + // * use a field query. Example: `project:12345` + // * use a free text query. Example: `12345` + // * specify the `scope` field as this project in your search request. + string project = 3; + + // The folder(s) that this resource belongs to, in the form of + // folders/{FOLDER_NUMBER}. This field is available when the resource + // belongs to one or more folders. + // + // To search against `folders`: + // + // * use a field query. Example: `folders:(123 OR 456)` + // * use a free text query. Example: `123` + // * specify the `scope` field as this folder in your search request. + repeated string folders = 17; + + // The organization that this resource belongs to, in the form of + // organizations/{ORGANIZATION_NUMBER}. This field is available when the + // resource belongs to an organization. + // + // To search against `organization`: + // + // * use a field query. Example: `organization:123` + // * use a free text query. Example: `123` + // * specify the `scope` field as this organization in your search request. + string organization = 18; + + // The display name of this resource. This field is available only when the + // resource's Protobuf contains it. + // + // To search against the `display_name`: + // + // * use a field query. Example: `displayName:"My Instance"` + // * use a free text query. Example: `"My Instance"` + string display_name = 4; + + // One or more paragraphs of text description of this resource. Maximum length + // could be up to 1M bytes. This field is available only when the resource's + // Protobuf contains it. + // + // To search against the `description`: + // + // * use a field query. Example: `description:"important instance"` + // * use a free text query. Example: `"important instance"` + string description = 5; + + // Location can be `global`, regional like `us-east1`, or zonal like + // `us-west1-b`. This field is available only when the resource's Protobuf + // contains it. + // + // To search against the `location`: + // + // * use a field query. Example: `location:us-west*` + // * use a free text query. Example: `us-west*` + string location = 6; + + // Labels associated with this resource. See [Labelling and grouping GCP + // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. This field is available only when the resource's + // Protobuf contains it. + // + // To search against the `labels`: + // + // * use a field query: + // - query on any label's key or value. Example: `labels:prod` + // - query by a given label. Example: `labels.env:prod` + // - query by a given label's existence. Example: `labels.env:*` + // * use a free text query. Example: `prod` + map labels = 7; + + // Network tags associated with this resource. Like labels, network tags are a + // type of annotations used to group GCP resources. See [Labelling GCP + // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. This field is available only when the resource's + // Protobuf contains it. + // + // To search against the `network_tags`: + // + // * use a field query. Example: `networkTags:internal` + // * use a free text query. Example: `internal` + repeated string network_tags = 8; + + // The Cloud KMS + // [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) + // name or + // [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) + // name. This field is available only when the resource's Protobuf contains + // it. + // + // To search against the `kms_key`: + // + // * use a field query. Example: `kmsKey:key` + // * use a free text query. Example: `key` + string kms_key = 10; + + // The create timestamp of this resource, at which the resource was created. + // The granularity is in seconds. Timestamp.nanos will always be 0. This field + // is available only when the resource's Protobuf contains it. + // + // To search against `create_time`: + // + // * use a field query. + // - value in seconds since unix epoch. Example: `createTime > 1609459200` + // - value in date string. Example: `createTime > 2021-01-01` + // - value in date-time string (must be quoted). Example: `createTime > + // "2021-01-01T00:00:00"` + google.protobuf.Timestamp create_time = 11; + + // The last update timestamp of this resource, at which the resource was last + // modified or deleted. The granularity is in seconds. Timestamp.nanos will + // always be 0. This field is available only when the resource's Protobuf + // contains it. + // + // To search against `update_time`: + // + // * use a field query. + // - value in seconds since unix epoch. Example: `updateTime < 1609459200` + // - value in date string. Example: `updateTime < 2021-01-01` + // - value in date-time string (must be quoted). Example: `updateTime < + // "2021-01-01T00:00:00"` + google.protobuf.Timestamp update_time = 12; + + // The state of this resource. Different resources types have different state + // definitions that are mapped from various fields of different resource + // types. This field is available only when the resource's Protobuf contains + // it. + // + // Example: + // If the resource is an instance provided by Compute Engine, + // its state will include PROVISIONING, STAGING, RUNNING, STOPPING, + // SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition + // in [API + // Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). + // If the resource is a project provided by Cloud Resource Manager, its state + // will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and + // DELETE_IN_PROGRESS. See `lifecycleState` definition in [API + // Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). + // + // To search against the `state`: + // + // * use a field query. Example: `state:RUNNING` + // * use a free text query. Example: `RUNNING` + string state = 13; + + // The additional searchable attributes of this resource. The attributes may + // vary from one resource type to another. Examples: `projectId` for Project, + // `dnsName` for DNS ManagedZone. This field contains a subset of the resource + // metadata fields that are returned by the List or Get APIs provided by the + // corresponding GCP service (e.g., Compute Engine). see [API references and + // supported searchable + // attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) + // to see which fields are included. + // + // You can search values of these fields through free text search. However, + // you should not consume the field programically as the field names and + // values may change as the GCP service updates to a new incompatible API + // version. + // + // To search against the `additional_attributes`: + // + // * use a free text query to match the attributes values. Example: to search + // `additional_attributes = { dnsName: "foobar" }`, you can issue a query + // `foobar`. + google.protobuf.Struct additional_attributes = 9; + + // The full resource name of this resource's parent, if it has one. + // To search against the `parent_full_resource_name`: + // + // * use a field query. Example: + // `parentFullResourceName:"project-name"` + // * use a free text query. Example: + // `project-name` + string parent_full_resource_name = 19; + + // Versioned resource representations of this resource. This is repeated + // because there could be multiple versions of resource representations during + // version migration. + // + // This `versioned_resources` field is not searchable. Some attributes of the + // resource representations are exposed in `additional_attributes` field, so + // as to allow users to search on them. + repeated VersionedResource versioned_resources = 16; + + // Attached resources of this resource. For example, an OSConfig + // Inventory is an attached resource of a Compute Instance. This field is + // repeated because a resource could have multiple attached resources. + // + // This `attached_resources` field is not searchable. Some attributes + // of the attached resources are exposed in `additional_attributes` field, so + // as to allow users to search on them. + repeated AttachedResource attached_resources = 20; + + // A map of related resources of this resource, keyed by the + // relationship type. A relationship type is in the format of + // {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`, + // `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`. + // See [supported relationship + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). + map relationships = 21; + + // TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}. + // To search against the `tagKeys`: + // + // * use a field query. Example: + // - `tagKeys:"123456789/env*"` + // - `tagKeys="123456789/env"` + // - `tagKeys:"env"` + // + // * use a free text query. Example: + // - `env` + repeated string tag_keys = 23; + + // TagValue namespaced names, in the format of + // {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. + // To search against the `tagValues`: + // + // * use a field query. Example: + // - `tagValues:"env"` + // - `tagValues:"env/prod"` + // - `tagValues:"123456789/env/prod*"` + // - `tagValues="123456789/env/prod"` + // + // * use a free text query. Example: + // - `prod` + repeated string tag_values = 25; + + // TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. + // To search against the `tagValueIds`: + // + // * use a field query. Example: + // - `tagValueIds:"456"` + // - `tagValueIds="tagValues/456"` + // + // * use a free text query. Example: + // - `456` + repeated string tag_value_ids = 26; + + // The type of this resource's immediate parent, if there is one. + // + // To search against the `parent_asset_type`: + // + // * use a field query. Example: + // `parentAssetType:"cloudresourcemanager.googleapis.com/Project"` + // * use a free text query. Example: + // `cloudresourcemanager.googleapis.com/Project` + string parent_asset_type = 103; +} + +// Resource representation as defined by the corresponding service providing the +// resource for a given API version. +message VersionedResource { + // API version of the resource. + // + // Example: + // If the resource is an instance provided by Compute Engine v1 API as defined + // in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, + // version will be "v1". + string version = 1; + + // JSON representation of the resource as defined by the corresponding + // service providing this resource. + // + // Example: + // If the resource is an instance provided by Compute Engine, this field will + // contain the JSON representation of the instance as defined by Compute + // Engine: + // `https://cloud.google.com/compute/docs/reference/rest/v1/instances`. + // + // You can find the resource definition for each supported resource type in + // this table: + // `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types` + google.protobuf.Struct resource = 2; +} + +// Attached resource representation, which is defined by the corresponding +// service provider. It represents an attached resource's payload. +message AttachedResource { + // The type of this attached resource. + // + // Example: `osconfig.googleapis.com/Inventory` + // + // You can find the supported attached asset types of each resource in this + // table: + // `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types` + string asset_type = 1; + + // Versioned resource representations of this attached resource. This is + // repeated because there could be multiple versions of the attached resource + // representations during version migration. + repeated VersionedResource versioned_resources = 3; +} + +// The related resources of the primary resource. +message RelatedResources { + // The detailed related resources of the primary resource. + repeated RelatedResource related_resources = 1; +} + +// The detailed related resource. +message RelatedResource { + // The type of the asset. Example: `compute.googleapis.com/Instance` + string asset_type = 1; + + // The full resource name of the related resource. Example: + // `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123` + string full_resource_name = 2; +} + +// A result of IAM Policy search, containing information of an IAM policy. +message IamPolicySearchResult { + // Explanation about the IAM policy search result. + message Explanation { + // IAM permissions + message Permissions { + // A list of permissions. A sample permission string: `compute.disk.get`. + repeated string permissions = 1; + } + + // The map from roles to their included permissions that match the + // permission query (i.e., a query containing `policy.role.permissions:`). + // Example: if query `policy.role.permissions:compute.disk.get` + // matches a policy binding that contains owner role, the + // matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The + // roles can also be found in the returned `policy` bindings. Note that the + // map is populated only for requests with permission queries. + map matched_permissions = 1; + } + + // The full resource name of the resource associated with this IAM policy. + // Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Cloud Asset Inventory Resource Name + // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // for more information. + // + // To search against the `resource`: + // + // * use a field query. Example: `resource:organizations/123` + string resource = 1; + + // The type of the resource associated with this IAM policy. Example: + // `compute.googleapis.com/Disk`. + // + // To search against the `asset_type`: + // + // * specify the `asset_types` field in your search request. + string asset_type = 5; + + // The project that the associated GCP resource belongs to, in the form of + // projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM + // instance, Cloud Storage bucket), the project field will indicate the + // project that contains the resource. If an IAM policy is set on a folder or + // orgnization, this field will be empty. + // + // To search against the `project`: + // + // * specify the `scope` field as this project in your search request. + string project = 2; + + // The folder(s) that the IAM policy belongs to, in the form of + // folders/{FOLDER_NUMBER}. This field is available when the IAM policy + // belongs to one or more folders. + // + // To search against `folders`: + // + // * use a field query. Example: `folders:(123 OR 456)` + // * use a free text query. Example: `123` + // * specify the `scope` field as this folder in your search request. + repeated string folders = 6; + + // The organization that the IAM policy belongs to, in the form + // of organizations/{ORGANIZATION_NUMBER}. This field is available when the + // IAM policy belongs to an organization. + // + // To search against `organization`: + // + // * use a field query. Example: `organization:123` + // * use a free text query. Example: `123` + // * specify the `scope` field as this organization in your search request. + string organization = 7; + + // The IAM policy directly set on the given resource. Note that the original + // IAM policy can contain multiple bindings. This only contains the bindings + // that match the given query. For queries that don't contain a constrain on + // policies (e.g., an empty query), this contains all the bindings. + // + // To search against the `policy` bindings: + // + // * use a field query: + // - query by the policy contained members. Example: + // `policy:amy@gmail.com` + // - query by the policy contained roles. Example: + // `policy:roles/compute.admin` + // - query by the policy contained roles' included permissions. Example: + // `policy.role.permissions:compute.instances.create` + google.iam.v1.Policy policy = 3; + + // Explanation about the IAM policy search result. It contains additional + // information to explain why the search result matches the query. + Explanation explanation = 4; +} + +// Represents the detailed state of an entity under analysis, such as a +// resource, an identity or an access. +message IamPolicyAnalysisState { + // The Google standard error code that best describes the state. + // For example: + // - OK means the analysis on this entity has been successfully finished; + // - PERMISSION_DENIED means an access denied error is encountered; + // - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started + // in time; + google.rpc.Code code = 1; + + // The human-readable description of the cause of failure. + string cause = 2; +} + +// The Condition evaluation. +message ConditionEvaluation { + // Value of this expression. + enum EvaluationValue { + // Reserved for future use. + EVALUATION_VALUE_UNSPECIFIED = 0; + + // The evaluation result is `true`. + TRUE = 1; + + // The evaluation result is `false`. + FALSE = 2; + + // The evaluation result is `conditional` when the condition expression + // contains variables that are either missing input values or have not been + // supported by Analyzer yet. + CONDITIONAL = 3; + } + + // The evaluation result. + EvaluationValue evaluation_value = 1; +} + +// IAM Policy analysis result, consisting of one IAM policy binding and derived +// access control lists. +message IamPolicyAnalysisResult { + // A Google Cloud resource under analysis. + message Resource { + // The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + string full_resource_name = 1; + + // The analysis state of this resource. + IamPolicyAnalysisState analysis_state = 2; + } + + // An IAM role or permission under analysis. + message Access { + oneof oneof_access { + // The role. + string role = 1; + + // The permission. + string permission = 2; + } + + // The analysis state of this access. + IamPolicyAnalysisState analysis_state = 3; + } + + // An identity under analysis. + message Identity { + // The identity name in any form of members appear in + // [IAM policy + // binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such + // as: + // - user:foo@google.com + // - group:group1@google.com + // - serviceAccount:s1@prj1.iam.gserviceaccount.com + // - projectOwner:some_project_id + // - domain:google.com + // - allUsers + // - etc. + string name = 1; + + // The analysis state of this identity. + IamPolicyAnalysisState analysis_state = 2; + } + + // A directional edge. + message Edge { + // The source node of the edge. For example, it could be a full resource + // name for a resource node or an email of an identity. + string source_node = 1; + + // The target node of the edge. For example, it could be a full resource + // name for a resource node or an email of an identity. + string target_node = 2; + } + + // An access control list, derived from the above IAM policy binding, which + // contains a set of resources and accesses. May include one + // item from each set to compose an access control entry. + // + // NOTICE that there could be multiple access control lists for one IAM policy + // binding. The access control lists are created based on resource and access + // combinations. + // + // For example, assume we have the following cases in one IAM policy binding: + // - Permission P1 and P2 apply to resource R1 and R2; + // - Permission P3 applies to resource R2 and R3; + // + // This will result in the following access control lists: + // - AccessControlList 1: [R1, R2], [P1, P2] + // - AccessControlList 2: [R2, R3], [P3] + message AccessControlList { + // The resources that match one of the following conditions: + // - The resource_selector, if it is specified in request; + // - Otherwise, resources reachable from the policy attached resource. + repeated Resource resources = 1; + + // The accesses that match one of the following conditions: + // - The access_selector, if it is specified in request; + // - Otherwise, access specifiers reachable from the policy binding's role. + repeated Access accesses = 2; + + // Resource edges of the graph starting from the policy attached + // resource to any descendant resources. The + // [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] + // contains the full resource name of a parent resource and + // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] + // contains the full resource name of a child resource. This field is + // present only if the output_resource_edges option is enabled in request. + repeated Edge resource_edges = 3; + + // Condition evaluation for this AccessControlList, if there is a condition + // defined in the above IAM policy binding. + ConditionEvaluation condition_evaluation = 4; + } + + // The identities and group edges. + message IdentityList { + // Only the identities that match one of the following conditions will be + // presented: + // - The identity_selector, if it is specified in request; + // - Otherwise, identities reachable from the policy binding's members. + repeated Identity identities = 1; + + // Group identity edges of the graph starting from the binding's + // group members to any node of the + // [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. + // The + // [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] + // contains a group, such as `group:parent@google.com`. The + // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] + // contains a member of the group, such as `group:child@google.com` or + // `user:foo@google.com`. This field is present only if the + // output_group_edges option is enabled in request. + repeated Edge group_edges = 2; + } + + // The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the resource to which the + // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] + // policy attaches. + string attached_resource_full_name = 1; + + // The Cloud IAM policy binding under analysis. + google.iam.v1.Binding iam_binding = 2; + + // The access control lists derived from the + // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] + // that match or potentially match resource and access selectors specified in + // the request. + repeated AccessControlList access_control_lists = 3; + + // The identity list derived from members of the + // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] + // that match or potentially match identity selector specified in the request. + IdentityList identity_list = 4; + + // Represents whether all analyses on the + // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] + // have successfully finished. + bool fully_explored = 5; +} diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java new file mode 100644 index 000000000000..397a1551cee2 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_analyzeiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; +import com.google.protobuf.Duration; + +public class AsyncAnalyzeIamPolicy { + + public static void main(String[] args) throws Exception { + asyncAnalyzeIamPolicy(); + } + + public static void asyncAnalyzeIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setExecutionTimeout(Duration.newBuilder().build()) + .build(); + ApiFuture future = + assetServiceClient.analyzeIamPolicyCallable().futureCall(request); + // Do something. + AnalyzeIamPolicyResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_analyzeiampolicy_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java new file mode 100644 index 000000000000..1d462b10839e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_analyzeiampolicy_sync] +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; +import com.google.protobuf.Duration; + +public class SyncAnalyzeIamPolicy { + + public static void main(String[] args) throws Exception { + syncAnalyzeIamPolicy(); + } + + public static void syncAnalyzeIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setExecutionTimeout(Duration.newBuilder().build()) + .build(); + AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_analyzeiampolicy_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java new file mode 100644 index 000000000000..a5178fab9a4d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig; +import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; +import com.google.longrunning.Operation; + +public class AsyncAnalyzeIamPolicyLongrunning { + + public static void main(String[] args) throws Exception { + asyncAnalyzeIamPolicyLongrunning(); + } + + public static void asyncAnalyzeIamPolicyLongrunning() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) + .build(); + ApiFuture future = + assetServiceClient.analyzeIamPolicyLongrunningCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java new file mode 100644 index 000000000000..4f2d518a7c91 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig; +import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; + +public class AsyncAnalyzeIamPolicyLongrunningLRO { + + public static void main(String[] args) throws Exception { + asyncAnalyzeIamPolicyLongrunningLRO(); + } + + public static void asyncAnalyzeIamPolicyLongrunningLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) + .build(); + OperationFuture + future = + assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request); + // Do something. + AnalyzeIamPolicyLongrunningResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_lro_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java new file mode 100644 index 000000000000..f14d16f4d4e2 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_sync] +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig; +import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; + +public class SyncAnalyzeIamPolicyLongrunning { + + public static void main(String[] args) throws Exception { + syncAnalyzeIamPolicyLongrunning(); + } + + public static void syncAnalyzeIamPolicyLongrunning() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) + .setSavedAnalysisQuery("savedAnalysisQuery376058885") + .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) + .build(); + AnalyzeIamPolicyLongrunningResponse response = + assetServiceClient.analyzeIamPolicyLongrunningAsync(request).get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java new file mode 100644 index 000000000000..0bccc2c63bbd --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_analyzemove_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AnalyzeMoveRequest; +import com.google.cloud.asset.v1.AnalyzeMoveResponse; +import com.google.cloud.asset.v1.AssetServiceClient; + +public class AsyncAnalyzeMove { + + public static void main(String[] args) throws Exception { + asyncAnalyzeMove(); + } + + public static void asyncAnalyzeMove() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + AnalyzeMoveRequest request = + AnalyzeMoveRequest.newBuilder() + .setResource("resource-341064690") + .setDestinationParent("destinationParent-1733659048") + .build(); + ApiFuture future = + assetServiceClient.analyzeMoveCallable().futureCall(request); + // Do something. + AnalyzeMoveResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_analyzemove_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java new file mode 100644 index 000000000000..dd975540ee7a --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_analyzemove_sync] +import com.google.cloud.asset.v1.AnalyzeMoveRequest; +import com.google.cloud.asset.v1.AnalyzeMoveResponse; +import com.google.cloud.asset.v1.AssetServiceClient; + +public class SyncAnalyzeMove { + + public static void main(String[] args) throws Exception { + syncAnalyzeMove(); + } + + public static void syncAnalyzeMove() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + AnalyzeMoveRequest request = + AnalyzeMoveRequest.newBuilder() + .setResource("resource-341064690") + .setDestinationParent("destinationParent-1733659048") + .build(); + AnalyzeMoveResponse response = assetServiceClient.analyzeMove(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_analyzemove_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java new file mode 100644 index 000000000000..5b18158c3523 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_batchgetassetshistory_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.TimeWindow; +import java.util.ArrayList; + +public class AsyncBatchGetAssetsHistory { + + public static void main(String[] args) throws Exception { + asyncBatchGetAssetsHistory(); + } + + public static void asyncBatchGetAssetsHistory() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .addAllAssetNames(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + ApiFuture future = + assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request); + // Do something. + BatchGetAssetsHistoryResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_batchgetassetshistory_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java new file mode 100644 index 000000000000..c0e6a6c4ae89 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_batchgetassetshistory_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; +import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.TimeWindow; +import java.util.ArrayList; + +public class SyncBatchGetAssetsHistory { + + public static void main(String[] args) throws Exception { + syncBatchGetAssetsHistory(); + } + + public static void syncBatchGetAssetsHistory() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + BatchGetAssetsHistoryRequest request = + BatchGetAssetsHistoryRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .addAllAssetNames(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_batchgetassetshistory_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java new file mode 100644 index 000000000000..c874fbf6ec0d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; +import com.google.cloud.asset.v1.FolderName; +import java.util.ArrayList; + +public class AsyncBatchGetEffectiveIamPolicies { + + public static void main(String[] args) throws Exception { + asyncBatchGetEffectiveIamPolicies(); + } + + public static void asyncBatchGetEffectiveIamPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + BatchGetEffectiveIamPoliciesRequest request = + BatchGetEffectiveIamPoliciesRequest.newBuilder() + .setScope(FolderName.of("[FOLDER]").toString()) + .addAllNames(new ArrayList()) + .build(); + ApiFuture future = + assetServiceClient.batchGetEffectiveIamPoliciesCallable().futureCall(request); + // Do something. + BatchGetEffectiveIamPoliciesResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java new file mode 100644 index 000000000000..5033bdb707b5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; +import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; +import com.google.cloud.asset.v1.FolderName; +import java.util.ArrayList; + +public class SyncBatchGetEffectiveIamPolicies { + + public static void main(String[] args) throws Exception { + syncBatchGetEffectiveIamPolicies(); + } + + public static void syncBatchGetEffectiveIamPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + BatchGetEffectiveIamPoliciesRequest request = + BatchGetEffectiveIamPoliciesRequest.newBuilder() + .setScope(FolderName.of("[FOLDER]").toString()) + .addAllNames(new ArrayList()) + .build(); + BatchGetEffectiveIamPoliciesResponse response = + assetServiceClient.batchGetEffectiveIamPolicies(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..913a1c1c0dbf --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.AssetServiceSettings; +import com.google.cloud.asset.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..7b65f1da80f1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.AssetServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..fa2c2a4b4e7e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_create_setendpoint_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.AssetServiceSettings; +import com.google.cloud.asset.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java new file mode 100644 index 000000000000..060c56a7646c --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createfeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.CreateFeedRequest; +import com.google.cloud.asset.v1.Feed; + +public class AsyncCreateFeed { + + public static void main(String[] args) throws Exception { + asyncCreateFeed(); + } + + public static void asyncCreateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + CreateFeedRequest request = + CreateFeedRequest.newBuilder() + .setParent("parent-995424086") + .setFeedId("feedId-1278410919") + .setFeed(Feed.newBuilder().build()) + .build(); + ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request); + // Do something. + Feed response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_createfeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java new file mode 100644 index 000000000000..fea0a079f661 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createfeed_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.CreateFeedRequest; +import com.google.cloud.asset.v1.Feed; + +public class SyncCreateFeed { + + public static void main(String[] args) throws Exception { + syncCreateFeed(); + } + + public static void syncCreateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + CreateFeedRequest request = + CreateFeedRequest.newBuilder() + .setParent("parent-995424086") + .setFeedId("feedId-1278410919") + .setFeed(Feed.newBuilder().build()) + .build(); + Feed response = assetServiceClient.createFeed(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java new file mode 100644 index 000000000000..66eddd4c2740 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createfeed_string_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; + +public class SyncCreateFeedString { + + public static void main(String[] args) throws Exception { + syncCreateFeedString(); + } + + public static void syncCreateFeedString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String parent = "parent-995424086"; + Feed response = assetServiceClient.createFeed(parent); + } + } +} +// [END asset_v1_generated_assetserviceclient_createfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java new file mode 100644 index 000000000000..f908b386a7ca --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createsavedquery_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.CreateSavedQueryRequest; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class AsyncCreateSavedQuery { + + public static void main(String[] args) throws Exception { + asyncCreateSavedQuery(); + } + + public static void asyncCreateSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + CreateSavedQueryRequest request = + CreateSavedQueryRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setSavedQuery(SavedQuery.newBuilder().build()) + .setSavedQueryId("savedQueryId378086268") + .build(); + ApiFuture future = + assetServiceClient.createSavedQueryCallable().futureCall(request); + // Do something. + SavedQuery response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_createsavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java new file mode 100644 index 000000000000..3404aaf6f5db --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createsavedquery_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.CreateSavedQueryRequest; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncCreateSavedQuery { + + public static void main(String[] args) throws Exception { + syncCreateSavedQuery(); + } + + public static void syncCreateSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + CreateSavedQueryRequest request = + CreateSavedQueryRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setSavedQuery(SavedQuery.newBuilder().build()) + .setSavedQueryId("savedQueryId378086268") + .build(); + SavedQuery response = assetServiceClient.createSavedQuery(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_createsavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java new file mode 100644 index 000000000000..bb92329549b8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createsavedquery_foldernamesavedquerystring_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncCreateSavedQueryFoldernameSavedqueryString { + + public static void main(String[] args) throws Exception { + syncCreateSavedQueryFoldernameSavedqueryString(); + } + + public static void syncCreateSavedQueryFoldernameSavedqueryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + FolderName parent = FolderName.of("[FOLDER]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); + } + } +} +// [END asset_v1_generated_assetserviceclient_createsavedquery_foldernamesavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java new file mode 100644 index 000000000000..d14793b2a511 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createsavedquery_organizationnamesavedquerystring_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.OrganizationName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncCreateSavedQueryOrganizationnameSavedqueryString { + + public static void main(String[] args) throws Exception { + syncCreateSavedQueryOrganizationnameSavedqueryString(); + } + + public static void syncCreateSavedQueryOrganizationnameSavedqueryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); + } + } +} +// [END asset_v1_generated_assetserviceclient_createsavedquery_organizationnamesavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java new file mode 100644 index 000000000000..8855942d615e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createsavedquery_projectnamesavedquerystring_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncCreateSavedQueryProjectnameSavedqueryString { + + public static void main(String[] args) throws Exception { + syncCreateSavedQueryProjectnameSavedqueryString(); + } + + public static void syncCreateSavedQueryProjectnameSavedqueryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); + } + } +} +// [END asset_v1_generated_assetserviceclient_createsavedquery_projectnamesavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java new file mode 100644 index 000000000000..b0e3e8d7af59 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_createsavedquery_stringsavedquerystring_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncCreateSavedQueryStringSavedqueryString { + + public static void main(String[] args) throws Exception { + syncCreateSavedQueryStringSavedqueryString(); + } + + public static void syncCreateSavedQueryStringSavedqueryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + String savedQueryId = "savedQueryId378086268"; + SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); + } + } +} +// [END asset_v1_generated_assetserviceclient_createsavedquery_stringsavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java new file mode 100644 index 000000000000..cc5bdb96e8e1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletefeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.DeleteFeedRequest; +import com.google.cloud.asset.v1.FeedName; +import com.google.protobuf.Empty; + +public class AsyncDeleteFeed { + + public static void main(String[] args) throws Exception { + asyncDeleteFeed(); + } + + public static void asyncDeleteFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + DeleteFeedRequest request = + DeleteFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletefeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java new file mode 100644 index 000000000000..1786f511b92c --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletefeed_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.DeleteFeedRequest; +import com.google.cloud.asset.v1.FeedName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeed { + + public static void main(String[] args) throws Exception { + syncDeleteFeed(); + } + + public static void syncDeleteFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + DeleteFeedRequest request = + DeleteFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + assetServiceClient.deleteFeed(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletefeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java new file mode 100644 index 000000000000..b16984b667f5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletefeed_feedname_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FeedName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeedFeedname { + + public static void main(String[] args) throws Exception { + syncDeleteFeedFeedname(); + } + + public static void syncDeleteFeedFeedname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + assetServiceClient.deleteFeed(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletefeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java new file mode 100644 index 000000000000..0ec0024d6556 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletefeed_string_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FeedName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeedString { + + public static void main(String[] args) throws Exception { + syncDeleteFeedString(); + } + + public static void syncDeleteFeedString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); + assetServiceClient.deleteFeed(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletefeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java new file mode 100644 index 000000000000..745652bd24f3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletesavedquery_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.DeleteSavedQueryRequest; +import com.google.cloud.asset.v1.SavedQueryName; +import com.google.protobuf.Empty; + +public class AsyncDeleteSavedQuery { + + public static void main(String[] args) throws Exception { + asyncDeleteSavedQuery(); + } + + public static void asyncDeleteSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + DeleteSavedQueryRequest request = + DeleteSavedQueryRequest.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .build(); + ApiFuture future = assetServiceClient.deleteSavedQueryCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletesavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java new file mode 100644 index 000000000000..f188c5067a50 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletesavedquery_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.DeleteSavedQueryRequest; +import com.google.cloud.asset.v1.SavedQueryName; +import com.google.protobuf.Empty; + +public class SyncDeleteSavedQuery { + + public static void main(String[] args) throws Exception { + syncDeleteSavedQuery(); + } + + public static void syncDeleteSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + DeleteSavedQueryRequest request = + DeleteSavedQueryRequest.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .build(); + assetServiceClient.deleteSavedQuery(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletesavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java new file mode 100644 index 000000000000..8bccb08a7146 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletesavedquery_savedqueryname_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.SavedQueryName; +import com.google.protobuf.Empty; + +public class SyncDeleteSavedQuerySavedqueryname { + + public static void main(String[] args) throws Exception { + syncDeleteSavedQuerySavedqueryname(); + } + + public static void syncDeleteSavedQuerySavedqueryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + assetServiceClient.deleteSavedQuery(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletesavedquery_savedqueryname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java new file mode 100644 index 000000000000..a0496113a9e7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_deletesavedquery_string_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.SavedQueryName; +import com.google.protobuf.Empty; + +public class SyncDeleteSavedQueryString { + + public static void main(String[] args) throws Exception { + syncDeleteSavedQueryString(); + } + + public static void syncDeleteSavedQueryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString(); + assetServiceClient.deleteSavedQuery(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_deletesavedquery_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java new file mode 100644 index 000000000000..6e4462175c47 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_exportassets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.ExportAssetsRequest; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.OutputConfig; +import com.google.longrunning.Operation; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class AsyncExportAssets { + + public static void main(String[] args) throws Exception { + asyncExportAssets(); + } + + public static void asyncExportAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + ApiFuture future = assetServiceClient.exportAssetsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_exportassets_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java new file mode 100644 index 000000000000..44c5380a9a53 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_exportassets_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.ExportAssetsRequest; +import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.OutputConfig; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class AsyncExportAssetsLRO { + + public static void main(String[] args) throws Exception { + asyncExportAssetsLRO(); + } + + public static void asyncExportAssetsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + OperationFuture future = + assetServiceClient.exportAssetsOperationCallable().futureCall(request); + // Do something. + ExportAssetsResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_exportassets_lro_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java new file mode 100644 index 000000000000..0d5399334f1b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_exportassets_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.ExportAssetsRequest; +import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.OutputConfig; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class SyncExportAssets { + + public static void main(String[] args) throws Exception { + syncExportAssets(); + } + + public static void syncExportAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_exportassets_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java new file mode 100644 index 000000000000..40de97de9e3f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getfeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.FeedName; +import com.google.cloud.asset.v1.GetFeedRequest; + +public class AsyncGetFeed { + + public static void main(String[] args) throws Exception { + asyncGetFeed(); + } + + public static void asyncGetFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + GetFeedRequest request = + GetFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request); + // Do something. + Feed response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_getfeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java new file mode 100644 index 000000000000..0490c1c1eaf1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getfeed_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.FeedName; +import com.google.cloud.asset.v1.GetFeedRequest; + +public class SyncGetFeed { + + public static void main(String[] args) throws Exception { + syncGetFeed(); + } + + public static void syncGetFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + GetFeedRequest request = + GetFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + Feed response = assetServiceClient.getFeed(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_getfeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java new file mode 100644 index 000000000000..f697ff3f5b7f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getfeed_feedname_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.FeedName; + +public class SyncGetFeedFeedname { + + public static void main(String[] args) throws Exception { + syncGetFeedFeedname(); + } + + public static void syncGetFeedFeedname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + Feed response = assetServiceClient.getFeed(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_getfeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java new file mode 100644 index 000000000000..9e750f6c0872 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getfeed_string_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.FeedName; + +public class SyncGetFeedString { + + public static void main(String[] args) throws Exception { + syncGetFeedString(); + } + + public static void syncGetFeedString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); + Feed response = assetServiceClient.getFeed(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_getfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java new file mode 100644 index 000000000000..6296e79d1096 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getsavedquery_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.GetSavedQueryRequest; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SavedQueryName; + +public class AsyncGetSavedQuery { + + public static void main(String[] args) throws Exception { + asyncGetSavedQuery(); + } + + public static void asyncGetSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + GetSavedQueryRequest request = + GetSavedQueryRequest.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .build(); + ApiFuture future = assetServiceClient.getSavedQueryCallable().futureCall(request); + // Do something. + SavedQuery response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_getsavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java new file mode 100644 index 000000000000..fbf5f0a533bf --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getsavedquery_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.GetSavedQueryRequest; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SavedQueryName; + +public class SyncGetSavedQuery { + + public static void main(String[] args) throws Exception { + syncGetSavedQuery(); + } + + public static void syncGetSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + GetSavedQueryRequest request = + GetSavedQueryRequest.newBuilder() + .setName( + SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) + .build(); + SavedQuery response = assetServiceClient.getSavedQuery(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_getsavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java new file mode 100644 index 000000000000..eeb827c8a0f6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getsavedquery_savedqueryname_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SavedQueryName; + +public class SyncGetSavedQuerySavedqueryname { + + public static void main(String[] args) throws Exception { + syncGetSavedQuerySavedqueryname(); + } + + public static void syncGetSavedQuerySavedqueryname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); + SavedQuery response = assetServiceClient.getSavedQuery(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_getsavedquery_savedqueryname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java new file mode 100644 index 000000000000..d9353b6b9539 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_getsavedquery_string_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.SavedQueryName; + +public class SyncGetSavedQueryString { + + public static void main(String[] args) throws Exception { + syncGetSavedQueryString(); + } + + public static void syncGetSavedQueryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString(); + SavedQuery response = assetServiceClient.getSavedQuery(name); + } + } +} +// [END asset_v1_generated_assetserviceclient_getsavedquery_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java new file mode 100644 index 000000000000..1d8d0b60b6eb --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listassets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.Asset; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class AsyncListAssets { + + public static void main(String[] args) throws Exception { + asyncListAssets(); + } + + public static void asyncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllRelationshipTypes(new ArrayList()) + .build(); + ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request); + // Do something. + for (Asset element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listassets_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java new file mode 100644 index 000000000000..01e1d69ebfdf --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listassets_paged_async] +import com.google.cloud.asset.v1.Asset; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; +import com.google.common.base.Strings; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class AsyncListAssetsPaged { + + public static void main(String[] args) throws Exception { + asyncListAssetsPaged(); + } + + public static void asyncListAssetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllRelationshipTypes(new ArrayList()) + .build(); + while (true) { + ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request); + for (Asset element : response.getAssetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listassets_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java new file mode 100644 index 000000000000..e52d29c39485 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listassets_sync] +import com.google.cloud.asset.v1.Asset; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ContentType; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class SyncListAssets { + + public static void main(String[] args) throws Exception { + syncListAssets(); + } + + public static void syncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllRelationshipTypes(new ArrayList()) + .build(); + for (Asset element : assetServiceClient.listAssets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java new file mode 100644 index 000000000000..2c1309b320de --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listassets_resourcename_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.asset.v1.Asset; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FolderName; + +public class SyncListAssetsResourcename { + + public static void main(String[] args) throws Exception { + syncListAssetsResourcename(); + } + + public static void syncListAssetsResourcename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ResourceName parent = FolderName.of("[FOLDER]"); + for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listassets_resourcename_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java new file mode 100644 index 000000000000..ddc3aa7ea584 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listassets_string_sync] +import com.google.cloud.asset.v1.Asset; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FeedName; + +public class SyncListAssetsString { + + public static void main(String[] args) throws Exception { + syncListAssetsString(); + } + + public static void syncListAssetsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); + for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listassets_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java new file mode 100644 index 000000000000..3e47fc647d16 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listfeeds_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ListFeedsRequest; +import com.google.cloud.asset.v1.ListFeedsResponse; + +public class AsyncListFeeds { + + public static void main(String[] args) throws Exception { + asyncListFeeds(); + } + + public static void asyncListFeeds() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListFeedsRequest request = + ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); + ApiFuture future = + assetServiceClient.listFeedsCallable().futureCall(request); + // Do something. + ListFeedsResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_listfeeds_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java new file mode 100644 index 000000000000..8bff72705dc6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listfeeds_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ListFeedsRequest; +import com.google.cloud.asset.v1.ListFeedsResponse; + +public class SyncListFeeds { + + public static void main(String[] args) throws Exception { + syncListFeeds(); + } + + public static void syncListFeeds() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListFeedsRequest request = + ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); + ListFeedsResponse response = assetServiceClient.listFeeds(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_listfeeds_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java new file mode 100644 index 000000000000..3d6a842eeb4f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listfeeds_string_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ListFeedsResponse; + +public class SyncListFeedsString { + + public static void main(String[] args) throws Exception { + syncListFeedsString(); + } + + public static void syncListFeedsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String parent = "parent-995424086"; + ListFeedsResponse response = assetServiceClient.listFeeds(parent); + } + } +} +// [END asset_v1_generated_assetserviceclient_listfeeds_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java new file mode 100644 index 000000000000..9e178c164c47 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listsavedqueries_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ListSavedQueriesRequest; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class AsyncListSavedQueries { + + public static void main(String[] args) throws Exception { + asyncListSavedQueries(); + } + + public static void asyncListSavedQueries() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListSavedQueriesRequest request = + ListSavedQueriesRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + assetServiceClient.listSavedQueriesPagedCallable().futureCall(request); + // Do something. + for (SavedQuery element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listsavedqueries_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java new file mode 100644 index 000000000000..303a499805d4 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listsavedqueries_paged_async] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ListSavedQueriesRequest; +import com.google.cloud.asset.v1.ListSavedQueriesResponse; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.common.base.Strings; + +public class AsyncListSavedQueriesPaged { + + public static void main(String[] args) throws Exception { + asyncListSavedQueriesPaged(); + } + + public static void asyncListSavedQueriesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListSavedQueriesRequest request = + ListSavedQueriesRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListSavedQueriesResponse response = + assetServiceClient.listSavedQueriesCallable().call(request); + for (SavedQuery element : response.getSavedQueriesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listsavedqueries_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java new file mode 100644 index 000000000000..d97d4ec355b8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listsavedqueries_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ListSavedQueriesRequest; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncListSavedQueries { + + public static void main(String[] args) throws Exception { + syncListSavedQueries(); + } + + public static void syncListSavedQueries() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListSavedQueriesRequest request = + ListSavedQueriesRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (SavedQuery element : assetServiceClient.listSavedQueries(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listsavedqueries_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java new file mode 100644 index 000000000000..8f8a758d7d3b --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listsavedqueries_foldername_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncListSavedQueriesFoldername { + + public static void main(String[] args) throws Exception { + syncListSavedQueriesFoldername(); + } + + public static void syncListSavedQueriesFoldername() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + FolderName parent = FolderName.of("[FOLDER]"); + for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listsavedqueries_foldername_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java new file mode 100644 index 000000000000..6a6eda31445d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listsavedqueries_organizationname_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.OrganizationName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncListSavedQueriesOrganizationname { + + public static void main(String[] args) throws Exception { + syncListSavedQueriesOrganizationname(); + } + + public static void syncListSavedQueriesOrganizationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); + for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listsavedqueries_organizationname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java new file mode 100644 index 000000000000..226ef455bc14 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listsavedqueries_projectname_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncListSavedQueriesProjectname { + + public static void main(String[] args) throws Exception { + syncListSavedQueriesProjectname(); + } + + public static void syncListSavedQueriesProjectname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listsavedqueries_projectname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java new file mode 100644 index 000000000000..66a80549544c --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_listsavedqueries_string_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ProjectName; +import com.google.cloud.asset.v1.SavedQuery; + +public class SyncListSavedQueriesString { + + public static void main(String[] args) throws Exception { + syncListSavedQueriesString(); + } + + public static void syncListSavedQueriesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_listsavedqueries_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java new file mode 100644 index 000000000000..64e9cd858053 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java @@ -0,0 +1,56 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_queryassets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.QueryAssetsOutputConfig; +import com.google.cloud.asset.v1.QueryAssetsRequest; +import com.google.cloud.asset.v1.QueryAssetsResponse; +import com.google.protobuf.Duration; + +public class AsyncQueryAssets { + + public static void main(String[] args) throws Exception { + asyncQueryAssets(); + } + + public static void asyncQueryAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + QueryAssetsRequest request = + QueryAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setTimeout(Duration.newBuilder().build()) + .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) + .build(); + ApiFuture future = + assetServiceClient.queryAssetsCallable().futureCall(request); + // Do something. + QueryAssetsResponse response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_queryassets_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java new file mode 100644 index 000000000000..fc591f210470 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_queryassets_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.FolderName; +import com.google.cloud.asset.v1.QueryAssetsOutputConfig; +import com.google.cloud.asset.v1.QueryAssetsRequest; +import com.google.cloud.asset.v1.QueryAssetsResponse; +import com.google.protobuf.Duration; + +public class SyncQueryAssets { + + public static void main(String[] args) throws Exception { + syncQueryAssets(); + } + + public static void syncQueryAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + QueryAssetsRequest request = + QueryAssetsRequest.newBuilder() + .setParent(FolderName.of("[FOLDER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setTimeout(Duration.newBuilder().build()) + .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) + .build(); + QueryAssetsResponse response = assetServiceClient.queryAssets(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_queryassets_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java new file mode 100644 index 000000000000..7e7a38c5309f --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchalliampolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicySearchResult; +import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; +import java.util.ArrayList; + +public class AsyncSearchAllIamPolicies { + + public static void main(String[] args) throws Exception { + asyncSearchAllIamPolicies(); + } + + public static void asyncSearchAllIamPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllAssetTypes(new ArrayList()) + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request); + // Do something. + for (IamPolicySearchResult element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchalliampolicies_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java new file mode 100644 index 000000000000..4de6b3f53ab8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchalliampolicies_paged_async] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicySearchResult; +import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; +import com.google.common.base.Strings; +import java.util.ArrayList; + +public class AsyncSearchAllIamPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncSearchAllIamPoliciesPaged(); + } + + public static void asyncSearchAllIamPoliciesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllAssetTypes(new ArrayList()) + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + SearchAllIamPoliciesResponse response = + assetServiceClient.searchAllIamPoliciesCallable().call(request); + for (IamPolicySearchResult element : response.getResultsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchalliampolicies_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java new file mode 100644 index 000000000000..50ee2ef294d7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchalliampolicies_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicySearchResult; +import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; +import java.util.ArrayList; + +public class SyncSearchAllIamPolicies { + + public static void main(String[] args) throws Exception { + syncSearchAllIamPolicies(); + } + + public static void syncSearchAllIamPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllAssetTypes(new ArrayList()) + .setOrderBy("orderBy-1207110587") + .build(); + for (IamPolicySearchResult element : + assetServiceClient.searchAllIamPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchalliampolicies_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java new file mode 100644 index 000000000000..2704f9be42b8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.IamPolicySearchResult; + +public class SyncSearchAllIamPoliciesStringString { + + public static void main(String[] args) throws Exception { + syncSearchAllIamPoliciesStringString(); + } + + public static void syncSearchAllIamPoliciesStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String scope = "scope109264468"; + String query = "query107944136"; + for (IamPolicySearchResult element : + assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java new file mode 100644 index 000000000000..5d8a22c23421 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchallresources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ResourceSearchResult; +import com.google.cloud.asset.v1.SearchAllResourcesRequest; +import com.google.protobuf.FieldMask; +import java.util.ArrayList; + +public class AsyncSearchAllResources { + + public static void main(String[] args) throws Exception { + asyncSearchAllResources(); + } + + public static void asyncSearchAllResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .addAllAssetTypes(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + assetServiceClient.searchAllResourcesPagedCallable().futureCall(request); + // Do something. + for (ResourceSearchResult element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchallresources_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java new file mode 100644 index 000000000000..c025ac210b23 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchallresources_paged_async] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ResourceSearchResult; +import com.google.cloud.asset.v1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1.SearchAllResourcesResponse; +import com.google.common.base.Strings; +import com.google.protobuf.FieldMask; +import java.util.ArrayList; + +public class AsyncSearchAllResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncSearchAllResourcesPaged(); + } + + public static void asyncSearchAllResourcesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .addAllAssetTypes(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + while (true) { + SearchAllResourcesResponse response = + assetServiceClient.searchAllResourcesCallable().call(request); + for (ResourceSearchResult element : response.getResultsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchallresources_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java new file mode 100644 index 000000000000..5aeb9954d79d --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java @@ -0,0 +1,56 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchallresources_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ResourceSearchResult; +import com.google.cloud.asset.v1.SearchAllResourcesRequest; +import com.google.protobuf.FieldMask; +import java.util.ArrayList; + +public class SyncSearchAllResources { + + public static void main(String[] args) throws Exception { + syncSearchAllResources(); + } + + public static void syncSearchAllResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .addAllAssetTypes(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .setReadMask(FieldMask.newBuilder().build()) + .build(); + for (ResourceSearchResult element : + assetServiceClient.searchAllResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java new file mode 100644 index 000000000000..7e87019e5db8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.ResourceSearchResult; +import java.util.ArrayList; +import java.util.List; + +public class SyncSearchAllResourcesStringStringListstring { + + public static void main(String[] args) throws Exception { + syncSearchAllResourcesStringStringListstring(); + } + + public static void syncSearchAllResourcesStringStringListstring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String scope = "scope109264468"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + for (ResourceSearchResult element : + assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java new file mode 100644 index 000000000000..4239ca9a6609 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_updatefeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.UpdateFeedRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeed { + + public static void main(String[] args) throws Exception { + asyncUpdateFeed(); + } + + public static void asyncUpdateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + UpdateFeedRequest request = + UpdateFeedRequest.newBuilder() + .setFeed(Feed.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request); + // Do something. + Feed response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_updatefeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java new file mode 100644 index 000000000000..691eb8a262af --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_updatefeed_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; +import com.google.cloud.asset.v1.UpdateFeedRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeed { + + public static void main(String[] args) throws Exception { + syncUpdateFeed(); + } + + public static void syncUpdateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + UpdateFeedRequest request = + UpdateFeedRequest.newBuilder() + .setFeed(Feed.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Feed response = assetServiceClient.updateFeed(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_updatefeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java new file mode 100644 index 000000000000..dd9bbaba4035 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_updatefeed_feed_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.Feed; + +public class SyncUpdateFeedFeed { + + public static void main(String[] args) throws Exception { + syncUpdateFeedFeed(); + } + + public static void syncUpdateFeedFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + Feed feed = Feed.newBuilder().build(); + Feed response = assetServiceClient.updateFeed(feed); + } + } +} +// [END asset_v1_generated_assetserviceclient_updatefeed_feed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java new file mode 100644 index 000000000000..3a52188236dc --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_updatesavedquery_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.UpdateSavedQueryRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSavedQuery { + + public static void main(String[] args) throws Exception { + asyncUpdateSavedQuery(); + } + + public static void asyncUpdateSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + UpdateSavedQueryRequest request = + UpdateSavedQueryRequest.newBuilder() + .setSavedQuery(SavedQuery.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + assetServiceClient.updateSavedQueryCallable().futureCall(request); + // Do something. + SavedQuery response = future.get(); + } + } +} +// [END asset_v1_generated_assetserviceclient_updatesavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java new file mode 100644 index 000000000000..816b7610559a --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_updatesavedquery_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.cloud.asset.v1.UpdateSavedQueryRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSavedQuery { + + public static void main(String[] args) throws Exception { + syncUpdateSavedQuery(); + } + + public static void syncUpdateSavedQuery() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + UpdateSavedQueryRequest request = + UpdateSavedQueryRequest.newBuilder() + .setSavedQuery(SavedQuery.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + SavedQuery response = assetServiceClient.updateSavedQuery(request); + } + } +} +// [END asset_v1_generated_assetserviceclient_updatesavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java new file mode 100644 index 000000000000..c1dd01afa306 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetserviceclient_updatesavedquery_savedqueryfieldmask_sync] +import com.google.cloud.asset.v1.AssetServiceClient; +import com.google.cloud.asset.v1.SavedQuery; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSavedQuerySavedqueryFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSavedQuerySavedqueryFieldmask(); + } + + public static void syncUpdateSavedQuerySavedqueryFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SavedQuery savedQuery = SavedQuery.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + SavedQuery response = assetServiceClient.updateSavedQuery(savedQuery, updateMask); + } + } +} +// [END asset_v1_generated_assetserviceclient_updatesavedquery_savedqueryfieldmask_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java new file mode 100644 index 000000000000..d7822c14a45e --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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.v1.samples; + +// [START asset_v1_generated_assetservicesettings_batchgetassetshistory_sync] +import com.google.cloud.asset.v1.AssetServiceSettings; +import java.time.Duration; + +public class SyncBatchGetAssetsHistory { + + public static void main(String[] args) throws Exception { + syncBatchGetAssetsHistory(); + } + + public static void syncBatchGetAssetsHistory() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); + assetServiceSettingsBuilder + .batchGetAssetsHistorySettings() + .setRetrySettings( + assetServiceSettingsBuilder + .batchGetAssetsHistorySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1_generated_assetservicesettings_batchgetassetshistory_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java new file mode 100644 index 000000000000..2458f13c3196 --- /dev/null +++ b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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.v1.stub.samples; + +// [START asset_v1_generated_assetservicestubsettings_batchgetassetshistory_sync] +import com.google.cloud.asset.v1.stub.AssetServiceStubSettings; +import java.time.Duration; + +public class SyncBatchGetAssetsHistory { + + public static void main(String[] args) throws Exception { + syncBatchGetAssetsHistory(); + } + + public static void syncBatchGetAssetsHistory() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceStubSettings.Builder assetServiceSettingsBuilder = + AssetServiceStubSettings.newBuilder(); + assetServiceSettingsBuilder + .batchGetAssetsHistorySettings() + .setRetrySettings( + assetServiceSettingsBuilder + .batchGetAssetsHistorySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1_generated_assetservicestubsettings_batchgetassetshistory_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java new file mode 100644 index 000000000000..64ad4c7fdd09 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java @@ -0,0 +1,735 @@ +/* + * Copyright 2022 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.v1p1beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStub; +import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Asset service definition. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   String scope = "scope109264468";
+ *   String query = "query107944136";
+ *   List assetTypes = new ArrayList<>();
+ *   for (StandardResourceMetadata element :
+ *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AssetServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceClient implements BackgroundResource { + private final AssetServiceSettings settings; + private final AssetServiceStub stub; + + /** Constructs an instance of AssetServiceClient with default settings. */ + public static final AssetServiceClient create() throws IOException { + return create(AssetServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { + return new AssetServiceClient(settings); + } + + /** + * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AssetServiceSettings). + */ + public static final AssetServiceClient create(AssetServiceStub stub) { + return new AssetServiceClient(stub); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected AssetServiceClient(AssetServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AssetServiceClient(AssetServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AssetServiceSettings getSettings() { + return settings; + } + + public AssetServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the resources under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the resources under a scope, + * even if they don't have .get permission of all the resources. Callers should have + * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String scope = "scope109264468";
+   *   String query = "query107944136";
+   *   List assetTypes = new ArrayList<>();
+   *   for (StandardResourceMetadata element :
+   *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param scope Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + *
    + *
  • Organization number (such as "organizations/123") + *
  • Folder number(such as "folders/1234") + *
  • Project number (such as "projects/12345") + *
  • Project id (such as "projects/abc") + *
+ * + * @param query Optional. The query statement. + * @param assetTypes Optional. A list of asset types that this request searches for. If empty, it + * will search all the supported asset types. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllResourcesPagedResponse searchAllResources( + String scope, String query, List assetTypes) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope(scope) + .setQuery(query) + .addAllAssetTypes(assetTypes) + .build(); + return searchAllResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the resources under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the resources under a scope, + * even if they don't have .get permission of all the resources. Callers should have + * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllResourcesRequest request =
+   *       SearchAllResourcesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (StandardResourceMetadata element :
+   *       assetServiceClient.searchAllResources(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllResourcesPagedResponse searchAllResources( + SearchAllResourcesRequest request) { + return searchAllResourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the resources under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the resources under a scope, + * even if they don't have .get permission of all the resources. Callers should have + * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllResourcesRequest request =
+   *       SearchAllResourcesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.searchAllResourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (StandardResourceMetadata element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllResourcesPagedCallable() { + return stub.searchAllResourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the resources under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the resources under a scope, + * even if they don't have .get permission of all the resources. Callers should have + * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllResourcesRequest request =
+   *       SearchAllResourcesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     SearchAllResourcesResponse response =
+   *         assetServiceClient.searchAllResourcesCallable().call(request);
+   *     for (StandardResourceMetadata element : response.getResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllResourcesCallable() { + return stub.searchAllResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the IAM policies under a + * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should + * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String scope = "scope109264468";
+   *   String query = "query107944136";
+   *   for (IamPolicySearchResult element :
+   *       assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param scope Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + *
    + *
  • Organization number (such as "organizations/123") + *
  • Folder number(such as "folders/1234") + *
  • Project number (such as "projects/12345") + *
  • Project id (such as "projects/abc") + *
+ * + * @param query Optional. The query statement. Examples: + *
    + *
  • "policy:myuser{@literal @}mydomain.com" + *
  • "policy:(myuser{@literal @}mydomain.com viewer)" + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder().setScope(scope).setQuery(query).build(); + return searchAllIamPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the IAM policies under a + * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should + * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllIamPoliciesRequest request =
+   *       SearchAllIamPoliciesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (IamPolicySearchResult element :
+   *       assetServiceClient.searchAllIamPolicies(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( + SearchAllIamPoliciesRequest request) { + return searchAllIamPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the IAM policies under a + * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should + * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllIamPoliciesRequest request =
+   *       SearchAllIamPoliciesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (IamPolicySearchResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllIamPoliciesPagedCallable() { + return stub.searchAllIamPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). + * This RPC gives callers especially admins the ability to search all the IAM policies under a + * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should + * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be + * rejected. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   SearchAllIamPoliciesRequest request =
+   *       SearchAllIamPoliciesRequest.newBuilder()
+   *           .setScope("scope109264468")
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     SearchAllIamPoliciesResponse response =
+   *         assetServiceClient.searchAllIamPoliciesCallable().call(request);
+   *     for (IamPolicySearchResult element : response.getResultsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + searchAllIamPoliciesCallable() { + return stub.searchAllIamPoliciesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class SearchAllResourcesPagedResponse + extends AbstractPagedListResponse< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + StandardResourceMetadata, + SearchAllResourcesPage, + SearchAllResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchAllResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchAllResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchAllResourcesPagedResponse(SearchAllResourcesPage page) { + super(page, SearchAllResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchAllResourcesPage + extends AbstractPage< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + StandardResourceMetadata, + SearchAllResourcesPage> { + + private SearchAllResourcesPage( + PageContext + context, + SearchAllResourcesResponse response) { + super(context, response); + } + + private static SearchAllResourcesPage createEmptyPage() { + return new SearchAllResourcesPage(null, null); + } + + @Override + protected SearchAllResourcesPage createPage( + PageContext + context, + SearchAllResourcesResponse response) { + return new SearchAllResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchAllResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + StandardResourceMetadata, + SearchAllResourcesPage, + SearchAllResourcesFixedSizeCollection> { + + private SearchAllResourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchAllResourcesFixedSizeCollection createEmptyCollection() { + return new SearchAllResourcesFixedSizeCollection(null, 0); + } + + @Override + protected SearchAllResourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchAllResourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class SearchAllIamPoliciesPagedResponse + extends AbstractPagedListResponse< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult, + SearchAllIamPoliciesPage, + SearchAllIamPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + SearchAllIamPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new SearchAllIamPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private SearchAllIamPoliciesPagedResponse(SearchAllIamPoliciesPage page) { + super(page, SearchAllIamPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class SearchAllIamPoliciesPage + extends AbstractPage< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult, + SearchAllIamPoliciesPage> { + + private SearchAllIamPoliciesPage( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + SearchAllIamPoliciesResponse response) { + super(context, response); + } + + private static SearchAllIamPoliciesPage createEmptyPage() { + return new SearchAllIamPoliciesPage(null, null); + } + + @Override + protected SearchAllIamPoliciesPage createPage( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + SearchAllIamPoliciesResponse response) { + return new SearchAllIamPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class SearchAllIamPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult, + SearchAllIamPoliciesPage, + SearchAllIamPoliciesFixedSizeCollection> { + + private SearchAllIamPoliciesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static SearchAllIamPoliciesFixedSizeCollection createEmptyCollection() { + return new SearchAllIamPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected SearchAllIamPoliciesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new SearchAllIamPoliciesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java new file mode 100644 index 000000000000..dbfedba29787 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java @@ -0,0 +1,229 @@ +/* + * Copyright 2022 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.v1p1beta1; + +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of searchAllResources to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .searchAllResourcesSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to searchAllResources. */ + public PagedCallSettings< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return ((AssetServiceStubSettings) getStubSettings()).searchAllResourcesSettings(); + } + + /** Returns the object with the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return ((AssetServiceStubSettings) getStubSettings()).searchAllIamPoliciesSettings(); + } + + public static final AssetServiceSettings create(AssetServiceStubSettings stub) + throws IOException { + return new AssetServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AssetServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AssetServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AssetServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AssetServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AssetServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AssetServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AssetServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AssetServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AssetServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); + } + + public AssetServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AssetServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to searchAllResources. */ + public PagedCallSettings.Builder< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return getStubSettingsBuilder().searchAllResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings.Builder< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return getStubSettingsBuilder().searchAllIamPoliciesSettings(); + } + + @Override + public AssetServiceSettings build() throws IOException { + return new AssetServiceSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json new file mode 100644 index 000000000000..2e1ed2b4d3a3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json @@ -0,0 +1,24 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.asset.v1p1beta1", + "libraryPackage": "com.google.cloud.asset.v1p1beta1", + "services": { + "AssetService": { + "clients": { + "grpc": { + "libraryClient": "AssetServiceClient", + "rpcs": { + "SearchAllIamPolicies": { + "methods": ["searchAllIamPolicies", "searchAllIamPolicies", "searchAllIamPoliciesPagedCallable", "searchAllIamPoliciesCallable"] + }, + "SearchAllResources": { + "methods": ["searchAllResources", "searchAllResources", "searchAllResourcesPagedCallable", "searchAllResourcesCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java new file mode 100644 index 000000000000..59e064f89e2a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= AssetServiceClient ======================= + * + *

Service Description: Asset service definition. + * + *

Sample for AssetServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   String scope = "scope109264468";
+ *   String query = "query107944136";
+ *   List assetTypes = new ArrayList<>();
+ *   for (StandardResourceMetadata element :
+ *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.asset.v1p1beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java new file mode 100644 index 000000000000..ff4b535cb198 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java @@ -0,0 +1,63 @@ +/* + * Copyright 2022 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.v1p1beta1.stub; + +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class AssetServiceStub implements BackgroundResource { + + public UnaryCallable + searchAllResourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllResourcesPagedCallable()"); + } + + public UnaryCallable + searchAllResourcesCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllResourcesCallable()"); + } + + public UnaryCallable + searchAllIamPoliciesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesPagedCallable()"); + } + + public UnaryCallable + searchAllIamPoliciesCallable() { + throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java new file mode 100644 index 000000000000..3636ae123faf --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java @@ -0,0 +1,518 @@ +/* + * Copyright 2022 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.v1p1beta1.stub; + +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; +import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of searchAllResources to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ *     AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .searchAllResourcesSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings; + private final PagedCallSettings< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings; + + private static final PagedListDescriptor< + SearchAllResourcesRequest, SearchAllResourcesResponse, StandardResourceMetadata> + SEARCH_ALL_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor< + SearchAllResourcesRequest, SearchAllResourcesResponse, StandardResourceMetadata>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchAllResourcesRequest injectToken( + SearchAllResourcesRequest payload, String token) { + return SearchAllResourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchAllResourcesRequest injectPageSize( + SearchAllResourcesRequest payload, int pageSize) { + return SearchAllResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchAllResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchAllResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchAllResourcesResponse payload) { + return payload.getResultsList() == null + ? ImmutableList.of() + : payload.getResultsList(); + } + }; + + private static final PagedListDescriptor< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> + SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public SearchAllIamPoliciesRequest injectToken( + SearchAllIamPoliciesRequest payload, String token) { + return SearchAllIamPoliciesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public SearchAllIamPoliciesRequest injectPageSize( + SearchAllIamPoliciesRequest payload, int pageSize) { + return SearchAllIamPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(SearchAllIamPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(SearchAllIamPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + SearchAllIamPoliciesResponse payload) { + return payload.getResultsList() == null + ? ImmutableList.of() + : payload.getResultsList(); + } + }; + + private static final PagedListResponseFactory< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + SEARCH_ALL_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + SearchAllResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchAllResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchAllResourcesRequest, + SearchAllResourcesResponse, + StandardResourceMetadata> + pageContext = + PageContext.create( + callable, SEARCH_ALL_RESOURCES_PAGE_STR_DESC, request, context); + return SearchAllResourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + SearchAllIamPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + IamPolicySearchResult> + pageContext = + PageContext.create( + callable, SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC, request, context); + return SearchAllIamPoliciesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to searchAllResources. */ + public PagedCallSettings< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return searchAllResourcesSettings; + } + + /** Returns the object with the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return searchAllIamPoliciesSettings; + } + + public AssetServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAssetServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAssetServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "cloudasset.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudasset.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build(); + searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build(); + } + + /** Builder for AssetServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings; + private final PagedCallSettings.Builder< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(15000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(15000L)) + .setTotalTimeout(Duration.ofMillis(15000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + searchAllResourcesSettings = PagedCallSettings.newBuilder(SEARCH_ALL_RESOURCES_PAGE_STR_FACT); + searchAllIamPoliciesSettings = + PagedCallSettings.newBuilder(SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + searchAllResourcesSettings, searchAllIamPoliciesSettings); + initDefaults(this); + } + + protected Builder(AssetServiceStubSettings settings) { + super(settings); + + searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder(); + searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + searchAllResourcesSettings, searchAllIamPoliciesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .searchAllResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .searchAllIamPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to searchAllResources. */ + public PagedCallSettings.Builder< + SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> + searchAllResourcesSettings() { + return searchAllResourcesSettings; + } + + /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ + public PagedCallSettings.Builder< + SearchAllIamPoliciesRequest, + SearchAllIamPoliciesResponse, + SearchAllIamPoliciesPagedResponse> + searchAllIamPoliciesSettings() { + return searchAllIamPoliciesSettings; + } + + @Override + public AssetServiceStubSettings build() throws IOException { + return new AssetServiceStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java new file mode 100644 index 000000000000..9a6b0cff432a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 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.v1p1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java new file mode 100644 index 000000000000..0f2e0b071dec --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java @@ -0,0 +1,235 @@ +/* + * Copyright 2022 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.v1p1beta1.stub; + +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceStub extends AssetServiceStub { + private static final MethodDescriptor + searchAllResourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllResources") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchAllResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchAllResourcesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + searchAllIamPoliciesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllIamPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller(SearchAllIamPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SearchAllIamPoliciesResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + searchAllResourcesCallable; + private final UnaryCallable + searchAllResourcesPagedCallable; + private final UnaryCallable + searchAllIamPoliciesCallable; + private final UnaryCallable + searchAllIamPoliciesPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAssetServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAssetServiceStub( + AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + searchAllResourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchAllResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("scope", String.valueOf(request.getScope())); + return params.build(); + }) + .build(); + GrpcCallSettings + searchAllIamPoliciesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("scope", String.valueOf(request.getScope())); + return params.build(); + }) + .build(); + + this.searchAllResourcesCallable = + callableFactory.createUnaryCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllResourcesPagedCallable = + callableFactory.createPagedCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllIamPoliciesCallable = + callableFactory.createUnaryCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + this.searchAllIamPoliciesPagedCallable = + callableFactory.createPagedCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + searchAllResourcesCallable() { + return searchAllResourcesCallable; + } + + @Override + public UnaryCallable + searchAllResourcesPagedCallable() { + return searchAllResourcesPagedCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesCallable() { + return searchAllIamPoliciesCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesPagedCallable() { + return searchAllIamPoliciesPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java new file mode 100644 index 000000000000..fc1a62cf8f7e --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 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.v1p1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssetServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java new file mode 100644 index 000000000000..403f13d0c07f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java @@ -0,0 +1,292 @@ +/* + * Copyright 2022 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.v1p1beta1.stub; + +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssetServiceStub extends AssetServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + searchAllResourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllResources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p1beta1/{scope=*/*}/resources:searchAll", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "scope", request.getScope()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "assetTypes", request.getAssetTypesList()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "query", request.getQuery()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAllResourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> + searchAllIamPoliciesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllIamPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p1beta1/{scope=*/*}/iamPolicies:searchAll", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "scope", request.getScope()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "query", request.getQuery()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SearchAllIamPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + searchAllResourcesCallable; + private final UnaryCallable + searchAllResourcesPagedCallable; + private final UnaryCallable + searchAllIamPoliciesCallable; + private final UnaryCallable + searchAllIamPoliciesPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAssetServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAssetServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + searchAllResourcesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(searchAllResourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + searchAllIamPoliciesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.searchAllResourcesCallable = + callableFactory.createUnaryCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllResourcesPagedCallable = + callableFactory.createPagedCallable( + searchAllResourcesTransportSettings, + settings.searchAllResourcesSettings(), + clientContext); + this.searchAllIamPoliciesCallable = + callableFactory.createUnaryCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + this.searchAllIamPoliciesPagedCallable = + callableFactory.createPagedCallable( + searchAllIamPoliciesTransportSettings, + settings.searchAllIamPoliciesSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(searchAllResourcesMethodDescriptor); + methodDescriptors.add(searchAllIamPoliciesMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + searchAllResourcesCallable() { + return searchAllResourcesCallable; + } + + @Override + public UnaryCallable + searchAllResourcesPagedCallable() { + return searchAllResourcesPagedCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesCallable() { + return searchAllIamPoliciesCallable; + } + + @Override + public UnaryCallable + searchAllIamPoliciesPagedCallable() { + return searchAllIamPoliciesPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..1a4adb9a8692 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java @@ -0,0 +1,186 @@ +/* + * Copyright 2022 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.v1p1beta1; + +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.asset.v1p1beta1.stub.HttpJsonAssetServiceStub; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAssetServiceStub.getMethodDescriptors(), + AssetServiceSettings.getDefaultEndpoint()); + AssetServiceSettings settings = + AssetServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void searchAllResourcesTest() throws Exception { + StandardResourceMetadata responsesElement = StandardResourceMetadata.newBuilder().build(); + SearchAllResourcesResponse expectedResponse = + SearchAllResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + + SearchAllResourcesPagedResponse pagedListResponse = + client.searchAllResources(scope, query, assetTypes); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchAllResourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + client.searchAllResources(scope, query, assetTypes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAllIamPoliciesTest() throws Exception { + IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); + SearchAllIamPoliciesResponse expectedResponse = + SearchAllIamPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + + SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void searchAllIamPoliciesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String scope = "scope-2319/scope-2319"; + String query = "query107944136"; + client.searchAllIamPolicies(scope, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java new file mode 100644 index 000000000000..5313fde9d0c5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java @@ -0,0 +1,181 @@ +/* + * Copyright 2022 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.v1p1beta1; + +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; +import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientTest { + private static MockAssetService mockAssetService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAssetService = new MockAssetService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AssetServiceSettings settings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void searchAllResourcesTest() throws Exception { + StandardResourceMetadata responsesElement = StandardResourceMetadata.newBuilder().build(); + SearchAllResourcesResponse expectedResponse = + SearchAllResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + String scope = "scope109264468"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + + SearchAllResourcesPagedResponse pagedListResponse = + client.searchAllResources(scope, query, assetTypes); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchAllResourcesRequest actualRequest = ((SearchAllResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(scope, actualRequest.getScope()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertEquals(assetTypes, actualRequest.getAssetTypesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchAllResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String scope = "scope109264468"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + client.searchAllResources(scope, query, assetTypes); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void searchAllIamPoliciesTest() throws Exception { + IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); + SearchAllIamPoliciesResponse expectedResponse = + SearchAllIamPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllResults(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + String scope = "scope109264468"; + String query = "query107944136"; + + SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SearchAllIamPoliciesRequest actualRequest = + ((SearchAllIamPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(scope, actualRequest.getScope()); + Assert.assertEquals(query, actualRequest.getQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void searchAllIamPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String scope = "scope109264468"; + String query = "query107944136"; + client.searchAllIamPolicies(scope, query); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java new file mode 100644 index 000000000000..bdfd8b9cb016 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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.v1p1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetService implements MockGrpcService { + private final MockAssetServiceImpl serviceImpl; + + public MockAssetService() { + serviceImpl = new MockAssetServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java new file mode 100644 index 000000000000..a9c79fb093ce --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java @@ -0,0 +1,104 @@ +/* + * Copyright 2022 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.v1p1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.asset.v1p1beta1.AssetServiceGrpc.AssetServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetServiceImpl extends AssetServiceImplBase { + private List requests; + private Queue responses; + + public MockAssetServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void searchAllResources( + SearchAllResourcesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchAllResourcesResponse) { + requests.add(request); + responseObserver.onNext(((SearchAllResourcesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchAllResources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchAllResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void searchAllIamPolicies( + SearchAllIamPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SearchAllIamPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((SearchAllIamPoliciesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchAllIamPolicies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SearchAllIamPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java b/owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java new file mode 100644 index 000000000000..73fe8769d725 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java @@ -0,0 +1,429 @@ +package com.google.cloud.asset.v1p1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Asset service definition.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/asset/v1p1beta1/asset_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AssetServiceGrpc { + + private AssetServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.asset.v1p1beta1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSearchAllResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchAllResources", + requestType = com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.class, + responseType = com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSearchAllResourcesMethod() { + io.grpc.MethodDescriptor getSearchAllResourcesMethod; + if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { + AssetServiceGrpc.getSearchAllResourcesMethod = getSearchAllResourcesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllResources")) + .build(); + } + } + } + return getSearchAllResourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SearchAllIamPolicies", + requestType = com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.class, + responseType = com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod() { + io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; + if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { + AssetServiceGrpc.getSearchAllIamPoliciesMethod = getSearchAllIamPoliciesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllIamPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllIamPolicies")) + .build(); + } + } + } + return getSearchAllIamPoliciesMethod; + } + + /** + * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * Searches all the resources under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the resources under a scope,
+     * even if they don't have .get permission of all the resources. Callers
+     * should have cloud.assets.SearchAllResources permission on the requested
+     * scope, otherwise it will be rejected.
+     * 
+ */ + public void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllResourcesMethod(), responseObserver); + } + + /** + *
+     * Searches all the IAM policies under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the IAM policies under a scope,
+     * even if they don't have .getIamPolicy permission of all the IAM policies.
+     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
+     * requested scope, otherwise it will be rejected.
+     * 
+ */ + public void searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllIamPoliciesMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + 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>( + this, 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>( + this, METHODID_SEARCH_ALL_IAM_POLICIES))) + .build(); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * Searches all the resources under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the resources under a scope,
+     * even if they don't have .get permission of all the resources. Callers
+     * should have cloud.assets.SearchAllResources permission on the requested
+     * scope, otherwise it will be rejected.
+     * 
+ */ + public void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchAllResourcesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Searches all the IAM policies under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the IAM policies under a scope,
+     * even if they don't have .getIamPolicy permission of all the IAM policies.
+     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
+     * requested scope, otherwise it will be rejected.
+     * 
+ */ + public void searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * Searches all the resources under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the resources under a scope,
+     * even if they don't have .get permission of all the resources. Callers
+     * should have cloud.assets.SearchAllResources permission on the requested
+     * scope, otherwise it will be rejected.
+     * 
+ */ + 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 under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the IAM policies under a scope,
+     * even if they don't have .getIamPolicy permission of all the IAM policies.
+     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
+     * requested scope, otherwise it will be rejected.
+     * 
+ */ + 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); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * Searches all the resources under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the resources under a scope,
+     * even if they don't have .get permission of all the resources. Callers
+     * should have cloud.assets.SearchAllResources permission on the requested
+     * scope, otherwise it will be rejected.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture searchAllResources( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchAllResourcesMethod(), getCallOptions()), request); + } + + /** + *
+     * Searches all the IAM policies under a given accessible CRM scope
+     * (project/folder/organization). This RPC gives callers
+     * especially admins the ability to search all the IAM policies under a scope,
+     * even if they don't have .getIamPolicy permission of all the IAM policies.
+     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
+     * requested scope, otherwise it will be rejected.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture searchAllIamPolicies( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SEARCH_ALL_RESOURCES = 0; + private static final int METHODID_SEARCH_ALL_IAM_POLICIES = 1; + + 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 AssetServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AssetServiceImplBase 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_SEARCH_ALL_RESOURCES: + serviceImpl.searchAllResources((com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SEARCH_ALL_IAM_POLICIES: + serviceImpl.searchAllIamPolicies((com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) 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(); + } + } + } + + private static abstract 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.v1p1beta1.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 String methodName; + + AssetServiceMethodDescriptorSupplier(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(getSearchAllResourcesMethod()) + .addMethod(getSearchAllIamPoliciesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java new file mode 100644 index 000000000000..4a68b91ba585 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java @@ -0,0 +1,129 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/assets.proto + +package com.google.cloud.asset.v1p1beta1; + +public final class AssetProto { + private AssetProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/asset/v1p1beta1/assets.pr" + + "oto\022\034google.cloud.asset.v1p1beta1\032\032googl" + + "e/iam/v1/policy.proto\"\302\002\n\030StandardResour" + + "ceMetadata\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002" + + " \001(\t\022\017\n\007project\030\003 \001(\t\022\024\n\014display_name\030\004 " + + "\001(\t\022\023\n\013description\030\005 \001(\t\022\035\n\025additional_a" + + "ttributes\030\n \003(\t\022\020\n\010location\030\013 \001(\t\022R\n\006lab" + + "els\030\014 \003(\0132B.google.cloud.asset.v1p1beta1" + + ".StandardResourceMetadata.LabelsEntry\022\024\n" + + "\014network_tags\030\r \003(\t\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\243\003\n\025IamPolicy" + + "SearchResult\022\020\n\010resource\030\001 \001(\t\022\017\n\007projec" + + "t\030\003 \001(\t\022%\n\006policy\030\004 \001(\0132\025.google.iam.v1." + + "Policy\022T\n\013explanation\030\005 \001(\0132?.google.clo" + + "ud.asset.v1p1beta1.IamPolicySearchResult" + + ".Explanation\032\351\001\n\013Explanation\022t\n\023matched_" + + "permissions\030\001 \003(\0132W.google.cloud.asset.v" + + "1p1beta1.IamPolicySearchResult.Explanati" + + "on.MatchedPermissionsEntry\032d\n\027MatchedPer" + + "missionsEntry\022\013\n\003key\030\001 \001(\t\0228\n\005value\030\002 \001(" + + "\0132).google.cloud.asset.v1p1beta1.Permiss" + + "ions:\0028\001\"\"\n\013Permissions\022\023\n\013permissions\030\001" + + " \003(\tB\264\001\n com.google.cloud.asset.v1p1beta" + + "1B\nAssetProtoP\001ZAgoogle.golang.org/genpr" + + "oto/googleapis/cloud/asset/v1p1beta1;ass" + + "et\370\001\001\252\002\034Google.Cloud.Asset.V1P1Beta1\312\002\034G" + + "oogle\\Cloud\\Asset\\V1p1beta1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.iam.v1.PolicyProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor, + new java.lang.String[] { "Name", "AssetType", "Project", "DisplayName", "Description", "AdditionalAttributes", "Location", "Labels", "NetworkTags", }); + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor = + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor, + new java.lang.String[] { "Resource", "Project", "Policy", "Explanation", }); + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor = + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor, + new java.lang.String[] { "MatchedPermissions", }); + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor = + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor, + new java.lang.String[] { "Permissions", }); + com.google.iam.v1.PolicyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java new file mode 100644 index 000000000000..250866763a66 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +public final class AssetServiceProto { + private AssetServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/asset/v1p1beta1/asset_ser" + + "vice.proto\022\034google.cloud.asset.v1p1beta1" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032)google/cloud/asset/v1p1beta1/a" + + "ssets.proto\"\245\001\n\031SearchAllResourcesReques" + + "t\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A" + + "\001\022\030\n\013asset_types\030\003 \003(\tB\003\340A\001\022\026\n\tpage_size" + + "\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\022\025\n\010" + + "order_by\030\n \001(\tB\003\340A\001\"~\n\032SearchAllResource" + + "sResponse\022G\n\007results\030\001 \003(\01326.google.clou" + + "d.asset.v1p1beta1.StandardResourceMetada" + + "ta\022\027\n\017next_page_token\030\002 \001(\t\"v\n\033SearchAll" + + "IamPoliciesRequest\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022" + + "\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340" + + "A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"}\n\034SearchAll" + + "IamPoliciesResponse\022D\n\007results\030\001 \003(\01323.g" + + "oogle.cloud.asset.v1p1beta1.IamPolicySea" + + "rchResult\022\027\n\017next_page_token\030\002 \001(\t2\211\004\n\014A" + + "ssetService\022\325\001\n\022SearchAllResources\0227.goo" + + "gle.cloud.asset.v1p1beta1.SearchAllResou" + + "rcesRequest\0328.google.cloud.asset.v1p1bet" + + "a1.SearchAllResourcesResponse\"L\202\323\344\223\002,\022*/" + + "v1p1beta1/{scope=*/*}/resources:searchAl" + + "l\332A\027scope,query,asset_types\022\321\001\n\024SearchAl" + + "lIamPolicies\0229.google.cloud.asset.v1p1be" + + "ta1.SearchAllIamPoliciesRequest\032:.google" + + ".cloud.asset.v1p1beta1.SearchAllIamPolic" + + "iesResponse\"B\202\323\344\223\002.\022,/v1p1beta1/{scope=*" + + "/*}/iamPolicies:searchAll\332A\013scope,query\032" + + "M\312A\031cloudasset.googleapis.com\322A.https://" + + "www.googleapis.com/auth/cloud-platformB\270" + + "\001\n com.google.cloud.asset.v1p1beta1B\021Ass" + + "etServiceProtoP\001ZAgoogle.golang.org/genp" + + "roto/googleapis/cloud/asset/v1p1beta1;as" + + "set\252\002\034Google.Cloud.Asset.V1P1Beta1\312\002\034Goo" + + "gle\\Cloud\\Asset\\V1p1beta1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.asset.v1p1beta1.AssetProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor, + new java.lang.String[] { "Scope", "Query", "AssetTypes", "PageSize", "PageToken", "OrderBy", }); + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor, + new java.lang.String[] { "Results", "NextPageToken", }); + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor, + new java.lang.String[] { "Scope", "Query", "PageSize", "PageToken", }); + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor, + new java.lang.String[] { "Results", "NextPageToken", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.asset.v1p1beta1.AssetProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java new file mode 100644 index 000000000000..f45a17763797 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java @@ -0,0 +1,2204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/assets.proto + +package com.google.cloud.asset.v1p1beta1; + +/** + *
+ * The result for a IAM Policy search.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult} + */ +public final class IamPolicySearchResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult) + IamPolicySearchResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use IamPolicySearchResult.newBuilder() to construct. + private IamPolicySearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IamPolicySearchResult() { + resource_ = ""; + project_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IamPolicySearchResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IamPolicySearchResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 34: { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (policy_ != null) { + subBuilder = policy_.toBuilder(); + } + policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policy_); + policy_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder subBuilder = null; + if (explanation_ != null) { + subBuilder = explanation_.toBuilder(); + } + explanation_ = input.readMessage(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(explanation_); + explanation_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder.class); + } + + public interface ExplanationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + int getMatchedPermissionsCount(); + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + boolean containsMatchedPermissions( + java.lang.String key); + /** + * Use {@link #getMatchedPermissionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMatchedPermissions(); + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + java.util.Map + getMatchedPermissionsMap(); + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + + /* nullable */ +com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrDefault( + java.lang.String key, + /* nullable */ +com.google.cloud.asset.v1p1beta1.Permissions defaultValue); + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + + com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrThrow( + java.lang.String key); + } + /** + *
+   * Explanation about the IAM policy search result.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation} + */ + public static final class Explanation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) + ExplanationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Explanation.newBuilder() to construct. + private Explanation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Explanation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Explanation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Explanation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + matchedPermissions_ = com.google.protobuf.MapField.newMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + matchedPermissions__ = input.readMessage( + MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + matchedPermissions_.getMutableMap().put( + matchedPermissions__.getKey(), matchedPermissions__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMatchedPermissions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder.class); + } + + public static final int MATCHED_PERMISSIONS_FIELD_NUMBER = 1; + private static final class MatchedPermissionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.asset.v1p1beta1.Permissions.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> matchedPermissions_; + private com.google.protobuf.MapField + internalGetMatchedPermissions() { + if (matchedPermissions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + } + return matchedPermissions_; + } + + public int getMatchedPermissionsCount() { + return internalGetMatchedPermissions().getMap().size(); + } + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + + @java.lang.Override + public boolean containsMatchedPermissions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMatchedPermissions().getMap().containsKey(key); + } + /** + * Use {@link #getMatchedPermissionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMatchedPermissions() { + return getMatchedPermissionsMap(); + } + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public java.util.Map getMatchedPermissionsMap() { + return internalGetMatchedPermissions().getMap(); + } + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrDefault( + java.lang.String key, + com.google.cloud.asset.v1p1beta1.Permissions defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The map from roles to their included permission matching the permission
+     * query (e.g. containing `policy.role.permissions:`). A sample role string:
+     * "roles/compute.instanceAdmin". The roles can also be found in the
+     * returned `policy` bindings. Note that the map is populated only if
+     * requesting with a permission query.
+     * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMatchedPermissions(), + MatchedPermissionsDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetMatchedPermissions().getMap().entrySet()) { + com.google.protobuf.MapEntry + matchedPermissions__ = MatchedPermissionsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, matchedPermissions__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation other = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) obj; + + if (!internalGetMatchedPermissions().equals( + other.internalGetMatchedPermissions())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetMatchedPermissions().getMap().isEmpty()) { + hash = (37 * hash) + MATCHED_PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetMatchedPermissions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Explanation about the IAM policy search result.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMatchedPermissions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableMatchedPermissions(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableMatchedPermissions().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation build() { + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation buildPartial() { + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation result = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation(this); + int from_bitField0_ = bitField0_; + result.matchedPermissions_ = internalGetMatchedPermissions(); + result.matchedPermissions_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation other) { + if (other == com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance()) return this; + internalGetMutableMatchedPermissions().mergeFrom( + other.internalGetMatchedPermissions()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> matchedPermissions_; + private com.google.protobuf.MapField + internalGetMatchedPermissions() { + if (matchedPermissions_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + } + return matchedPermissions_; + } + private com.google.protobuf.MapField + internalGetMutableMatchedPermissions() { + onChanged();; + if (matchedPermissions_ == null) { + matchedPermissions_ = com.google.protobuf.MapField.newMapField( + MatchedPermissionsDefaultEntryHolder.defaultEntry); + } + if (!matchedPermissions_.isMutable()) { + matchedPermissions_ = matchedPermissions_.copy(); + } + return matchedPermissions_; + } + + public int getMatchedPermissionsCount() { + return internalGetMatchedPermissions().getMap().size(); + } + /** + *
+       * The map from roles to their included permission matching the permission
+       * query (e.g. containing `policy.role.permissions:`). A sample role string:
+       * "roles/compute.instanceAdmin". The roles can also be found in the
+       * returned `policy` bindings. Note that the map is populated only if
+       * requesting with a permission query.
+       * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + + @java.lang.Override + public boolean containsMatchedPermissions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMatchedPermissions().getMap().containsKey(key); + } + /** + * Use {@link #getMatchedPermissionsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMatchedPermissions() { + return getMatchedPermissionsMap(); + } + /** + *
+       * The map from roles to their included permission matching the permission
+       * query (e.g. containing `policy.role.permissions:`). A sample role string:
+       * "roles/compute.instanceAdmin". The roles can also be found in the
+       * returned `policy` bindings. Note that the map is populated only if
+       * requesting with a permission query.
+       * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public java.util.Map getMatchedPermissionsMap() { + return internalGetMatchedPermissions().getMap(); + } + /** + *
+       * The map from roles to their included permission matching the permission
+       * query (e.g. containing `policy.role.permissions:`). A sample role string:
+       * "roles/compute.instanceAdmin". The roles can also be found in the
+       * returned `policy` bindings. Note that the map is populated only if
+       * requesting with a permission query.
+       * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrDefault( + java.lang.String key, + com.google.cloud.asset.v1p1beta1.Permissions defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The map from roles to their included permission matching the permission
+       * query (e.g. containing `policy.role.permissions:`). A sample role string:
+       * "roles/compute.instanceAdmin". The roles can also be found in the
+       * returned `policy` bindings. Note that the map is populated only if
+       * requesting with a permission query.
+       * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + @java.lang.Override + + public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMatchedPermissions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMatchedPermissions() { + internalGetMutableMatchedPermissions().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The map from roles to their included permission matching the permission
+       * query (e.g. containing `policy.role.permissions:`). A sample role string:
+       * "roles/compute.instanceAdmin". The roles can also be found in the
+       * returned `policy` bindings. Note that the map is populated only if
+       * requesting with a permission query.
+       * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + + public Builder removeMatchedPermissions( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMatchedPermissions().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMatchedPermissions() { + return internalGetMutableMatchedPermissions().getMutableMap(); + } + /** + *
+       * The map from roles to their included permission matching the permission
+       * query (e.g. containing `policy.role.permissions:`). A sample role string:
+       * "roles/compute.instanceAdmin". The roles can also be found in the
+       * returned `policy` bindings. Note that the map is populated only if
+       * requesting with a permission query.
+       * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + public Builder putMatchedPermissions( + java.lang.String key, + com.google.cloud.asset.v1p1beta1.Permissions value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableMatchedPermissions().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The map from roles to their included permission matching the permission
+       * query (e.g. containing `policy.role.permissions:`). A sample role string:
+       * "roles/compute.instanceAdmin". The roles can also be found in the
+       * returned `policy` bindings. Note that the map is populated only if
+       * requesting with a permission query.
+       * 
+ * + * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; + */ + + public Builder putAllMatchedPermissions( + java.util.Map values) { + internalGetMutableMatchedPermissions().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) + private static final com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation(); + } + + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Explanation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Explanation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * of the resource associated with this IAM policy.
+   * 
+ * + * string resource = 1; + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * of the resource associated with this IAM policy.
+   * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_FIELD_NUMBER = 3; + private volatile java.lang.Object project_; + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, the project field will be empty.
+   * 
+ * + * string project = 3; + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, the project field will be empty.
+   * 
+ * + * string project = 3; + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_FIELD_NUMBER = 4; + private com.google.iam.v1.Policy policy_; + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g. an empty query), this contains all the bindings.
+   * 
+ * + * .google.iam.v1.Policy policy = 4; + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return policy_ != null; + } + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g. an empty query), this contains all the bindings.
+   * 
+ * + * .google.iam.v1.Policy policy = 4; + * @return The policy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getPolicy() { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g. an empty query), this contains all the bindings.
+   * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + return getPolicy(); + } + + public static final int EXPLANATION_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation_; + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + * @return Whether the explanation field is set. + */ + @java.lang.Override + public boolean hasExplanation() { + return explanation_ != null; + } + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + * @return The explanation. + */ + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getExplanation() { + return explanation_ == null ? com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; + } + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { + return getExplanation(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); + } + if (policy_ != null) { + output.writeMessage(4, getPolicy()); + } + if (explanation_ != null) { + output.writeMessage(5, getExplanation()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); + } + if (policy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPolicy()); + } + if (explanation_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getExplanation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult other = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) obj; + + if (!getResource() + .equals(other.getResource())) return false; + if (!getProject() + .equals(other.getProject())) return false; + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy() + .equals(other.getPolicy())) return false; + } + if (hasExplanation() != other.hasExplanation()) return false; + if (hasExplanation()) { + if (!getExplanation() + .equals(other.getExplanation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + if (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + if (hasExplanation()) { + hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; + hash = (53 * hash) + getExplanation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The result for a IAM Policy search.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult) + com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resource_ = ""; + + project_ = ""; + + if (policyBuilder_ == null) { + policy_ = null; + } else { + policy_ = null; + policyBuilder_ = null; + } + if (explanationBuilder_ == null) { + explanation_ = null; + } else { + explanation_ = null; + explanationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult build() { + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult buildPartial() { + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult result = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult(this); + result.resource_ = resource_; + result.project_ = project_; + if (policyBuilder_ == null) { + result.policy_ = policy_; + } else { + result.policy_ = policyBuilder_.build(); + } + if (explanationBuilder_ == null) { + result.explanation_ = explanation_; + } else { + result.explanation_ = explanationBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.IamPolicySearchResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult other) { + if (other == com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance()) return this; + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + if (other.hasExplanation()) { + mergeExplanation(other.getExplanation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object resource_ = ""; + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * of the resource associated with this IAM policy.
+     * 
+ * + * string resource = 1; + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * of the resource associated with this IAM policy.
+     * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString + getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * of the resource associated with this IAM policy.
+     * 
+ * + * string resource = 1; + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * of the resource associated with this IAM policy.
+     * 
+ * + * string resource = 1; + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + *
+     * The [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * of the resource associated with this IAM policy.
+     * 
+ * + * string resource = 1; + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object project_ = ""; + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, the project field will be empty.
+     * 
+ * + * string project = 3; + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, the project field will be empty.
+     * 
+ * + * string project = 3; + * @return The bytes for project. + */ + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, the project field will be empty.
+     * 
+ * + * string project = 3; + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, the project field will be empty.
+     * 
+ * + * string project = 3; + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + *
+     * The project that the associated GCP resource belongs to, in the form of
+     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+     * instance, Cloud Storage bucket), the project field will indicate the
+     * project that contains the resource. If an IAM policy is set on a folder or
+     * orgnization, the project field will be empty.
+     * 
+ * + * string project = 3; + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + + private com.google.iam.v1.Policy policy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> policyBuilder_; + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return policyBuilder_ != null || policy_ != null; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + * @return The policy. + */ + public com.google.iam.v1.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + public Builder setPolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + onChanged(); + } else { + policyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + public Builder setPolicy( + com.google.iam.v1.Policy.Builder builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + onChanged(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + public Builder mergePolicy(com.google.iam.v1.Policy value) { + if (policyBuilder_ == null) { + if (policy_ != null) { + policy_ = + com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); + } else { + policy_ = value; + } + onChanged(); + } else { + policyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + public Builder clearPolicy() { + if (policyBuilder_ == null) { + policy_ = null; + onChanged(); + } else { + policy_ = null; + policyBuilder_ = null; + } + + return this; + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + public com.google.iam.v1.Policy.Builder getPolicyBuilder() { + + onChanged(); + return getPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null ? + com.google.iam.v1.Policy.getDefaultInstance() : policy_; + } + } + /** + *
+     * The IAM policy directly set on the given resource. Note that the original
+     * IAM policy can contain multiple bindings. This only contains the bindings
+     * that match the given query. For queries that don't contain a constrain on
+     * policies (e.g. an empty query), this contains all the bindings.
+     * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> + getPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( + getPolicy(), + getParentForChildren(), + isClean()); + policy_ = null; + } + return policyBuilder_; + } + + private com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder> explanationBuilder_; + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + * @return Whether the explanation field is set. + */ + public boolean hasExplanation() { + return explanationBuilder_ != null || explanation_ != null; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + * @return The explanation. + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getExplanation() { + if (explanationBuilder_ == null) { + return explanation_ == null ? com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; + } else { + return explanationBuilder_.getMessage(); + } + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + public Builder setExplanation(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation value) { + if (explanationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + explanation_ = value; + onChanged(); + } else { + explanationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + public Builder setExplanation( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder builderForValue) { + if (explanationBuilder_ == null) { + explanation_ = builderForValue.build(); + onChanged(); + } else { + explanationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + public Builder mergeExplanation(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation value) { + if (explanationBuilder_ == null) { + if (explanation_ != null) { + explanation_ = + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.newBuilder(explanation_).mergeFrom(value).buildPartial(); + } else { + explanation_ = value; + } + onChanged(); + } else { + explanationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + public Builder clearExplanation() { + if (explanationBuilder_ == null) { + explanation_ = null; + onChanged(); + } else { + explanation_ = null; + explanationBuilder_ = null; + } + + return this; + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder getExplanationBuilder() { + + onChanged(); + return getExplanationFieldBuilder().getBuilder(); + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { + if (explanationBuilder_ != null) { + return explanationBuilder_.getMessageOrBuilder(); + } else { + return explanation_ == null ? + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; + } + } + /** + *
+     * Explanation about the IAM policy search result. It contains additional
+     * information to explain why the search result matches the query.
+     * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder> + getExplanationFieldBuilder() { + if (explanationBuilder_ == null) { + explanationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder>( + getExplanation(), + getParentForChildren(), + isClean()); + explanation_ = null; + } + return explanationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult) + private static final com.google.cloud.asset.v1p1beta1.IamPolicySearchResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult(); + } + + public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicySearchResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicySearchResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java new file mode 100644 index 000000000000..66b38341f7d0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java @@ -0,0 +1,127 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/assets.proto + +package com.google.cloud.asset.v1p1beta1; + +public interface IamPolicySearchResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.IamPolicySearchResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * of the resource associated with this IAM policy.
+   * 
+ * + * string resource = 1; + * @return The resource. + */ + java.lang.String getResource(); + /** + *
+   * The [full resource
+   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * of the resource associated with this IAM policy.
+   * 
+ * + * string resource = 1; + * @return The bytes for resource. + */ + com.google.protobuf.ByteString + getResourceBytes(); + + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, the project field will be empty.
+   * 
+ * + * string project = 3; + * @return The project. + */ + java.lang.String getProject(); + /** + *
+   * The project that the associated GCP resource belongs to, in the form of
+   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+   * instance, Cloud Storage bucket), the project field will indicate the
+   * project that contains the resource. If an IAM policy is set on a folder or
+   * orgnization, the project field will be empty.
+   * 
+ * + * string project = 3; + * @return The bytes for project. + */ + com.google.protobuf.ByteString + getProjectBytes(); + + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g. an empty query), this contains all the bindings.
+   * 
+ * + * .google.iam.v1.Policy policy = 4; + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g. an empty query), this contains all the bindings.
+   * 
+ * + * .google.iam.v1.Policy policy = 4; + * @return The policy. + */ + com.google.iam.v1.Policy getPolicy(); + /** + *
+   * The IAM policy directly set on the given resource. Note that the original
+   * IAM policy can contain multiple bindings. This only contains the bindings
+   * that match the given query. For queries that don't contain a constrain on
+   * policies (e.g. an empty query), this contains all the bindings.
+   * 
+ * + * .google.iam.v1.Policy policy = 4; + */ + com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); + + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + * @return Whether the explanation field is set. + */ + boolean hasExplanation(); + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + * @return The explanation. + */ + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getExplanation(); + /** + *
+   * Explanation about the IAM policy search result. It contains additional
+   * information to explain why the search result matches the query.
+   * 
+ * + * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; + */ + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java new file mode 100644 index 000000000000..41af01602502 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java @@ -0,0 +1,676 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/assets.proto + +package com.google.cloud.asset.v1p1beta1; + +/** + *
+ * IAM permissions
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.Permissions} + */ +public final class Permissions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.Permissions) + PermissionsOrBuilder { +private static final long serialVersionUID = 0L; + // Use Permissions.newBuilder() to construct. + private Permissions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Permissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Permissions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Permissions( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + permissions_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.Permissions.class, com.google.cloud.asset.v1p1beta1.Permissions.Builder.class); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList permissions_; + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList + getPermissionsList() { + return permissions_; + } + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString + getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < permissions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < permissions_.size(); i++) { + dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPermissionsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.Permissions)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.Permissions other = (com.google.cloud.asset.v1p1beta1.Permissions) obj; + + if (!getPermissionsList() + .equals(other.getPermissionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.Permissions prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * IAM permissions
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.Permissions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.Permissions) + com.google.cloud.asset.v1p1beta1.PermissionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.Permissions.class, com.google.cloud.asset.v1p1beta1.Permissions.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.Permissions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.Permissions getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.Permissions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.Permissions build() { + com.google.cloud.asset.v1p1beta1.Permissions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.Permissions buildPartial() { + com.google.cloud.asset.v1p1beta1.Permissions result = new com.google.cloud.asset.v1p1beta1.Permissions(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.permissions_ = permissions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.Permissions) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.Permissions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.Permissions other) { + if (other == com.google.cloud.asset.v1p1beta1.Permissions.getDefaultInstance()) return this; + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.Permissions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.Permissions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePermissionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList + getPermissionsList() { + return permissions_.getUnmodifiableView(); + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString + getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @param index The index to set the value at. + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @param value The permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissions( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @param values The permissions to add. + * @return This builder for chaining. + */ + public Builder addAllPermissions( + java.lang.Iterable values) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, permissions_); + onChanged(); + return this; + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @return This builder for chaining. + */ + public Builder clearPermissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of permissions. A sample permission string: "compute.disk.get".
+     * 
+ * + * repeated string permissions = 1; + * @param value The bytes of the permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissionsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.Permissions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.Permissions) + private static final com.google.cloud.asset.v1p1beta1.Permissions DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.Permissions(); + } + + public static com.google.cloud.asset.v1p1beta1.Permissions getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Permissions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Permissions(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.Permissions getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java new file mode 100644 index 000000000000..ef7bee9844a3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java @@ -0,0 +1,50 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/assets.proto + +package com.google.cloud.asset.v1p1beta1; + +public interface PermissionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.Permissions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @return A list containing the permissions. + */ + java.util.List + getPermissionsList(); + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @return The count of permissions. + */ + int getPermissionsCount(); + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + java.lang.String getPermissions(int index); + /** + *
+   * A list of permissions. A sample permission string: "compute.disk.get".
+   * 
+ * + * repeated string permissions = 1; + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + com.google.protobuf.ByteString + getPermissionsBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java new file mode 100644 index 000000000000..6c2f777c0701 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java @@ -0,0 +1,1096 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +/** + *
+ * Search all IAM policies request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} + */ +public final class SearchAllIamPoliciesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) + SearchAllIamPoliciesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllIamPoliciesRequest.newBuilder() to construct. + private SearchAllIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllIamPoliciesRequest() { + scope_ = ""; + query_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllIamPoliciesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllIamPoliciesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + private volatile java.lang.Object query_; + /** + *
+   * Optional. The query statement.
+   * Examples:
+   * * "policy:myuser@mydomain.com"
+   * * "policy:(myuser@mydomain.com viewer)"
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Optional. The query statement.
+   * Examples:
+   * * "policy:myuser@mydomain.com"
+   * * "policy:(myuser@mydomain.com viewer)"
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding call to
+   * this method. `page_token` must be the value of `next_page_token` from the
+   * previous response. The values of all other method parameters must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding call to
+   * this method. `page_token` must be the value of `next_page_token` from the
+   * previous response. The values of all other method parameters must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest other = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) obj; + + if (!getScope() + .equals(other.getScope())) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all IAM policies request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + scope_ = ""; + + query_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest build() { + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest buildPartial() { + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest result = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(this); + result.scope_ = scope_; + result.query_ = query_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest other) { + if (other == com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.getDefaultInstance()) return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object scope_ = ""; + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = getDefaultInstance().getScope(); + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scope_ = value; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Optional. The query statement.
+     * Examples:
+     * * "policy:myuser@mydomain.com"
+     * * "policy:(myuser@mydomain.com viewer)"
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The query statement.
+     * Examples:
+     * * "policy:myuser@mydomain.com"
+     * * "policy:(myuser@mydomain.com viewer)"
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The query statement.
+     * Examples:
+     * * "policy:myuser@mydomain.com"
+     * * "policy:(myuser@mydomain.com viewer)"
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement.
+     * Examples:
+     * * "policy:myuser@mydomain.com"
+     * * "policy:(myuser@mydomain.com viewer)"
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement.
+     * Examples:
+     * * "policy:myuser@mydomain.com"
+     * * "policy:(myuser@mydomain.com viewer)"
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding call to
+     * this method. `page_token` must be the value of `next_page_token` from the
+     * previous response. The values of all other method parameters must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding call to
+     * this method. `page_token` must be the value of `next_page_token` from the
+     * previous response. The values of all other method parameters must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding call to
+     * this method. `page_token` must be the value of `next_page_token` from the
+     * previous response. The values of all other method parameters must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding call to
+     * this method. `page_token` must be the value of `next_page_token` from the
+     * previous response. The values of all other method parameters must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Optional. If present, retrieve the next batch of results from the preceding call to
+     * this method. `page_token` must be the value of `next_page_token` from the
+     * previous response. The values of all other method parameters must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) + private static final com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(); + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllIamPoliciesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllIamPoliciesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..afcbed816785 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java @@ -0,0 +1,104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +public interface SearchAllIamPoliciesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + java.lang.String getScope(); + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + com.google.protobuf.ByteString + getScopeBytes(); + + /** + *
+   * Optional. The query statement.
+   * Examples:
+   * * "policy:myuser@mydomain.com"
+   * * "policy:(myuser@mydomain.com viewer)"
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Optional. The query statement.
+   * Examples:
+   * * "policy:myuser@mydomain.com"
+   * * "policy:(myuser@mydomain.com viewer)"
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + + /** + *
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding call to
+   * this method. `page_token` must be the value of `next_page_token` from the
+   * previous response. The values of all other method parameters must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. If present, retrieve the next batch of results from the preceding call to
+   * this method. `page_token` must be the value of `next_page_token` from the
+   * previous response. The values of all other method parameters must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java new file mode 100644 index 000000000000..7b8d7fddff71 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java @@ -0,0 +1,1075 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +/** + *
+ * Search all IAM policies response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} + */ +public final class SearchAllIamPoliciesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) + SearchAllIamPoliciesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllIamPoliciesResponse.newBuilder() to construct. + private SearchAllIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllIamPoliciesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllIamPoliciesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllIamPoliciesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) { + return results_.get(index); + } + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse other = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) obj; + + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all IAM policies response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse build() { + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse buildPartial() { + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse result = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse other) { + if (other == com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.getDefaultInstance()) return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder> resultsBuilder_; + + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder addResults(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder addResults( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance()); + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance()); + } + /** + *
+     * A list of IamPolicy that match the search query. Related information such
+     * as the associated resource is returned along with the policy.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Set if there are more results than those appearing in this response; to get
+     * the next set of results, call this method again, using this value as the
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) + private static final com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(); + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllIamPoliciesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllIamPoliciesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..eb39db5c90dd --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java @@ -0,0 +1,82 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +public interface SearchAllIamPoliciesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + java.util.List + getResultsList(); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + int getResultsCount(); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * A list of IamPolicy that match the search query. Related information such
+   * as the associated resource is returned along with the policy.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; + */ + com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Set if there are more results than those appearing in this response; to get
+   * the next set of results, call this method again, using this value as the
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java new file mode 100644 index 000000000000..026f16c774fc --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java @@ -0,0 +1,1522 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +/** + *
+ * Search all resources request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} + */ +public final class SearchAllResourcesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) + SearchAllResourcesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllResourcesRequest.newBuilder() to construct. + private SearchAllResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllResourcesRequest() { + scope_ = ""; + query_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pageToken_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllResourcesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllResourcesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: { + + pageSize_ = input.readInt32(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } + } + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + private volatile java.lang.Object query_; + /** + *
+   * Optional. The query statement.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } + } + /** + *
+   * Optional. The query statement.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + *
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pageToken_; + /** + *
+   * Optional. If present, then retrieve the next batch of results from the preceding call
+   * to this method.  `page_token` must be the value of `next_page_token` from
+   * the previous response. The values of all other method parameters, must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * Optional. If present, then retrieve the next batch of results from the preceding call
+   * to this method.  `page_token` must be the value of `next_page_token` from
+   * the previous response. The values of all other method parameters, must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 10; + private volatile java.lang.Object orderBy_; + /** + *
+   * Optional. A comma separated list of fields specifying the sorting order of the
+   * results. The default order is ascending. Add " desc" after the field name
+   * to indicate descending order. Redundant space characters are ignored. For
+   * example, "  foo ,  bar  desc  ".
+   * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + /** + *
+   * Optional. A comma separated list of fields specifying the sorting order of the
+   * results. The default order is ascending. Add " desc" after the field name
+   * to indicate descending order. Redundant space characters are ignored. For
+   * example, "  foo ,  bar  desc  ".
+   * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, orderBy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, orderBy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest other = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) obj; + + if (!getScope() + .equals(other.getScope())) return false; + if (!getQuery() + .equals(other.getQuery())) return false; + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!getOrderBy() + .equals(other.getOrderBy())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all resources request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + scope_ = ""; + + query_ = ""; + + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + pageSize_ = 0; + + pageToken_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest build() { + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest buildPartial() { + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest result = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(this); + int from_bitField0_ = bitField0_; + result.scope_ = scope_; + result.query_ = query_; + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.orderBy_ = orderBy_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest other) { + if (other == com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.getDefaultInstance()) return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object scope_ = ""; + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString + getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = getDefaultInstance().getScope(); + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of an asset. The search is limited to the resources
+     * within the `scope`. The allowed value must be:
+     * * Organization number (such as "organizations/123")
+     * * Folder number(such as "folders/1234")
+     * * Project number (such as "projects/12345")
+     * * Project id (such as "projects/abc")
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scope_ = value; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + *
+     * Optional. The query statement.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. The query statement.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. The query statement.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + *
+     * Optional. The query statement.
+     * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Optional. A list of asset types that this request searches for. If empty, it will
+     * search all the supported asset types.
+     * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. The page size for search result pagination. Page size is capped at 500 even
+     * if a larger value is given. If set to zero, server will pick an appropriate
+     * default. Returned results may be fewer than requested. When this happens,
+     * there could be more results as long as `next_page_token` is returned.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * Optional. If present, then retrieve the next batch of results from the preceding call
+     * to this method.  `page_token` must be the value of `next_page_token` from
+     * the previous response. The values of all other method parameters, must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the preceding call
+     * to this method.  `page_token` must be the value of `next_page_token` from
+     * the previous response. The values of all other method parameters, must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the preceding call
+     * to this method.  `page_token` must be the value of `next_page_token` from
+     * the previous response. The values of all other method parameters, must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the preceding call
+     * to this method.  `page_token` must be the value of `next_page_token` from
+     * the previous response. The values of all other method parameters, must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * Optional. If present, then retrieve the next batch of results from the preceding call
+     * to this method.  `page_token` must be the value of `next_page_token` from
+     * the previous response. The values of all other method parameters, must be
+     * identical to those in the previous call.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Optional. A comma separated list of fields specifying the sorting order of the
+     * results. The default order is ascending. Add " desc" after the field name
+     * to indicate descending order. Redundant space characters are ignored. For
+     * example, "  foo ,  bar  desc  ".
+     * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Optional. A comma separated list of fields specifying the sorting order of the
+     * results. The default order is ascending. Add " desc" after the field name
+     * to indicate descending order. Redundant space characters are ignored. For
+     * example, "  foo ,  bar  desc  ".
+     * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString + getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Optional. A comma separated list of fields specifying the sorting order of the
+     * results. The default order is ascending. Add " desc" after the field name
+     * to indicate descending order. Redundant space characters are ignored. For
+     * example, "  foo ,  bar  desc  ".
+     * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. A comma separated list of fields specifying the sorting order of the
+     * results. The default order is ascending. Add " desc" after the field name
+     * to indicate descending order. Redundant space characters are ignored. For
+     * example, "  foo ,  bar  desc  ".
+     * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Optional. A comma separated list of fields specifying the sorting order of the
+     * results. The default order is ascending. Add " desc" after the field name
+     * to indicate descending order. Redundant space characters are ignored. For
+     * example, "  foo ,  bar  desc  ".
+     * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) + private static final com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(); + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllResourcesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllResourcesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java new file mode 100644 index 000000000000..ac30746283bf --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java @@ -0,0 +1,169 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +public interface SearchAllResourcesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scope. + */ + java.lang.String getScope(); + /** + *
+   * Required. The relative name of an asset. The search is limited to the resources
+   * within the `scope`. The allowed value must be:
+   * * Organization number (such as "organizations/123")
+   * * Folder number(such as "folders/1234")
+   * * Project number (such as "projects/12345")
+   * * Project id (such as "projects/abc")
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scope. + */ + com.google.protobuf.ByteString + getScopeBytes(); + + /** + *
+   * Optional. The query statement.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+   * Optional. The query statement.
+   * 
+ * + * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * Optional. A list of asset types that this request searches for. If empty, it will
+   * search all the supported asset types.
+   * 
+ * + * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Optional. The page size for search result pagination. Page size is capped at 500 even
+   * if a larger value is given. If set to zero, server will pick an appropriate
+   * default. Returned results may be fewer than requested. When this happens,
+   * there could be more results as long as `next_page_token` is returned.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * Optional. If present, then retrieve the next batch of results from the preceding call
+   * to this method.  `page_token` must be the value of `next_page_token` from
+   * the previous response. The values of all other method parameters, must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * Optional. If present, then retrieve the next batch of results from the preceding call
+   * to this method.  `page_token` must be the value of `next_page_token` from
+   * the previous response. The values of all other method parameters, must be
+   * identical to those in the previous call.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); + + /** + *
+   * Optional. A comma separated list of fields specifying the sorting order of the
+   * results. The default order is ascending. Add " desc" after the field name
+   * to indicate descending order. Redundant space characters are ignored. For
+   * example, "  foo ,  bar  desc  ".
+   * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + *
+   * Optional. A comma separated list of fields specifying the sorting order of the
+   * results. The default order is ascending. Add " desc" after the field name
+   * to indicate descending order. Redundant space characters are ignored. For
+   * example, "  foo ,  bar  desc  ".
+   * 
+ * + * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString + getOrderByBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java new file mode 100644 index 000000000000..ddd19c83b0cc --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java @@ -0,0 +1,1052 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +/** + *
+ * Search all resources response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} + */ +public final class SearchAllResourcesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) + SearchAllResourcesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use SearchAllResourcesResponse.newBuilder() to construct. + private SearchAllResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchAllResourcesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchAllResourcesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchAllResourcesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List results_; + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + @java.lang.Override + public java.util.List getResultsList() { + return results_; + } + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + @java.lang.Override + public java.util.List + getResultsOrBuilderList() { + return results_; + } + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + @java.lang.Override + public int getResultsCount() { + return results_.size(); + } + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) { + return results_.get(index); + } + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder( + int index) { + return results_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included.  To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included.  To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < results_.size(); i++) { + output.writeMessage(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < results_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, results_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse other = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) obj; + + if (!getResultsList() + .equals(other.getResultsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResultsCount() > 0) { + hash = (37 * hash) + RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getResultsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Search all resources response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getResultsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resultsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse build() { + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse buildPartial() { + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse result = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(this); + int from_bitField0_ = bitField0_; + if (resultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + results_ = java.util.Collections.unmodifiableList(results_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.results_ = results_; + } else { + result.results_ = resultsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse other) { + if (other == com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.getDefaultInstance()) return this; + if (resultsBuilder_ == null) { + if (!other.results_.isEmpty()) { + if (results_.isEmpty()) { + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResultsIsMutable(); + results_.addAll(other.results_); + } + onChanged(); + } + } else { + if (!other.results_.isEmpty()) { + if (resultsBuilder_.isEmpty()) { + resultsBuilder_.dispose(); + resultsBuilder_ = null; + results_ = other.results_; + bitField0_ = (bitField0_ & ~0x00000001); + resultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getResultsFieldBuilder() : null; + } else { + resultsBuilder_.addAllMessages(other.results_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List results_ = + java.util.Collections.emptyList(); + private void ensureResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList(results_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder> resultsBuilder_; + + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public java.util.List getResultsList() { + if (resultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(results_); + } else { + return resultsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public int getResultsCount() { + if (resultsBuilder_ == null) { + return results_.size(); + } else { + return resultsBuilder_.getCount(); + } + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) { + if (resultsBuilder_ == null) { + return results_.get(index); + } else { + return resultsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.set(index, value); + onChanged(); + } else { + resultsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder setResults( + int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.set(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder addResults(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(value); + onChanged(); + } else { + resultsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) { + if (resultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResultsIsMutable(); + results_.add(index, value); + onChanged(); + } else { + resultsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder addResults( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder addResults( + int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(index, builderForValue.build()); + onChanged(); + } else { + resultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder addAllResults( + java.lang.Iterable values) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, results_); + onChanged(); + } else { + resultsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder clearResults() { + if (resultsBuilder_ == null) { + results_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resultsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public Builder removeResults(int index) { + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.remove(index); + onChanged(); + } else { + resultsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder getResultsBuilder( + int index) { + return getResultsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder( + int index) { + if (resultsBuilder_ == null) { + return results_.get(index); } else { + return resultsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public java.util.List + getResultsOrBuilderList() { + if (resultsBuilder_ != null) { + return resultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(results_); + } + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder() { + return getResultsFieldBuilder().addBuilder( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance()); + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder( + int index) { + return getResultsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance()); + } + /** + *
+     * A list of resource that match the search query.
+     * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + public java.util.List + getResultsBuilderList() { + return getResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder> + getResultsFieldBuilder() { + if (resultsBuilder_ == null) { + resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>( + results_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + results_ = null; + } + return resultsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included.  To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included.  To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included.  To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included.  To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * If there are more results than those appearing in this response, then
+     * `next_page_token` is included.  To get the next set of results, call this
+     * method again using the value of `next_page_token` as `page_token`.
+     * 
+ * + * string next_page_token = 2; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) + private static final com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(); + } + + public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAllResourcesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchAllResourcesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java new file mode 100644 index 000000000000..cea3d70ab592 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/asset_service.proto + +package com.google.cloud.asset.v1p1beta1; + +public interface SearchAllResourcesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + java.util.List + getResultsList(); + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index); + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + int getResultsCount(); + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + java.util.List + getResultsOrBuilderList(); + /** + *
+   * A list of resource that match the search query.
+   * 
+ * + * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; + */ + com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder( + int index); + + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included.  To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * If there are more results than those appearing in this response, then
+   * `next_page_token` is included.  To get the next set of results, call this
+   * method again using the value of `next_page_token` as `page_token`.
+   * 
+ * + * string next_page_token = 2; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java new file mode 100644 index 000000000000..f69059be507c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java @@ -0,0 +1,2389 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/assets.proto + +package com.google.cloud.asset.v1p1beta1; + +/** + *
+ * The standard metadata of a cloud resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.StandardResourceMetadata} + */ +public final class StandardResourceMetadata extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.StandardResourceMetadata) + StandardResourceMetadataOrBuilder { +private static final long serialVersionUID = 0L; + // Use StandardResourceMetadata.newBuilder() to construct. + private StandardResourceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StandardResourceMetadata() { + name_ = ""; + assetType_ = ""; + project_ = ""; + displayName_ = ""; + description_ = ""; + additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + location_ = ""; + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StandardResourceMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StandardResourceMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + additionalAttributes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + additionalAttributes_.add(s); + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + location_ = s; + break; + } + case 98: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + labels__ = input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + labels_.getMutableMap().put( + labels__.getKey(), labels__.getValue()); + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + networkTags_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + additionalAttributes_ = additionalAttributes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.class, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The full resource name. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The full resource name. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of this resource.
+   * For example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of this resource.
+   * For example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_FIELD_NUMBER = 3; + private volatile java.lang.Object project_; + /** + *
+   * The project that this resource belongs to, in the form of
+   * `projects/{project_number}`.
+   * 
+ * + * string project = 3; + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } + } + /** + *
+   * The project that this resource belongs to, in the form of
+   * `projects/{project_number}`.
+   * 
+ * + * string project = 3; + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object displayName_; + /** + *
+   * The display name of this resource.
+   * 
+ * + * string display_name = 4; + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + *
+   * The display name of this resource.
+   * 
+ * + * string display_name = 4; + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + private volatile java.lang.Object description_; + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes.
+   * 
+ * + * string description = 5; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes.
+   * 
+ * + * string description = 5; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDITIONAL_ATTRIBUTES_FIELD_NUMBER = 10; + private com.google.protobuf.LazyStringList additionalAttributes_; + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @return A list containing the additionalAttributes. + */ + public com.google.protobuf.ProtocolStringList + getAdditionalAttributesList() { + return additionalAttributes_; + } + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @return The count of additionalAttributes. + */ + public int getAdditionalAttributesCount() { + return additionalAttributes_.size(); + } + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @param index The index of the element to return. + * @return The additionalAttributes at the given index. + */ + public java.lang.String getAdditionalAttributes(int index) { + return additionalAttributes_.get(index); + } + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @param index The index of the value to return. + * @return The bytes of the additionalAttributes at the given index. + */ + public com.google.protobuf.ByteString + getAdditionalAttributesBytes(int index) { + return additionalAttributes_.getByteString(index); + } + + public static final int LOCATION_FIELD_NUMBER = 11; + private volatile java.lang.Object location_; + /** + *
+   * Location can be "global", regional like "us-east1", or zonal like
+   * "us-west1-b".
+   * 
+ * + * string location = 11; + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + *
+   * Location can be "global", regional like "us-east1", or zonal like
+   * "us-west1-b".
+   * 
+ * + * string location = 11; + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 12; + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NETWORK_TAGS_FIELD_NUMBER = 13; + private com.google.protobuf.LazyStringList networkTags_; + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList + getNetworkTagsList() { + return networkTags_; + } + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString + getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + for (int i = 0; i < additionalAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, additionalAttributes_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, location_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetLabels(), + LabelsDefaultEntryHolder.defaultEntry, + 12); + for (int i = 0; i < networkTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, networkTags_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + { + int dataSize = 0; + for (int i = 0; i < additionalAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(additionalAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdditionalAttributesList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, location_); + } + for (java.util.Map.Entry entry + : internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry + labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, labels__); + } + { + int dataSize = 0; + for (int i = 0; i < networkTags_.size(); i++) { + dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); + } + size += dataSize; + size += 1 * getNetworkTagsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p1beta1.StandardResourceMetadata)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata other = (com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (!getProject() + .equals(other.getProject())) return false; + if (!getDisplayName() + .equals(other.getDisplayName())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getAdditionalAttributesList() + .equals(other.getAdditionalAttributesList())) return false; + if (!getLocation() + .equals(other.getLocation())) return false; + if (!internalGetLabels().equals( + other.internalGetLabels())) return false; + if (!getNetworkTagsList() + .equals(other.getNetworkTagsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + hash = (37 * hash) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getAdditionalAttributesCount() > 0) { + hash = (37 * hash) + ADDITIONAL_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalAttributesList().hashCode(); + } + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (getNetworkTagsCount() > 0) { + hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getNetworkTagsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The standard metadata of a cloud resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.StandardResourceMetadata} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.StandardResourceMetadata) + com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 12: + return internalGetMutableLabels(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.class, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + assetType_ = ""; + + project_ = ""; + + displayName_ = ""; + + description_ = ""; + + additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + location_ = ""; + + internalGetMutableLabels().clear(); + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getDefaultInstanceForType() { + return com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata build() { + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata buildPartial() { + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata result = new com.google.cloud.asset.v1p1beta1.StandardResourceMetadata(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.assetType_ = assetType_; + result.project_ = project_; + result.displayName_ = displayName_; + result.description_ = description_; + if (((bitField0_ & 0x00000001) != 0)) { + additionalAttributes_ = additionalAttributes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.additionalAttributes_ = additionalAttributes_; + result.location_ = location_; + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + if (((bitField0_ & 0x00000004) != 0)) { + networkTags_ = networkTags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.networkTags_ = networkTags_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) { + return mergeFrom((com.google.cloud.asset.v1p1beta1.StandardResourceMetadata)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata other) { + if (other == com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.getProject().isEmpty()) { + project_ = other.project_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.additionalAttributes_.isEmpty()) { + if (additionalAttributes_.isEmpty()) { + additionalAttributes_ = other.additionalAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdditionalAttributesIsMutable(); + additionalAttributes_.addAll(other.additionalAttributes_); + } + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + internalGetMutableLabels().mergeFrom( + other.internalGetLabels()); + if (!other.networkTags_.isEmpty()) { + if (networkTags_.isEmpty()) { + networkTags_ = other.networkTags_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNetworkTagsIsMutable(); + networkTags_.addAll(other.networkTags_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The full resource name. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full resource name. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full resource name. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The full resource name. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The full resource name. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of this resource.
+     * For example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of this resource.
+     * For example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of this resource.
+     * For example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of this resource.
+     * For example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of this resource.
+     * For example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private java.lang.Object project_ = ""; + /** + *
+     * The project that this resource belongs to, in the form of
+     * `projects/{project_number}`.
+     * 
+ * + * string project = 3; + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * `projects/{project_number}`.
+     * 
+ * + * string project = 3; + * @return The bytes for project. + */ + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * `projects/{project_number}`.
+     * 
+ * + * string project = 3; + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + project_ = value; + onChanged(); + return this; + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * `projects/{project_number}`.
+     * 
+ * + * string project = 3; + * @return This builder for chaining. + */ + public Builder clearProject() { + + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + *
+     * The project that this resource belongs to, in the form of
+     * `projects/{project_number}`.
+     * 
+ * + * string project = 3; + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + project_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + *
+     * The display name of this resource.
+     * 
+ * + * string display_name = 4; + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The display name of this resource.
+     * 
+ * + * string display_name = 4; + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The display name of this resource.
+     * 
+ * + * string display_name = 4; + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + *
+     * The display name of this resource.
+     * 
+ * + * string display_name = 4; + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + *
+     * The display name of this resource.
+     * 
+ * + * string display_name = 4; + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes.
+     * 
+ * + * string description = 5; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes.
+     * 
+ * + * string description = 5; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes.
+     * 
+ * + * string description = 5; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes.
+     * 
+ * + * string description = 5; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+     * One or more paragraphs of text description of this resource. Maximum length
+     * could be up to 1M bytes.
+     * 
+ * + * string description = 5; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAdditionalAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + additionalAttributes_ = new com.google.protobuf.LazyStringArrayList(additionalAttributes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @return A list containing the additionalAttributes. + */ + public com.google.protobuf.ProtocolStringList + getAdditionalAttributesList() { + return additionalAttributes_.getUnmodifiableView(); + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @return The count of additionalAttributes. + */ + public int getAdditionalAttributesCount() { + return additionalAttributes_.size(); + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @param index The index of the element to return. + * @return The additionalAttributes at the given index. + */ + public java.lang.String getAdditionalAttributes(int index) { + return additionalAttributes_.get(index); + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @param index The index of the value to return. + * @return The bytes of the additionalAttributes at the given index. + */ + public com.google.protobuf.ByteString + getAdditionalAttributesBytes(int index) { + return additionalAttributes_.getByteString(index); + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @param index The index to set the value at. + * @param value The additionalAttributes to set. + * @return This builder for chaining. + */ + public Builder setAdditionalAttributes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalAttributesIsMutable(); + additionalAttributes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @param value The additionalAttributes to add. + * @return This builder for chaining. + */ + public Builder addAdditionalAttributes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdditionalAttributesIsMutable(); + additionalAttributes_.add(value); + onChanged(); + return this; + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @param values The additionalAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllAdditionalAttributes( + java.lang.Iterable values) { + ensureAdditionalAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, additionalAttributes_); + onChanged(); + return this; + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @return This builder for chaining. + */ + public Builder clearAdditionalAttributes() { + additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Additional searchable attributes of this resource.
+     * Informational only. The exact set of attributes is subject to change.
+     * For example: project id, DNS name etc.
+     * 
+ * + * repeated string additional_attributes = 10; + * @param value The bytes of the additionalAttributes to add. + * @return This builder for chaining. + */ + public Builder addAdditionalAttributesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdditionalAttributesIsMutable(); + additionalAttributes_.add(value); + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + *
+     * Location can be "global", regional like "us-east1", or zonal like
+     * "us-west1-b".
+     * 
+ * + * string location = 11; + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Location can be "global", regional like "us-east1", or zonal like
+     * "us-west1-b".
+     * 
+ * + * string location = 11; + * @return The bytes for location. + */ + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Location can be "global", regional like "us-east1", or zonal like
+     * "us-west1-b".
+     * 
+ * + * string location = 11; + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + *
+     * Location can be "global", regional like "us-east1", or zonal like
+     * "us-west1-b".
+     * 
+ * + * string location = 11; + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + *
+     * Location can be "global", regional like "us-east1", or zonal like
+     * "us-west1-b".
+     * 
+ * + * string location = 11; + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> labels_; + private com.google.protobuf.MapField + internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged();; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField( + LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * map<string, string> labels = 12; + */ + + @java.lang.Override + public boolean containsLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetLabels().getMap().containsKey(key); + } + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + + public java.lang.String getLabelsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * map<string, string> labels = 12; + */ + @java.lang.Override + + public java.lang.String getLabelsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap() + .clear(); + return this; + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * map<string, string> labels = 12; + */ + + public Builder removeLabels( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableLabels().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * map<string, string> labels = 12; + */ + public Builder putLabels( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLabels().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * Labels associated with this resource. See [Labelling and grouping GCP
+     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * map<string, string> labels = 12; + */ + + public Builder putAllLabels( + java.util.Map values) { + internalGetMutableLabels().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureNetworkTagsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + bitField0_ |= 0x00000004; + } + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList + getNetworkTagsList() { + return networkTags_.getUnmodifiableView(); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString + getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. + */ + public Builder setNetworkTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @param value The networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @param values The networkTags to add. + * @return This builder for chaining. + */ + public Builder addAllNetworkTags( + java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, networkTags_); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @return This builder for chaining. + */ + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * Network tags associated with this resource. Like labels, network tags are a
+     * type of annotations used to group GCP resources. See [Labelling GCP
+     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+     * for more information.
+     * 
+ * + * repeated string network_tags = 13; + * @param value The bytes of the networkTags to add. + * @return This builder for chaining. + */ + public Builder addNetworkTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.StandardResourceMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.StandardResourceMetadata) + private static final com.google.cloud.asset.v1p1beta1.StandardResourceMetadata DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.StandardResourceMetadata(); + } + + public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StandardResourceMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StandardResourceMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java new file mode 100644 index 000000000000..5a4547c2da3f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java @@ -0,0 +1,313 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p1beta1/assets.proto + +package com.google.cloud.asset.v1p1beta1; + +public interface StandardResourceMetadataOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.StandardResourceMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The full resource name. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The full resource name. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of this resource.
+   * For example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of this resource.
+   * For example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * The project that this resource belongs to, in the form of
+   * `projects/{project_number}`.
+   * 
+ * + * string project = 3; + * @return The project. + */ + java.lang.String getProject(); + /** + *
+   * The project that this resource belongs to, in the form of
+   * `projects/{project_number}`.
+   * 
+ * + * string project = 3; + * @return The bytes for project. + */ + com.google.protobuf.ByteString + getProjectBytes(); + + /** + *
+   * The display name of this resource.
+   * 
+ * + * string display_name = 4; + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + *
+   * The display name of this resource.
+   * 
+ * + * string display_name = 4; + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes.
+   * 
+ * + * string description = 5; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * One or more paragraphs of text description of this resource. Maximum length
+   * could be up to 1M bytes.
+   * 
+ * + * string description = 5; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @return A list containing the additionalAttributes. + */ + java.util.List + getAdditionalAttributesList(); + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @return The count of additionalAttributes. + */ + int getAdditionalAttributesCount(); + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @param index The index of the element to return. + * @return The additionalAttributes at the given index. + */ + java.lang.String getAdditionalAttributes(int index); + /** + *
+   * Additional searchable attributes of this resource.
+   * Informational only. The exact set of attributes is subject to change.
+   * For example: project id, DNS name etc.
+   * 
+ * + * repeated string additional_attributes = 10; + * @param index The index of the value to return. + * @return The bytes of the additionalAttributes at the given index. + */ + com.google.protobuf.ByteString + getAdditionalAttributesBytes(int index); + + /** + *
+   * Location can be "global", regional like "us-east1", or zonal like
+   * "us-west1-b".
+   * 
+ * + * string location = 11; + * @return The location. + */ + java.lang.String getLocation(); + /** + *
+   * Location can be "global", regional like "us-east1", or zonal like
+   * "us-west1-b".
+   * 
+ * + * string location = 11; + * @return The bytes for location. + */ + com.google.protobuf.ByteString + getLocationBytes(); + + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + int getLabelsCount(); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + boolean containsLabels( + java.lang.String key); + /** + * Use {@link #getLabelsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getLabels(); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + java.util.Map + getLabelsMap(); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + + /* nullable */ +java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * Labels associated with this resource. See [Labelling and grouping GCP
+   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * map<string, string> labels = 12; + */ + + java.lang.String getLabelsOrThrow( + java.lang.String key); + + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @return A list containing the networkTags. + */ + java.util.List + getNetworkTagsList(); + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @return The count of networkTags. + */ + int getNetworkTagsCount(); + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + java.lang.String getNetworkTags(int index); + /** + *
+   * Network tags associated with this resource. Like labels, network tags are a
+   * type of annotations used to group GCP resources. See [Labelling GCP
+   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
+   * for more information.
+   * 
+ * + * repeated string network_tags = 13; + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + com.google.protobuf.ByteString + getNetworkTagsBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto new file mode 100644 index 000000000000..d5a0d8c41b7f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto @@ -0,0 +1,149 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/asset/v1p1beta1/assets.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p1beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Searches all the resources under a given accessible CRM scope + // (project/folder/organization). This RPC gives callers + // especially admins the ability to search all the resources under a scope, + // even if they don't have .get permission of all the resources. Callers + // should have cloud.assets.SearchAllResources permission on the requested + // scope, otherwise it will be rejected. + rpc SearchAllResources(SearchAllResourcesRequest) returns (SearchAllResourcesResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{scope=*/*}/resources:searchAll" + }; + option (google.api.method_signature) = "scope,query,asset_types"; + } + + // Searches all the IAM policies under a given accessible CRM scope + // (project/folder/organization). This RPC gives callers + // especially admins the ability to search all the IAM policies under a scope, + // even if they don't have .getIamPolicy permission of all the IAM policies. + // Callers should have cloud.assets.SearchAllIamPolicies permission on the + // requested scope, otherwise it will be rejected. + rpc SearchAllIamPolicies(SearchAllIamPoliciesRequest) returns (SearchAllIamPoliciesResponse) { + option (google.api.http) = { + get: "/v1p1beta1/{scope=*/*}/iamPolicies:searchAll" + }; + option (google.api.method_signature) = "scope,query"; + } +} + +// Search all resources request. +message SearchAllResourcesRequest { + // Required. The relative name of an asset. The search is limited to the resources + // within the `scope`. The allowed value must be: + // * Organization number (such as "organizations/123") + // * Folder number(such as "folders/1234") + // * Project number (such as "projects/12345") + // * Project id (such as "projects/abc") + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of asset types that this request searches for. If empty, it will + // search all the supported asset types. + repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, then retrieve the next batch of results from the preceding call + // to this method. `page_token` must be the value of `next_page_token` from + // the previous response. The values of all other method parameters, must be + // identical to those in the previous call. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma separated list of fields specifying the sorting order of the + // results. The default order is ascending. Add " desc" after the field name + // to indicate descending order. Redundant space characters are ignored. For + // example, " foo , bar desc ". + string order_by = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all resources response. +message SearchAllResourcesResponse { + // A list of resource that match the search query. + repeated StandardResourceMetadata results = 1; + + // If there are more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; +} + +// Search all IAM policies request. +message SearchAllIamPoliciesRequest { + // Required. The relative name of an asset. The search is limited to the resources + // within the `scope`. The allowed value must be: + // * Organization number (such as "organizations/123") + // * Folder number(such as "folders/1234") + // * Project number (such as "projects/12345") + // * Project id (such as "projects/abc") + string scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The query statement. + // Examples: + // * "policy:myuser@mydomain.com" + // * "policy:(myuser@mydomain.com viewer)" + string query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page size for search result pagination. Page size is capped at 500 even + // if a larger value is given. If set to zero, server will pick an appropriate + // default. Returned results may be fewer than requested. When this happens, + // there could be more results as long as `next_page_token` is returned. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If present, retrieve the next batch of results from the preceding call to + // this method. `page_token` must be the value of `next_page_token` from the + // previous response. The values of all other method parameters must be + // identical to those in the previous call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Search all IAM policies response. +message SearchAllIamPoliciesResponse { + // A list of IamPolicy that match the search query. Related information such + // as the associated resource is returned along with the policy. + repeated IamPolicySearchResult results = 1; + + // Set if there are more results than those appearing in this response; to get + // the next set of results, call this method again, using this value as the + // `page_token`. + string next_page_token = 2; +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto new file mode 100644 index 000000000000..c0ac1403acc8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto @@ -0,0 +1,113 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p1beta1; + +import "google/iam/v1/policy.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p1beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1"; + +// The standard metadata of a cloud resource. +message StandardResourceMetadata { + // The full resource name. For example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string name = 1; + + // The type of this resource. + // For example: "compute.googleapis.com/Disk". + string asset_type = 2; + + // The project that this resource belongs to, in the form of + // `projects/{project_number}`. + string project = 3; + + // The display name of this resource. + string display_name = 4; + + // One or more paragraphs of text description of this resource. Maximum length + // could be up to 1M bytes. + string description = 5; + + // Additional searchable attributes of this resource. + // Informational only. The exact set of attributes is subject to change. + // For example: project id, DNS name etc. + repeated string additional_attributes = 10; + + // Location can be "global", regional like "us-east1", or zonal like + // "us-west1-b". + string location = 11; + + // Labels associated with this resource. See [Labelling and grouping GCP + // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. + map labels = 12; + + // Network tags associated with this resource. Like labels, network tags are a + // type of annotations used to group GCP resources. See [Labelling GCP + // resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) + // for more information. + repeated string network_tags = 13; +} + +// The result for a IAM Policy search. +message IamPolicySearchResult { + // Explanation about the IAM policy search result. + message Explanation { + // The map from roles to their included permission matching the permission + // query (e.g. containing `policy.role.permissions:`). A sample role string: + // "roles/compute.instanceAdmin". The roles can also be found in the + // returned `policy` bindings. Note that the map is populated only if + // requesting with a permission query. + map matched_permissions = 1; + } + + // The [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // of the resource associated with this IAM policy. + string resource = 1; + + // The project that the associated GCP resource belongs to, in the form of + // `projects/{project_number}`. If an IAM policy is set on a resource (like VM + // instance, Cloud Storage bucket), the project field will indicate the + // project that contains the resource. If an IAM policy is set on a folder or + // orgnization, the project field will be empty. + string project = 3; + + // The IAM policy directly set on the given resource. Note that the original + // IAM policy can contain multiple bindings. This only contains the bindings + // that match the given query. For queries that don't contain a constrain on + // policies (e.g. an empty query), this contains all the bindings. + google.iam.v1.Policy policy = 4; + + // Explanation about the IAM policy search result. It contains additional + // information to explain why the search result matches the query. + Explanation explanation = 5; +} + +// IAM permissions +message Permissions { + // A list of permissions. A sample permission string: "compute.disk.get". + repeated string permissions = 1; +} diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d664b4f21204 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; +import com.google.cloud.asset.v1p1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..54206f44f64e --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..f13fa28f032b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_create_setendpoint_sync] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; +import com.google.cloud.asset.v1p1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java new file mode 100644 index 000000000000..5b156a82d453 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; + +public class AsyncSearchAllIamPolicies { + + public static void main(String[] args) throws Exception { + asyncSearchAllIamPolicies(); + } + + public static void asyncSearchAllIamPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request); + // Do something. + for (IamPolicySearchResult element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java new file mode 100644 index 000000000000..d31d83bf532c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_paged_async] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; +import com.google.common.base.Strings; + +public class AsyncSearchAllIamPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncSearchAllIamPoliciesPaged(); + } + + public static void asyncSearchAllIamPoliciesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + SearchAllIamPoliciesResponse response = + assetServiceClient.searchAllIamPoliciesCallable().call(request); + for (IamPolicySearchResult element : response.getResultsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_paged_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java new file mode 100644 index 000000000000..ff47d95f54dc --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_sync] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; +import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; + +public class SyncSearchAllIamPolicies { + + public static void main(String[] args) throws Exception { + syncSearchAllIamPolicies(); + } + + public static void syncSearchAllIamPolicies() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllIamPoliciesRequest request = + SearchAllIamPoliciesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (IamPolicySearchResult element : + assetServiceClient.searchAllIamPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java new file mode 100644 index 000000000000..ccabf3236e1a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; + +public class SyncSearchAllIamPoliciesStringString { + + public static void main(String[] args) throws Exception { + syncSearchAllIamPoliciesStringString(); + } + + public static void syncSearchAllIamPoliciesStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String scope = "scope109264468"; + String query = "query107944136"; + for (IamPolicySearchResult element : + assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java new file mode 100644 index 000000000000..e0bfd0a4922f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; +import java.util.ArrayList; + +public class AsyncSearchAllResources { + + public static void main(String[] args) throws Exception { + asyncSearchAllResources(); + } + + public static void asyncSearchAllResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .addAllAssetTypes(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + assetServiceClient.searchAllResourcesPagedCallable().futureCall(request); + // Do something. + for (StandardResourceMetadata element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java new file mode 100644 index 000000000000..16da799bdf75 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_paged_async] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; +import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; +import com.google.common.base.Strings; +import java.util.ArrayList; + +public class AsyncSearchAllResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncSearchAllResourcesPaged(); + } + + public static void asyncSearchAllResourcesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .addAllAssetTypes(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + SearchAllResourcesResponse response = + assetServiceClient.searchAllResourcesCallable().call(request); + for (StandardResourceMetadata element : response.getResultsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_paged_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java new file mode 100644 index 000000000000..8d17454dfdb3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_sync] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; +import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; +import java.util.ArrayList; + +public class SyncSearchAllResources { + + public static void main(String[] args) throws Exception { + syncSearchAllResources(); + } + + public static void syncSearchAllResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + SearchAllResourcesRequest request = + SearchAllResourcesRequest.newBuilder() + .setScope("scope109264468") + .setQuery("query107944136") + .addAllAssetTypes(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setOrderBy("orderBy-1207110587") + .build(); + for (StandardResourceMetadata element : + assetServiceClient.searchAllResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java new file mode 100644 index 000000000000..38fb49c54e8b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] +import com.google.cloud.asset.v1p1beta1.AssetServiceClient; +import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; +import java.util.ArrayList; +import java.util.List; + +public class SyncSearchAllResourcesStringStringListstring { + + public static void main(String[] args) throws Exception { + syncSearchAllResourcesStringStringListstring(); + } + + public static void syncSearchAllResourcesStringStringListstring() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String scope = "scope109264468"; + String query = "query107944136"; + List assetTypes = new ArrayList<>(); + for (StandardResourceMetadata element : + assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java new file mode 100644 index 000000000000..8bac130fb9cc --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 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.v1p1beta1.samples; + +// [START asset_v1p1beta1_generated_assetservicesettings_searchallresources_sync] +import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; +import java.time.Duration; + +public class SyncSearchAllResources { + + public static void main(String[] args) throws Exception { + syncSearchAllResources(); + } + + public static void syncSearchAllResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); + assetServiceSettingsBuilder + .searchAllResourcesSettings() + .setRetrySettings( + assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1p1beta1_generated_assetservicesettings_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java new file mode 100644 index 000000000000..78aec7d232ed --- /dev/null +++ b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.v1p1beta1.stub.samples; + +// [START asset_v1p1beta1_generated_assetservicestubsettings_searchallresources_sync] +import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStubSettings; +import java.time.Duration; + +public class SyncSearchAllResources { + + public static void main(String[] args) throws Exception { + syncSearchAllResources(); + } + + public static void syncSearchAllResources() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceStubSettings.Builder assetServiceSettingsBuilder = + AssetServiceStubSettings.newBuilder(); + assetServiceSettingsBuilder + .searchAllResourcesSettings() + .setRetrySettings( + assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1p1beta1_generated_assetservicestubsettings_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java new file mode 100644 index 000000000000..156915aa901c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java @@ -0,0 +1,677 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStub; +import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Asset service definition. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   Feed response = assetServiceClient.createFeed(parent);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AssetServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceClient implements BackgroundResource { + private final AssetServiceSettings settings; + private final AssetServiceStub stub; + + /** Constructs an instance of AssetServiceClient with default settings. */ + public static final AssetServiceClient create() throws IOException { + return create(AssetServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { + return new AssetServiceClient(settings); + } + + /** + * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AssetServiceSettings). + */ + public static final AssetServiceClient create(AssetServiceStub stub) { + return new AssetServiceClient(stub); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected AssetServiceClient(AssetServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AssetServiceClient(AssetServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AssetServiceSettings getSettings() { + return settings; + } + + public AssetServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a feed in a parent project/folder/organization to listen to its asset updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Feed response = assetServiceClient.createFeed(parent);
+   * }
+   * }
+ * + * @param parent Required. The name of the project/folder/organization where this feed should be + * created in. It can only be an organization number (such as "organizations/123"), a folder + * number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a + * project number (such as "projects/12345"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed createFeed(String parent) { + CreateFeedRequest request = CreateFeedRequest.newBuilder().setParent(parent).build(); + return createFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a feed in a parent project/folder/organization to listen to its asset updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   CreateFeedRequest request =
+   *       CreateFeedRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFeedId("feedId-1278410919")
+   *           .setFeed(Feed.newBuilder().build())
+   *           .build();
+   *   Feed response = assetServiceClient.createFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed createFeed(CreateFeedRequest request) { + return createFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a feed in a parent project/folder/organization to listen to its asset updates. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   CreateFeedRequest request =
+   *       CreateFeedRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setFeedId("feedId-1278410919")
+   *           .setFeed(Feed.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request);
+   *   // Do something.
+   *   Feed response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createFeedCallable() { + return stub.createFeedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   Feed response = assetServiceClient.getFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed getFeed(FeedName name) { + GetFeedRequest request = + GetFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
+   *   Feed response = assetServiceClient.getFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed getFeed(String name) { + GetFeedRequest request = GetFeedRequest.newBuilder().setName(name).build(); + return getFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   GetFeedRequest request =
+   *       GetFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   Feed response = assetServiceClient.getFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed getFeed(GetFeedRequest request) { + return getFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   GetFeedRequest request =
+   *       GetFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request);
+   *   // Do something.
+   *   Feed response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getFeedCallable() { + return stub.getFeedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all asset feeds in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   ListFeedsResponse response = assetServiceClient.listFeeds(parent);
+   * }
+   * }
+ * + * @param parent Required. The parent project/folder/organization whose feeds are to be listed. It + * can only be using project/folder/organization number (such as "folders/12345")", or a + * project ID (such as "projects/my-project-id"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeedsResponse listFeeds(String parent) { + ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent(parent).build(); + return listFeeds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all asset feeds in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListFeedsRequest request =
+   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
+   *   ListFeedsResponse response = assetServiceClient.listFeeds(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListFeedsResponse listFeeds(ListFeedsRequest request) { + return listFeedsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all asset feeds in a parent project/folder/organization. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListFeedsRequest request =
+   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
+   *   ApiFuture future =
+   *       assetServiceClient.listFeedsCallable().futureCall(request);
+   *   // Do something.
+   *   ListFeedsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable listFeedsCallable() { + return stub.listFeedsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset feed configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   Feed feed = Feed.newBuilder().build();
+   *   Feed response = assetServiceClient.updateFeed(feed);
+   * }
+   * }
+ * + * @param feed Required. The new values of feed details. It must match an existing feed and the + * field `name` must be in the format of: projects/project_number/feeds/feed_id or + * folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed updateFeed(Feed feed) { + UpdateFeedRequest request = UpdateFeedRequest.newBuilder().setFeed(feed).build(); + return updateFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset feed configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   UpdateFeedRequest request =
+   *       UpdateFeedRequest.newBuilder()
+   *           .setFeed(Feed.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Feed response = assetServiceClient.updateFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Feed updateFeed(UpdateFeedRequest request) { + return updateFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an asset feed configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   UpdateFeedRequest request =
+   *       UpdateFeedRequest.newBuilder()
+   *           .setFeed(Feed.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request);
+   *   // Do something.
+   *   Feed response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateFeedCallable() { + return stub.updateFeedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   assetServiceClient.deleteFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(FeedName name) { + DeleteFeedRequest request = + DeleteFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
+   *   assetServiceClient.deleteFeed(name);
+   * }
+   * }
+ * + * @param name Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(String name) { + DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); + deleteFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   DeleteFeedRequest request =
+   *       DeleteFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   assetServiceClient.deleteFeed(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(DeleteFeedRequest request) { + deleteFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an asset feed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   DeleteFeedRequest request =
+   *       DeleteFeedRequest.newBuilder()
+   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteFeedCallable() { + return stub.deleteFeedCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java new file mode 100644 index 000000000000..48de67a431ff --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java @@ -0,0 +1,244 @@ +/* + * Copyright 2022 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 com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createFeed to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .createFeedSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createFeed. */ + public UnaryCallSettings createFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).createFeedSettings(); + } + + /** Returns the object with the settings used for calls to getFeed. */ + public UnaryCallSettings getFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).getFeedSettings(); + } + + /** Returns the object with the settings used for calls to listFeeds. */ + public UnaryCallSettings listFeedsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).listFeedsSettings(); + } + + /** Returns the object with the settings used for calls to updateFeed. */ + public UnaryCallSettings updateFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).updateFeedSettings(); + } + + /** Returns the object with the settings used for calls to deleteFeed. */ + public UnaryCallSettings deleteFeedSettings() { + return ((AssetServiceStubSettings) getStubSettings()).deleteFeedSettings(); + } + + public static final AssetServiceSettings create(AssetServiceStubSettings stub) + throws IOException { + return new AssetServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AssetServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AssetServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AssetServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AssetServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AssetServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AssetServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AssetServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AssetServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AssetServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); + } + + public AssetServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AssetServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createFeed. */ + public UnaryCallSettings.Builder createFeedSettings() { + return getStubSettingsBuilder().createFeedSettings(); + } + + /** Returns the builder for the settings used for calls to getFeed. */ + public UnaryCallSettings.Builder getFeedSettings() { + return getStubSettingsBuilder().getFeedSettings(); + } + + /** Returns the builder for the settings used for calls to listFeeds. */ + public UnaryCallSettings.Builder listFeedsSettings() { + return getStubSettingsBuilder().listFeedsSettings(); + } + + /** Returns the builder for the settings used for calls to updateFeed. */ + public UnaryCallSettings.Builder updateFeedSettings() { + return getStubSettingsBuilder().updateFeedSettings(); + } + + /** Returns the builder for the settings used for calls to deleteFeed. */ + public UnaryCallSettings.Builder deleteFeedSettings() { + return getStubSettingsBuilder().deleteFeedSettings(); + } + + @Override + public AssetServiceSettings build() throws IOException { + return new AssetServiceSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json new file mode 100644 index 000000000000..caeee32252e5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.asset.v1p2beta1", + "libraryPackage": "com.google.cloud.asset.v1p2beta1", + "services": { + "AssetService": { + "clients": { + "grpc": { + "libraryClient": "AssetServiceClient", + "rpcs": { + "CreateFeed": { + "methods": ["createFeed", "createFeed", "createFeedCallable"] + }, + "DeleteFeed": { + "methods": ["deleteFeed", "deleteFeed", "deleteFeed", "deleteFeedCallable"] + }, + "GetFeed": { + "methods": ["getFeed", "getFeed", "getFeed", "getFeedCallable"] + }, + "ListFeeds": { + "methods": ["listFeeds", "listFeeds", "listFeedsCallable"] + }, + "UpdateFeed": { + "methods": ["updateFeed", "updateFeed", "updateFeedCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java new file mode 100644 index 000000000000..3c42b5875006 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= AssetServiceClient ======================= + * + *

Service Description: Asset service definition. + * + *

Sample for AssetServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   String parent = "parent-995424086";
+ *   Feed response = assetServiceClient.createFeed(parent);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.asset.v1p2beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java new file mode 100644 index 000000000000..992bc61171ff --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java @@ -0,0 +1,64 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; +import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.GetFeedRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; +import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class AssetServiceStub implements BackgroundResource { + + public UnaryCallable createFeedCallable() { + throw new UnsupportedOperationException("Not implemented: createFeedCallable()"); + } + + public UnaryCallable getFeedCallable() { + throw new UnsupportedOperationException("Not implemented: getFeedCallable()"); + } + + public UnaryCallable listFeedsCallable() { + throw new UnsupportedOperationException("Not implemented: listFeedsCallable()"); + } + + public UnaryCallable updateFeedCallable() { + throw new UnsupportedOperationException("Not implemented: updateFeedCallable()"); + } + + public UnaryCallable deleteFeedCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeedCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java new file mode 100644 index 000000000000..987c1ebb873b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java @@ -0,0 +1,431 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; +import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.GetFeedRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; +import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createFeed to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ *     AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .createFeedSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createFeedSettings; + private final UnaryCallSettings getFeedSettings; + private final UnaryCallSettings listFeedsSettings; + private final UnaryCallSettings updateFeedSettings; + private final UnaryCallSettings deleteFeedSettings; + + /** Returns the object with the settings used for calls to createFeed. */ + public UnaryCallSettings createFeedSettings() { + return createFeedSettings; + } + + /** Returns the object with the settings used for calls to getFeed. */ + public UnaryCallSettings getFeedSettings() { + return getFeedSettings; + } + + /** Returns the object with the settings used for calls to listFeeds. */ + public UnaryCallSettings listFeedsSettings() { + return listFeedsSettings; + } + + /** Returns the object with the settings used for calls to updateFeed. */ + public UnaryCallSettings updateFeedSettings() { + return updateFeedSettings; + } + + /** Returns the object with the settings used for calls to deleteFeed. */ + public UnaryCallSettings deleteFeedSettings() { + return deleteFeedSettings; + } + + public AssetServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAssetServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAssetServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "cloudasset.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudasset.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createFeedSettings = settingsBuilder.createFeedSettings().build(); + getFeedSettings = settingsBuilder.getFeedSettings().build(); + listFeedsSettings = settingsBuilder.listFeedsSettings().build(); + updateFeedSettings = settingsBuilder.updateFeedSettings().build(); + deleteFeedSettings = settingsBuilder.deleteFeedSettings().build(); + } + + /** Builder for AssetServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createFeedSettings; + private final UnaryCallSettings.Builder getFeedSettings; + private final UnaryCallSettings.Builder listFeedsSettings; + private final UnaryCallSettings.Builder updateFeedSettings; + private final UnaryCallSettings.Builder deleteFeedSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listFeedsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createFeedSettings, + getFeedSettings, + listFeedsSettings, + updateFeedSettings, + deleteFeedSettings); + initDefaults(this); + } + + protected Builder(AssetServiceStubSettings settings) { + super(settings); + + createFeedSettings = settings.createFeedSettings.toBuilder(); + getFeedSettings = settings.getFeedSettings.toBuilder(); + listFeedsSettings = settings.listFeedsSettings.toBuilder(); + updateFeedSettings = settings.updateFeedSettings.toBuilder(); + deleteFeedSettings = settings.deleteFeedSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createFeedSettings, + getFeedSettings, + listFeedsSettings, + updateFeedSettings, + deleteFeedSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listFeedsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .updateFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteFeedSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createFeed. */ + public UnaryCallSettings.Builder createFeedSettings() { + return createFeedSettings; + } + + /** Returns the builder for the settings used for calls to getFeed. */ + public UnaryCallSettings.Builder getFeedSettings() { + return getFeedSettings; + } + + /** Returns the builder for the settings used for calls to listFeeds. */ + public UnaryCallSettings.Builder listFeedsSettings() { + return listFeedsSettings; + } + + /** Returns the builder for the settings used for calls to updateFeed. */ + public UnaryCallSettings.Builder updateFeedSettings() { + return updateFeedSettings; + } + + /** Returns the builder for the settings used for calls to deleteFeed. */ + public UnaryCallSettings.Builder deleteFeedSettings() { + return deleteFeedSettings; + } + + @Override + public AssetServiceStubSettings build() throws IOException { + return new AssetServiceStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java new file mode 100644 index 000000000000..dcacae98a2f9 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java new file mode 100644 index 000000000000..4c74edb92139 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java @@ -0,0 +1,276 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; +import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.GetFeedRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; +import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceStub extends AssetServiceStub { + private static final MethodDescriptor createFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/CreateFeed") + .setRequestMarshaller(ProtoUtils.marshaller(CreateFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/GetFeed") + .setRequestMarshaller(ProtoUtils.marshaller(GetFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listFeedsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/ListFeeds") + .setRequestMarshaller(ProtoUtils.marshaller(ListFeedsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListFeedsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/UpdateFeed") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteFeedMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/DeleteFeed") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable createFeedCallable; + private final UnaryCallable getFeedCallable; + private final UnaryCallable listFeedsCallable; + private final UnaryCallable updateFeedCallable; + private final UnaryCallable deleteFeedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAssetServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAssetServiceStub( + AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listFeedsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listFeedsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("feed.name", String.valueOf(request.getFeed().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteFeedTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteFeedMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.createFeedCallable = + callableFactory.createUnaryCallable( + createFeedTransportSettings, settings.createFeedSettings(), clientContext); + this.getFeedCallable = + callableFactory.createUnaryCallable( + getFeedTransportSettings, settings.getFeedSettings(), clientContext); + this.listFeedsCallable = + callableFactory.createUnaryCallable( + listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); + this.updateFeedCallable = + callableFactory.createUnaryCallable( + updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); + this.deleteFeedCallable = + callableFactory.createUnaryCallable( + deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createFeedCallable() { + return createFeedCallable; + } + + @Override + public UnaryCallable getFeedCallable() { + return getFeedCallable; + } + + @Override + public UnaryCallable listFeedsCallable() { + return listFeedsCallable; + } + + @Override + public UnaryCallable updateFeedCallable() { + return updateFeedCallable; + } + + @Override + public UnaryCallable deleteFeedCallable() { + return deleteFeedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java new file mode 100644 index 000000000000..a21066222390 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssetServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java new file mode 100644 index 000000000000..f307fcb23ebe --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java @@ -0,0 +1,391 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; +import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.GetFeedRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; +import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssetServiceStub extends AssetServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor createFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/CreateFeed") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p2beta1/{parent=*/*}/feeds", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Feed.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/GetFeed") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p2beta1/{name=*/*/feeds/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Feed.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listFeedsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/ListFeeds") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p2beta1/{parent=*/*}/feeds", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListFeedsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/UpdateFeed") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p2beta1/{feed.name=*/*/feeds/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "feed.name", request.getFeed().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Feed.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteFeedMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/DeleteFeed") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p2beta1/{name=*/*/feeds/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createFeedCallable; + private final UnaryCallable getFeedCallable; + private final UnaryCallable listFeedsCallable; + private final UnaryCallable updateFeedCallable; + private final UnaryCallable deleteFeedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAssetServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAssetServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listFeedsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listFeedsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteFeedTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteFeedMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createFeedCallable = + callableFactory.createUnaryCallable( + createFeedTransportSettings, settings.createFeedSettings(), clientContext); + this.getFeedCallable = + callableFactory.createUnaryCallable( + getFeedTransportSettings, settings.getFeedSettings(), clientContext); + this.listFeedsCallable = + callableFactory.createUnaryCallable( + listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); + this.updateFeedCallable = + callableFactory.createUnaryCallable( + updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); + this.deleteFeedCallable = + callableFactory.createUnaryCallable( + deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createFeedMethodDescriptor); + methodDescriptors.add(getFeedMethodDescriptor); + methodDescriptors.add(listFeedsMethodDescriptor); + methodDescriptors.add(updateFeedMethodDescriptor); + methodDescriptors.add(deleteFeedMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createFeedCallable() { + return createFeedCallable; + } + + @Override + public UnaryCallable getFeedCallable() { + return getFeedCallable; + } + + @Override + public UnaryCallable listFeedsCallable() { + return listFeedsCallable; + } + + @Override + public UnaryCallable updateFeedCallable() { + return updateFeedCallable; + } + + @Override + public UnaryCallable deleteFeedCallable() { + return deleteFeedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..272ec68dcb61 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java @@ -0,0 +1,403 @@ +/* + * Copyright 2022 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 com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.asset.v1p2beta1.stub.HttpJsonAssetServiceStub; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAssetServiceStub.getMethodDescriptors(), + AssetServiceSettings.getDefaultEndpoint()); + AssetServiceSettings settings = + AssetServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-4715/parent-4715"; + + Feed actualResponse = client.createFeed(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-4715/parent-4715"; + client.createFeed(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest2() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "name-2459/name-2459/feeds/feed-2459"; + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getFeedExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name-2459/name-2459/feeds/feed-2459"; + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeedsTest() throws Exception { + ListFeedsResponse expectedResponse = + ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "parent-4715/parent-4715"; + + ListFeedsResponse actualResponse = client.listFeeds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listFeedsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "parent-4715/parent-4715"; + client.listFeeds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Feed feed = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + + Feed actualResponse = client.updateFeed(feed); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Feed feed = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + client.updateFeed(feed); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + client.deleteFeed(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFeedExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "name-2459/name-2459/feeds/feed-2459"; + + client.deleteFeed(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteFeedExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "name-2459/name-2459/feeds/feed-2459"; + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java new file mode 100644 index 000000000000..8215eec90f5a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java @@ -0,0 +1,351 @@ +/* + * Copyright 2022 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 com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientTest { + private static MockAssetService mockAssetService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAssetService = new MockAssetService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AssetServiceSettings settings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + Feed actualResponse = client.createFeed(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFeedRequest actualRequest = ((CreateFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + client.createFeed(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFeedTest2() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + String name = "name3373707"; + + Feed actualResponse = client.getFeed(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFeedExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String name = "name3373707"; + client.getFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFeedsTest() throws Exception { + ListFeedsResponse expectedResponse = + ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFeedsResponse actualResponse = client.listFeeds(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFeedsRequest actualRequest = ((ListFeedsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFeedsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listFeeds(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFeedTest() throws Exception { + Feed expectedResponse = + Feed.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .addAllAssetNames(new ArrayList()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) + .build(); + mockAssetService.addResponse(expectedResponse); + + Feed feed = Feed.newBuilder().build(); + + Feed actualResponse = client.updateFeed(feed); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFeedRequest actualRequest = ((UpdateFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(feed, actualRequest.getFeed()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + Feed feed = Feed.newBuilder().build(); + client.updateFeed(feed); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + client.deleteFeed(name); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeedExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFeedTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssetService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteFeed(name); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFeedExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String name = "name3373707"; + client.deleteFeed(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java new file mode 100644 index 000000000000..f35ed351aa9b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetService implements MockGrpcService { + private final MockAssetServiceImpl serviceImpl; + + public MockAssetService() { + serviceImpl = new MockAssetServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java new file mode 100644 index 000000000000..7a48aaee7390 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java @@ -0,0 +1,162 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.cloud.asset.v1p2beta1.AssetServiceGrpc.AssetServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetServiceImpl extends AssetServiceImplBase { + private List requests; + private Queue responses; + + public MockAssetServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createFeed(CreateFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Feed) { + requests.add(request); + responseObserver.onNext(((Feed) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Feed.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFeed(GetFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Feed) { + requests.add(request); + responseObserver.onNext(((Feed) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Feed.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listFeeds( + ListFeedsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListFeedsResponse) { + requests.add(request); + responseObserver.onNext(((ListFeedsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListFeeds, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListFeedsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFeed(UpdateFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Feed) { + requests.add(request); + responseObserver.onNext(((Feed) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Feed.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteFeed(DeleteFeedRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteFeed, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java b/owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java new file mode 100644 index 000000000000..696a0aaafec7 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java @@ -0,0 +1,651 @@ +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 String SERVICE_NAME = "google.cloud.asset.v1p2beta1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor 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 getCreateFeedMethod() { + io.grpc.MethodDescriptor 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 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 getGetFeedMethod() { + io.grpc.MethodDescriptor 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 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 getListFeedsMethod() { + io.grpc.MethodDescriptor 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 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 getUpdateFeedMethod() { + io.grpc.MethodDescriptor 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 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 getDeleteFeedMethod() { + io.grpc.MethodDescriptor 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * 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.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFeedMethod(), responseObserver); + } + + /** + *
+     * Gets details about an asset feed.
+     * 
+ */ + public void getFeed(com.google.cloud.asset.v1p2beta1.GetFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFeedMethod(), 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.ServerCalls.asyncUnimplementedUnaryCall(getListFeedsMethod(), responseObserver); + } + + /** + *
+     * Updates an asset feed configuration.
+     * 
+ */ + public void updateFeed(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFeedMethod(), responseObserver); + } + + /** + *
+     * Deletes an asset feed.
+     * 
+ */ + public void deleteFeed(com.google.cloud.asset.v1p2beta1.DeleteFeedRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFeedMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + 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>( + this, METHODID_CREATE_FEED))) + .addMethod( + getGetFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.GetFeedRequest, + com.google.cloud.asset.v1p2beta1.Feed>( + this, METHODID_GET_FEED))) + .addMethod( + getListFeedsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.ListFeedsRequest, + com.google.cloud.asset.v1p2beta1.ListFeedsResponse>( + this, METHODID_LIST_FEEDS))) + .addMethod( + getUpdateFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest, + com.google.cloud.asset.v1p2beta1.Feed>( + this, METHODID_UPDATE_FEED))) + .addMethod( + getDeleteFeedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_FEED))) + .build(); + } + } + + /** + *
+   * 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.StreamObserver responseObserver) { + 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.StreamObserver responseObserver) { + 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.StreamObserver responseObserver) { + 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.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * 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); + } + } + + /** + *
+   * 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 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.ListenableFuture deleteFeed( + 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 AssetServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AssetServiceImplBase 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(); + } + } + } + + private static abstract 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 String methodName; + + AssetServiceMethodDescriptorSupplier(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/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java new file mode 100644 index 000000000000..bcb258585f39 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java @@ -0,0 +1,1574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Cloud asset. This includes all Google Cloud Platform resources,
+ * Cloud IAM policies, and other non-GCP assets.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.Asset} + */ +public final class Asset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.Asset) + AssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Asset() { + name_ = ""; + assetType_ = ""; + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Asset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Asset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + com.google.cloud.asset.v1p2beta1.Resource.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Resource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (iamPolicy_ != null) { + subBuilder = iamPolicy_.toBuilder(); + } + iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamPolicy_); + iamPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ancestors_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.Asset.class, com.google.cloud.asset.v1p2beta1.Asset.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p2beta1.Resource resource_; + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Resource getResource() { + return resource_ == null ? com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance() : resource_; + } + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ResourceOrBuilder getResourceOrBuilder() { + return getResource(); + } + + public static final int IAM_POLICY_FIELD_NUMBER = 4; + private com.google.iam.v1.Policy iamPolicy_; + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + @java.lang.Override + public boolean hasIamPolicy() { + return iamPolicy_ != null; + } + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getIamPolicy() { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + return getIamPolicy(); + } + + public static final int ANCESTORS_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList ancestors_; + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_; + } + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + if (resource_ != null) { + output.writeMessage(3, getResource()); + } + if (iamPolicy_ != null) { + output.writeMessage(4, getIamPolicy()); + } + for (int i = 0; i < ancestors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ancestors_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResource()); + } + if (iamPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIamPolicy()); + } + { + int dataSize = 0; + for (int i = 0; i < ancestors_.size(); i++) { + dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); + } + size += dataSize; + size += 1 * getAncestorsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.Asset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.Asset other = (com.google.cloud.asset.v1p2beta1.Asset) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (hasIamPolicy() != other.hasIamPolicy()) return false; + if (hasIamPolicy()) { + if (!getIamPolicy() + .equals(other.getIamPolicy())) return false; + } + if (!getAncestorsList() + .equals(other.getAncestorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + if (hasIamPolicy()) { + hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicy().hashCode(); + } + if (getAncestorsCount() > 0) { + hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAncestorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.Asset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Cloud asset. This includes all Google Cloud Platform resources,
+   * Cloud IAM policies, and other non-GCP assets.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.Asset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.Asset) + com.google.cloud.asset.v1p2beta1.AssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.Asset.class, com.google.cloud.asset.v1p2beta1.Asset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.Asset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + assetType_ = ""; + + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Asset getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Asset build() { + com.google.cloud.asset.v1p2beta1.Asset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Asset buildPartial() { + com.google.cloud.asset.v1p2beta1.Asset result = new com.google.cloud.asset.v1p2beta1.Asset(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.assetType_ = assetType_; + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + if (iamPolicyBuilder_ == null) { + result.iamPolicy_ = iamPolicy_; + } else { + result.iamPolicy_ = iamPolicyBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ancestors_ = ancestors_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.Asset) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.Asset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Asset other) { + if (other == com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (other.hasIamPolicy()) { + mergeIamPolicy(other.getIamPolicy()); + } + if (!other.ancestors_.isEmpty()) { + if (ancestors_.isEmpty()) { + ancestors_ = other.ancestors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAncestorsIsMutable(); + ancestors_.addAll(other.ancestors_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.Asset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.Asset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p2beta1.Resource resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Resource, com.google.cloud.asset.v1p2beta1.Resource.Builder, com.google.cloud.asset.v1p2beta1.ResourceOrBuilder> resourceBuilder_; + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + * @return The resource. + */ + public com.google.cloud.asset.v1p2beta1.Resource getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + public Builder setResource(com.google.cloud.asset.v1p2beta1.Resource value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + public Builder setResource( + com.google.cloud.asset.v1p2beta1.Resource.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + public Builder mergeResource(com.google.cloud.asset.v1p2beta1.Resource value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.asset.v1p2beta1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + public com.google.cloud.asset.v1p2beta1.Resource.Builder getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + public com.google.cloud.asset.v1p2beta1.ResourceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance() : resource_; + } + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Resource, com.google.cloud.asset.v1p2beta1.Resource.Builder, com.google.cloud.asset.v1p2beta1.ResourceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Resource, com.google.cloud.asset.v1p2beta1.Resource.Builder, com.google.cloud.asset.v1p2beta1.ResourceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private com.google.iam.v1.Policy iamPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + public boolean hasIamPolicy() { + return iamPolicyBuilder_ != null || iamPolicy_ != null; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + public com.google.iam.v1.Policy getIamPolicy() { + if (iamPolicyBuilder_ == null) { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } else { + return iamPolicyBuilder_.getMessage(); + } + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicy_ = value; + onChanged(); + } else { + iamPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy( + com.google.iam.v1.Policy.Builder builderForValue) { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = builderForValue.build(); + onChanged(); + } else { + iamPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (iamPolicy_ != null) { + iamPolicy_ = + com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); + } else { + iamPolicy_ = value; + } + onChanged(); + } else { + iamPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder clearIamPolicy() { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + onChanged(); + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { + + onChanged(); + return getIamPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + if (iamPolicyBuilder_ != null) { + return iamPolicyBuilder_.getMessageOrBuilder(); + } else { + return iamPolicy_ == null ? + com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> + getIamPolicyFieldBuilder() { + if (iamPolicyBuilder_ == null) { + iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( + getIamPolicy(), + getParentForChildren(), + isClean()); + iamPolicy_ = null; + } + return iamPolicyBuilder_; + } + + private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAncestorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_.getUnmodifiableView(); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @param index The index to set the value at. + * @param value The ancestors to set. + * @return This builder for chaining. + */ + public Builder setAncestors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @param value The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @param values The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAllAncestors( + java.lang.Iterable values) { + ensureAncestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ancestors_); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @return This builder for chaining. + */ + public Builder clearAncestors() { + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 6; + * @param value The bytes of the ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.Asset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Asset) + private static final com.google.cloud.asset.v1p2beta1.Asset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.Asset(); + } + + public static com.google.cloud.asset.v1p2beta1.Asset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Asset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Asset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Asset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java new file mode 100644 index 000000000000..c7aacd76368d --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java @@ -0,0 +1,171 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface AssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.Asset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + * @return The resource. + */ + com.google.cloud.asset.v1p2beta1.Resource getResource(); + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Resource resource = 3; + */ + com.google.cloud.asset.v1p2beta1.ResourceOrBuilder getResourceOrBuilder(); + + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + boolean hasIamPolicy(); + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + com.google.iam.v1.Policy getIamPolicy(); + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); + + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @return A list containing the ancestors. + */ + java.util.List + getAncestorsList(); + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @return The count of ancestors. + */ + int getAncestorsCount(); + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + java.lang.String getAncestors(int index); + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 6; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + com.google.protobuf.ByteString + getAncestorsBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java new file mode 100644 index 000000000000..6e5b09f52b61 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java @@ -0,0 +1,108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +public final class AssetProto { + private AssetProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/asset/v1p2beta1/assets.pr" + + "oto\022\034google.cloud.asset.v1p2beta1\032\032googl" + + "e/iam/v1/policy.proto\032\034google/protobuf/s" + + "truct.proto\032\037google/protobuf/timestamp.p" + + "roto\"\216\001\n\rTemporalAsset\0228\n\006window\030\001 \001(\0132(" + + ".google.cloud.asset.v1p2beta1.TimeWindow" + + "\022\017\n\007deleted\030\002 \001(\010\0222\n\005asset\030\003 \001(\0132#.googl" + + "e.cloud.asset.v1p2beta1.Asset\"j\n\nTimeWin" + + "dow\022.\n\nstart_time\030\001 \001(\0132\032.google.protobu" + + "f.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google.p" + + "rotobuf.Timestamp\"\241\001\n\005Asset\022\014\n\004name\030\001 \001(" + + "\t\022\022\n\nasset_type\030\002 \001(\t\0228\n\010resource\030\003 \001(\0132" + + "&.google.cloud.asset.v1p2beta1.Resource\022" + + ")\n\niam_policy\030\004 \001(\0132\025.google.iam.v1.Poli" + + "cy\022\021\n\tancestors\030\006 \003(\t\"\240\001\n\010Resource\022\017\n\007ve" + + "rsion\030\001 \001(\t\022\036\n\026discovery_document_uri\030\002 " + + "\001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014resource_" + + "url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001(\0132" + + "\027.google.protobuf.StructB\264\001\n com.google." + + "cloud.asset.v1p2beta1B\nAssetProtoP\001ZAgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/asset/v1p2beta1;asset\370\001\001\252\002\034Google.Cloud" + + ".Asset.v1p2beta1\312\002\034Google\\Cloud\\Asset\\V1" + + "p2beta1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor, + new java.lang.String[] { "Window", "Deleted", "Asset", }); + internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor, + new java.lang.String[] { "StartTime", "EndTime", }); + internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor, + new java.lang.String[] { "Name", "AssetType", "Resource", "IamPolicy", "Ancestors", }); + internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor, + new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", }); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java new file mode 100644 index 000000000000..4dac20305692 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java @@ -0,0 +1,245 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public final class AssetServiceProto { + private AssetServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/asset/v1p2beta1/asset_ser" + + "vice.proto\022\034google.cloud.asset.v1p2beta1" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032)goo" + + "gle/cloud/asset/v1p2beta1/assets.proto\032\033" + + "google/protobuf/empty.proto\032 google/prot" + + "obuf/field_mask.proto\"u\n\021CreateFeedReque" + + "st\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\t" + + "B\003\340A\002\0225\n\004feed\030\003 \001(\0132\".google.cloud.asset" + + ".v1p2beta1.FeedB\003\340A\002\"F\n\016GetFeedRequest\0224" + + "\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset.googlea" + + "pis.com/Feed\"\'\n\020ListFeedsRequest\022\023\n\006pare" + + "nt\030\001 \001(\tB\003\340A\002\"F\n\021ListFeedsResponse\0221\n\005fe" + + "eds\030\001 \003(\0132\".google.cloud.asset.v1p2beta1" + + ".Feed\"\200\001\n\021UpdateFeedRequest\0225\n\004feed\030\001 \001(" + + "\0132\".google.cloud.asset.v1p2beta1.FeedB\003\340" + + "A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobu" + + "f.FieldMaskB\003\340A\002\"I\n\021DeleteFeedRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset.googleap" + + "is.com/Feed\"f\n\014OutputConfig\022G\n\017gcs_desti" + + "nation\030\001 \001(\0132,.google.cloud.asset.v1p2be" + + "ta1.GcsDestinationH\000B\r\n\013destination\"-\n\016G" + + "csDestination\022\r\n\003uri\030\001 \001(\tH\000B\014\n\nobject_u" + + "ri\"\"\n\021PubsubDestination\022\r\n\005topic\030\001 \001(\t\"p" + + "\n\020FeedOutputConfig\022M\n\022pubsub_destination" + + "\030\001 \001(\0132/.google.cloud.asset.v1p2beta1.Pu" + + "bsubDestinationH\000B\r\n\013destination\"\351\002\n\004Fee" + + "d\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013asset_names\030\002 \003(" + + "\t\022\023\n\013asset_types\030\003 \003(\t\022?\n\014content_type\030\004" + + " \001(\0162).google.cloud.asset.v1p2beta1.Cont" + + "entType\022O\n\022feed_output_config\030\005 \001(\0132..go" + + "ogle.cloud.asset.v1p2beta1.FeedOutputCon" + + "figB\003\340A\002:\221\001\352A\215\001\n\036cloudasset.googleapis.c" + + "om/Feed\022\037projects/{project}/feeds/{feed}" + + "\022\035folders/{folder}/feeds/{feed}\022)organiz" + + "ations/{organization}/feeds/{feed} \001*I\n\013" + + "ContentType\022\034\n\030CONTENT_TYPE_UNSPECIFIED\020" + + "\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY\020\0022\277\006\n\014Asse" + + "tService\022\224\001\n\nCreateFeed\022/.google.cloud.a" + + "sset.v1p2beta1.CreateFeedRequest\032\".googl" + + "e.cloud.asset.v1p2beta1.Feed\"1\202\323\344\223\002\"\"\035/v" + + "1p2beta1/{parent=*/*}/feeds:\001*\332A\006parent\022" + + "\211\001\n\007GetFeed\022,.google.cloud.asset.v1p2bet" + + "a1.GetFeedRequest\032\".google.cloud.asset.v" + + "1p2beta1.Feed\",\202\323\344\223\002\037\022\035/v1p2beta1/{name=" + + "*/*/feeds/*}\332A\004name\022\234\001\n\tListFeeds\022..goog" + + "le.cloud.asset.v1p2beta1.ListFeedsReques" + + "t\032/.google.cloud.asset.v1p2beta1.ListFee" + + "dsResponse\".\202\323\344\223\002\037\022\035/v1p2beta1/{parent=*" + + "/*}/feeds\332A\006parent\022\227\001\n\nUpdateFeed\022/.goog" + + "le.cloud.asset.v1p2beta1.UpdateFeedReque" + + "st\032\".google.cloud.asset.v1p2beta1.Feed\"4" + + "\202\323\344\223\002\'2\"/v1p2beta1/{feed.name=*/*/feeds/" + + "*}:\001*\332A\004feed\022\203\001\n\nDeleteFeed\022/.google.clo" + + "ud.asset.v1p2beta1.DeleteFeedRequest\032\026.g" + + "oogle.protobuf.Empty\",\202\323\344\223\002\037*\035/v1p2beta1" + + "/{name=*/*/feeds/*}\332A\004name\032M\312A\031cloudasse" + + "t.googleapis.com\322A.https://www.googleapi" + + "s.com/auth/cloud-platformB\270\001\n com.google" + + ".cloud.asset.v1p2beta1B\021AssetServiceProt" + + "oP\001ZAgoogle.golang.org/genproto/googleap" + + "is/cloud/asset/v1p2beta1;asset\252\002\034Google." + + "Cloud.Asset.V1p2Beta1\312\002\034Google\\Cloud\\Ass" + + "et\\V1p2beta1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.asset.v1p2beta1.AssetProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor, + new java.lang.String[] { "Parent", "FeedId", "Feed", }); + internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor, + new java.lang.String[] { "Parent", }); + internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor, + new java.lang.String[] { "Feeds", }); + internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor, + new java.lang.String[] { "Feed", "UpdateMask", }); + internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor, + new java.lang.String[] { "GcsDestination", "Destination", }); + internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor, + new java.lang.String[] { "Uri", "ObjectUri", }); + internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor, + new java.lang.String[] { "Topic", }); + internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor, + new java.lang.String[] { "PubsubDestination", "Destination", }); + internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor, + new java.lang.String[] { "Name", "AssetNames", "AssetTypes", "ContentType", "FeedOutputConfig", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.asset.v1p2beta1.AssetProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java new file mode 100644 index 000000000000..dffdb7a8ca46 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java @@ -0,0 +1,150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Asset content type.
+ * 
+ * + * Protobuf enum {@code google.cloud.asset.v1p2beta1.ContentType} + */ +public enum ContentType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + CONTENT_TYPE_UNSPECIFIED(0), + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + RESOURCE(1), + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + IAM_POLICY(2), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + public static final int RESOURCE_VALUE = 1; + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + public static final int IAM_POLICY_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContentType forNumber(int value) { + switch (value) { + case 0: return CONTENT_TYPE_UNSPECIFIED; + case 1: return RESOURCE; + case 2: return IAM_POLICY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ContentType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ContentType findValueByNumber(int number) { + return ContentType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ContentType[] VALUES = values(); + + public static ContentType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ContentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p2beta1.ContentType) +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java new file mode 100644 index 000000000000..d71caa2b7eaf --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java @@ -0,0 +1,1080 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Create asset feed request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.CreateFeedRequest} + */ +public final class CreateFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.CreateFeedRequest) + CreateFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateFeedRequest.newBuilder() to construct. + private CreateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateFeedRequest() { + parent_ = ""; + feedId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + feedId_ = s; + break; + } + case 26: { + com.google.cloud.asset.v1p2beta1.Feed.Builder subBuilder = null; + if (feed_ != null) { + subBuilder = feed_.toBuilder(); + } + feed_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(feed_); + feed_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.CreateFeedRequest.class, com.google.cloud.asset.v1p2beta1.CreateFeedRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEED_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object feedId_; + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedId. + */ + @java.lang.Override + public java.lang.String getFeedId() { + java.lang.Object ref = feedId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + feedId_ = s; + return s; + } + } + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for feedId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFeedIdBytes() { + java.lang.Object ref = feedId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + feedId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEED_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p2beta1.Feed feed_; + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be generated
+   * in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + @java.lang.Override + public boolean hasFeed() { + return feed_ != null; + } + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be generated
+   * in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Feed getFeed() { + return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; + } + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be generated
+   * in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { + return getFeed(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, feedId_); + } + if (feed_ != null) { + output.writeMessage(3, getFeed()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, feedId_); + } + if (feed_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFeed()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.CreateFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.CreateFeedRequest other = (com.google.cloud.asset.v1p2beta1.CreateFeedRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!getFeedId() + .equals(other.getFeedId())) return false; + if (hasFeed() != other.hasFeed()) return false; + if (hasFeed()) { + if (!getFeed() + .equals(other.getFeed())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FEED_ID_FIELD_NUMBER; + hash = (53 * hash) + getFeedId().hashCode(); + if (hasFeed()) { + hash = (37 * hash) + FEED_FIELD_NUMBER; + hash = (53 * hash) + getFeed().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.CreateFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Create asset feed request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.CreateFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.CreateFeedRequest) + com.google.cloud.asset.v1p2beta1.CreateFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.CreateFeedRequest.class, com.google.cloud.asset.v1p2beta1.CreateFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.CreateFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + feedId_ = ""; + + if (feedBuilder_ == null) { + feed_ = null; + } else { + feed_ = null; + feedBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.CreateFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.CreateFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.CreateFeedRequest build() { + com.google.cloud.asset.v1p2beta1.CreateFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.CreateFeedRequest buildPartial() { + com.google.cloud.asset.v1p2beta1.CreateFeedRequest result = new com.google.cloud.asset.v1p2beta1.CreateFeedRequest(this); + result.parent_ = parent_; + result.feedId_ = feedId_; + if (feedBuilder_ == null) { + result.feed_ = feed_; + } else { + result.feed_ = feedBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.CreateFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.CreateFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.CreateFeedRequest other) { + if (other == com.google.cloud.asset.v1p2beta1.CreateFeedRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFeedId().isEmpty()) { + feedId_ = other.feedId_; + onChanged(); + } + if (other.hasFeed()) { + mergeFeed(other.getFeed()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.CreateFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.CreateFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the project/folder/organization where this feed
+     * should be created in. It can only be an organization number (such as
+     * "organizations/123"), a folder number (such as "folders/123"), a project ID
+     * (such as "projects/my-project-id")", or a project number (such as
+     * "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object feedId_ = ""; + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedId. + */ + public java.lang.String getFeedId() { + java.lang.Object ref = feedId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + feedId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for feedId. + */ + public com.google.protobuf.ByteString + getFeedIdBytes() { + java.lang.Object ref = feedId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + feedId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The feedId to set. + * @return This builder for chaining. + */ + public Builder setFeedId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + feedId_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearFeedId() { + + feedId_ = getDefaultInstance().getFeedId(); + onChanged(); + return this; + } + /** + *
+     * Required. This is the client-assigned asset feed identifier and it needs to
+     * be unique under a specific parent project/folder/organization.
+     * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for feedId to set. + * @return This builder for chaining. + */ + public Builder setFeedIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + feedId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p2beta1.Feed feed_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> feedBuilder_; + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + public boolean hasFeed() { + return feedBuilder_ != null || feed_ != null; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + public com.google.cloud.asset.v1p2beta1.Feed getFeed() { + if (feedBuilder_ == null) { + return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; + } else { + return feedBuilder_.getMessage(); + } + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { + if (feedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + feed_ = value; + onChanged(); + } else { + feedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed( + com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { + if (feedBuilder_ == null) { + feed_ = builderForValue.build(); + onChanged(); + } else { + feedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { + if (feedBuilder_ == null) { + if (feed_ != null) { + feed_ = + com.google.cloud.asset.v1p2beta1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); + } else { + feed_ = value; + } + onChanged(); + } else { + feedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFeed() { + if (feedBuilder_ == null) { + feed_ = null; + onChanged(); + } else { + feed_ = null; + feedBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { + + onChanged(); + return getFeedFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { + if (feedBuilder_ != null) { + return feedBuilder_.getMessageOrBuilder(); + } else { + return feed_ == null ? + com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; + } + } + /** + *
+     * Required. The feed details. The field `name` must be empty and it will be generated
+     * in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> + getFeedFieldBuilder() { + if (feedBuilder_ == null) { + feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder>( + getFeed(), + getParentForChildren(), + isClean()); + feed_ = null; + } + return feedBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.CreateFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.CreateFeedRequest) + private static final com.google.cloud.asset.v1p2beta1.CreateFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.CreateFeedRequest(); + } + + public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.CreateFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java new file mode 100644 index 000000000000..c8fc925433a5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java @@ -0,0 +1,98 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface CreateFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.CreateFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The name of the project/folder/organization where this feed
+   * should be created in. It can only be an organization number (such as
+   * "organizations/123"), a folder number (such as "folders/123"), a project ID
+   * (such as "projects/my-project-id")", or a project number (such as
+   * "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedId. + */ + java.lang.String getFeedId(); + /** + *
+   * Required. This is the client-assigned asset feed identifier and it needs to
+   * be unique under a specific parent project/folder/organization.
+   * 
+ * + * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for feedId. + */ + com.google.protobuf.ByteString + getFeedIdBytes(); + + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be generated
+   * in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + boolean hasFeed(); + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be generated
+   * in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + com.google.cloud.asset.v1p2beta1.Feed getFeed(); + /** + *
+   * Required. The feed details. The field `name` must be empty and it will be generated
+   * in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java new file mode 100644 index 000000000000..a1f0cd948ce0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java @@ -0,0 +1,608 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + * Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} + */ +public final class DeleteFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.DeleteFeedRequest) + DeleteFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteFeedRequest.newBuilder() to construct. + private DeleteFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteFeedRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.class, com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.DeleteFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest other = (com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.DeleteFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.DeleteFeedRequest) + com.google.cloud.asset.v1p2beta1.DeleteFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.class, com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest build() { + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest buildPartial() { + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest result = new com.google.cloud.asset.v1p2beta1.DeleteFeedRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.DeleteFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.DeleteFeedRequest other) { + if (other == com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.DeleteFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.DeleteFeedRequest) + private static final com.google.cloud.asset.v1p2beta1.DeleteFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.DeleteFeedRequest(); + } + + public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java new file mode 100644 index 000000000000..7e01ca30edd5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface DeleteFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.DeleteFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java new file mode 100644 index 000000000000..3b05f4e0d247 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java @@ -0,0 +1,1677 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * An asset feed used to export asset updates to a destinations.
+ * An asset feed filter controls what updates are exported.
+ * The asset feed must be created within a project, organization, or
+ * folder. Supported destinations are:
+ * Cloud Pub/Sub topics.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.Feed} + */ +public final class Feed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.Feed) + FeedOrBuilder { +private static final long serialVersionUID = 0L; + // Use Feed.newBuilder() to construct. + private Feed(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Feed() { + name_ = ""; + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Feed(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Feed( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetNames_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + assetTypes_.add(s); + break; + } + case 32: { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 42: { + com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder subBuilder = null; + if (feedOutputConfig_ != null) { + subBuilder = feedOutputConfig_.toBuilder(); + } + feedOutputConfig_ = input.readMessage(com.google.cloud.asset.v1p2beta1.FeedOutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(feedOutputConfig_); + feedOutputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetNames_ = assetNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.Feed.class, com.google.cloud.asset.v1p2beta1.Feed.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList assetNames_; + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + public com.google.protobuf.ProtocolStringList + getAssetNamesList() { + return assetNames_; + } + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + public int getAssetNamesCount() { + return assetNames_.size(); + } + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + public java.lang.String getAssetNames(int index) { + return assetNames_.get(index); + } + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + public com.google.protobuf.ByteString + getAssetNamesBytes(int index) { + return assetNames_.getByteString(index); + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 4; + private int contentType_; + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p2beta1.ContentType result = com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; + } + + public static final int FEED_OUTPUT_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1p2beta1.FeedOutputConfig feedOutputConfig_; + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feedOutputConfig field is set. + */ + @java.lang.Override + public boolean hasFeedOutputConfig() { + return feedOutputConfig_ != null; + } + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedOutputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() { + return feedOutputConfig_ == null ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; + } + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { + return getFeedOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < assetNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i)); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (contentType_ != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, contentType_); + } + if (feedOutputConfig_ != null) { + output.writeMessage(5, getFeedOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < assetNames_.size(); i++) { + dataSize += computeStringSizeNoTag(assetNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (contentType_ != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, contentType_); + } + if (feedOutputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getFeedOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.Feed)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.Feed other = (com.google.cloud.asset.v1p2beta1.Feed) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAssetNamesList() + .equals(other.getAssetNamesList())) return false; + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (contentType_ != other.contentType_) return false; + if (hasFeedOutputConfig() != other.hasFeedOutputConfig()) return false; + if (hasFeedOutputConfig()) { + if (!getFeedOutputConfig() + .equals(other.getFeedOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getAssetNamesCount() > 0) { + hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAssetNamesList().hashCode(); + } + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + if (hasFeedOutputConfig()) { + hash = (37 * hash) + FEED_OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFeedOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.Feed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset feed used to export asset updates to a destinations.
+   * An asset feed filter controls what updates are exported.
+   * The asset feed must be created within a project, organization, or
+   * folder. Supported destinations are:
+   * Cloud Pub/Sub topics.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.Feed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.Feed) + com.google.cloud.asset.v1p2beta1.FeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.Feed.class, com.google.cloud.asset.v1p2beta1.Feed.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.Feed.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + contentType_ = 0; + + if (feedOutputConfigBuilder_ == null) { + feedOutputConfig_ = null; + } else { + feedOutputConfig_ = null; + feedOutputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Feed getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Feed build() { + com.google.cloud.asset.v1p2beta1.Feed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Feed buildPartial() { + com.google.cloud.asset.v1p2beta1.Feed result = new com.google.cloud.asset.v1p2beta1.Feed(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (((bitField0_ & 0x00000001) != 0)) { + assetNames_ = assetNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetNames_ = assetNames_; + if (((bitField0_ & 0x00000002) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.assetTypes_ = assetTypes_; + result.contentType_ = contentType_; + if (feedOutputConfigBuilder_ == null) { + result.feedOutputConfig_ = feedOutputConfig_; + } else { + result.feedOutputConfig_ = feedOutputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.Feed) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.Feed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Feed other) { + if (other == com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.assetNames_.isEmpty()) { + if (assetNames_.isEmpty()) { + assetNames_ = other.assetNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetNamesIsMutable(); + assetNames_.addAll(other.assetNames_); + } + onChanged(); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.hasFeedOutputConfig()) { + mergeFeedOutputConfig(other.getFeedOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.Feed parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.Feed) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The format will be
+     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+     * The client-assigned feed identifier must be unique within the parent
+     * project/folder/organization.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + public com.google.protobuf.ProtocolStringList + getAssetNamesList() { + return assetNames_.getUnmodifiableView(); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + public int getAssetNamesCount() { + return assetNames_.size(); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + public java.lang.String getAssetNames(int index) { + return assetNames_.get(index); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + public com.google.protobuf.ByteString + getAssetNamesBytes(int index) { + return assetNames_.getByteString(index); + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @param index The index to set the value at. + * @param value The assetNames to set. + * @return This builder for chaining. + */ + public Builder setAssetNames( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetNamesIsMutable(); + assetNames_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @param value The assetNames to add. + * @return This builder for chaining. + */ + public Builder addAssetNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetNamesIsMutable(); + assetNames_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @param values The assetNames to add. + * @return This builder for chaining. + */ + public Builder addAllAssetNames( + java.lang.Iterable values) { + ensureAssetNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetNames_); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @return This builder for chaining. + */ + public Builder clearAssetNames() { + assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of the full names of the assets to receive updates. You must specify
+     * either or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed. For
+     * example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more info.
+     * 
+ * + * repeated string asset_names = 2; + * @param value The bytes of the assetNames to add. + * @return This builder for chaining. + */ + public Builder addAssetNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetNamesIsMutable(); + assetNames_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A list of types of the assets to receive updates. You must specify either
+     * or both of asset_names and asset_types. Only asset updates matching
+     * specified asset_names and asset_types are exported to the feed.
+     * For example:
+     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p2beta1.ContentType result = com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1p2beta1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name and
+     * type will be returned.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p2beta1.FeedOutputConfig feedOutputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.FeedOutputConfig, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder, com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder> feedOutputConfigBuilder_; + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feedOutputConfig field is set. + */ + public boolean hasFeedOutputConfig() { + return feedOutputConfigBuilder_ != null || feedOutputConfig_ != null; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedOutputConfig. + */ + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() { + if (feedOutputConfigBuilder_ == null) { + return feedOutputConfig_ == null ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; + } else { + return feedOutputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) { + if (feedOutputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + feedOutputConfig_ = value; + onChanged(); + } else { + feedOutputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeedOutputConfig( + com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder builderForValue) { + if (feedOutputConfigBuilder_ == null) { + feedOutputConfig_ = builderForValue.build(); + onChanged(); + } else { + feedOutputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) { + if (feedOutputConfigBuilder_ == null) { + if (feedOutputConfig_ != null) { + feedOutputConfig_ = + com.google.cloud.asset.v1p2beta1.FeedOutputConfig.newBuilder(feedOutputConfig_).mergeFrom(value).buildPartial(); + } else { + feedOutputConfig_ = value; + } + onChanged(); + } else { + feedOutputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFeedOutputConfig() { + if (feedOutputConfigBuilder_ == null) { + feedOutputConfig_ = null; + onChanged(); + } else { + feedOutputConfig_ = null; + feedOutputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder getFeedOutputConfigBuilder() { + + onChanged(); + return getFeedOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { + if (feedOutputConfigBuilder_ != null) { + return feedOutputConfigBuilder_.getMessageOrBuilder(); + } else { + return feedOutputConfig_ == null ? + com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; + } + } + /** + *
+     * Required. Feed output configuration defining where the asset updates are
+     * published to.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.FeedOutputConfig, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder, com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder> + getFeedOutputConfigFieldBuilder() { + if (feedOutputConfigBuilder_ == null) { + feedOutputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.FeedOutputConfig, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder, com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder>( + getFeedOutputConfig(), + getParentForChildren(), + isClean()); + feedOutputConfig_ = null; + } + return feedOutputConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.Feed) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Feed) + private static final com.google.cloud.asset.v1p2beta1.Feed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.Feed(); + } + + public static com.google.cloud.asset.v1p2beta1.Feed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Feed(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Feed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java new file mode 100644 index 000000000000..1c7c622a2f33 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java @@ -0,0 +1,368 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class FeedName implements ResourceName { + private static final PathTemplate PROJECT_FEED = + PathTemplate.createWithoutUrlEncoding("projects/{project}/feeds/{feed}"); + private static final PathTemplate FOLDER_FEED = + PathTemplate.createWithoutUrlEncoding("folders/{folder}/feeds/{feed}"); + private static final PathTemplate ORGANIZATION_FEED = + PathTemplate.createWithoutUrlEncoding("organizations/{organization}/feeds/{feed}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String feed; + private final String folder; + private final String organization; + + @Deprecated + protected FeedName() { + project = null; + feed = null; + folder = null; + organization = null; + } + + private FeedName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + feed = Preconditions.checkNotNull(builder.getFeed()); + folder = null; + organization = null; + pathTemplate = PROJECT_FEED; + } + + private FeedName(FolderFeedBuilder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + feed = Preconditions.checkNotNull(builder.getFeed()); + project = null; + organization = null; + pathTemplate = FOLDER_FEED; + } + + private FeedName(OrganizationFeedBuilder builder) { + organization = Preconditions.checkNotNull(builder.getOrganization()); + feed = Preconditions.checkNotNull(builder.getFeed()); + project = null; + folder = null; + pathTemplate = ORGANIZATION_FEED; + } + + public String getProject() { + return project; + } + + public String getFeed() { + return feed; + } + + public String getFolder() { + return folder; + } + + public String getOrganization() { + return organization; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectFeedBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static FolderFeedBuilder newFolderFeedBuilder() { + return new FolderFeedBuilder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static OrganizationFeedBuilder newOrganizationFeedBuilder() { + return new OrganizationFeedBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static FeedName of(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeedName ofProjectFeedName(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeedName ofFolderFeedName(String folder, String feed) { + return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static FeedName ofOrganizationFeedName(String organization, String feed) { + return newOrganizationFeedBuilder().setOrganization(organization).setFeed(feed).build(); + } + + public static String format(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectFeedName(String project, String feed) { + return newBuilder().setProject(project).setFeed(feed).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatFolderFeedName(String folder, String feed) { + return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatOrganizationFeedName(String organization, String feed) { + return newOrganizationFeedBuilder() + .setOrganization(organization) + .setFeed(feed) + .build() + .toString(); + } + + public static FeedName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_FEED.matches(formattedString)) { + Map matchMap = PROJECT_FEED.match(formattedString); + return ofProjectFeedName(matchMap.get("project"), matchMap.get("feed")); + } else if (FOLDER_FEED.matches(formattedString)) { + Map matchMap = FOLDER_FEED.match(formattedString); + return ofFolderFeedName(matchMap.get("folder"), matchMap.get("feed")); + } else if (ORGANIZATION_FEED.matches(formattedString)) { + Map matchMap = ORGANIZATION_FEED.match(formattedString); + return ofOrganizationFeedName(matchMap.get("organization"), matchMap.get("feed")); + } + throw new ValidationException("FeedName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (FeedName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_FEED.matches(formattedString) + || FOLDER_FEED.matches(formattedString) + || ORGANIZATION_FEED.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (feed != null) { + fieldMapBuilder.put("feed", feed); + } + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (organization != null) { + fieldMapBuilder.put("organization", organization); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + FeedName that = ((FeedName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.feed, that.feed) + && Objects.equals(this.folder, that.folder) + && Objects.equals(this.organization, that.organization); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(feed); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(organization); + return h; + } + + /** Builder for projects/{project}/feeds/{feed}. */ + public static class Builder { + private String project; + private String feed; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getFeed() { + return feed; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setFeed(String feed) { + this.feed = feed; + return this; + } + + private Builder(FeedName feedName) { + Preconditions.checkArgument( + Objects.equals(feedName.pathTemplate, PROJECT_FEED), + "toBuilder is only supported when FeedName has the pattern of projects/{project}/feeds/{feed}"); + this.project = feedName.project; + this.feed = feedName.feed; + } + + public FeedName build() { + return new FeedName(this); + } + } + + /** Builder for folders/{folder}/feeds/{feed}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class FolderFeedBuilder { + private String folder; + private String feed; + + protected FolderFeedBuilder() {} + + public String getFolder() { + return folder; + } + + public String getFeed() { + return feed; + } + + public FolderFeedBuilder setFolder(String folder) { + this.folder = folder; + return this; + } + + public FolderFeedBuilder setFeed(String feed) { + this.feed = feed; + return this; + } + + public FeedName build() { + return new FeedName(this); + } + } + + /** Builder for organizations/{organization}/feeds/{feed}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class OrganizationFeedBuilder { + private String organization; + private String feed; + + protected OrganizationFeedBuilder() {} + + public String getOrganization() { + return organization; + } + + public String getFeed() { + return feed; + } + + public OrganizationFeedBuilder setOrganization(String organization) { + this.organization = organization; + return this; + } + + public OrganizationFeedBuilder setFeed(String feed) { + this.feed = feed; + return this; + } + + public FeedName build() { + return new FeedName(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java new file mode 100644 index 000000000000..66d4f439178e --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java @@ -0,0 +1,224 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface FeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.Feed) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The format will be
+   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
+   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
+   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
+   * The client-assigned feed identifier must be unique within the parent
+   * project/folder/organization.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @return A list containing the assetNames. + */ + java.util.List + getAssetNamesList(); + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @return The count of assetNames. + */ + int getAssetNamesCount(); + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the element to return. + * @return The assetNames at the given index. + */ + java.lang.String getAssetNames(int index); + /** + *
+   * A list of the full names of the assets to receive updates. You must specify
+   * either or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed. For
+   * example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more info.
+   * 
+ * + * repeated string asset_names = 2; + * @param index The index of the value to return. + * @return The bytes of the assetNames at the given index. + */ + com.google.protobuf.ByteString + getAssetNamesBytes(int index); + + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * A list of types of the assets to receive updates. You must specify either
+   * or both of asset_names and asset_types. Only asset updates matching
+   * specified asset_names and asset_types are exported to the feed.
+   * For example:
+   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + *
+   * Asset content type. If not specified, no content but the asset name and
+   * type will be returned.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; + * @return The contentType. + */ + com.google.cloud.asset.v1p2beta1.ContentType getContentType(); + + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feedOutputConfig field is set. + */ + boolean hasFeedOutputConfig(); + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The feedOutputConfig. + */ + com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig(); + /** + *
+   * Required. Feed output configuration defining where the asset updates are
+   * published to.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java new file mode 100644 index 000000000000..4eb85f514ded --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Output configuration for asset feed destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.FeedOutputConfig} + */ +public final class FeedOutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.FeedOutputConfig) + FeedOutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use FeedOutputConfig.newBuilder() to construct. + private FeedOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private FeedOutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FeedOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FeedOutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1p2beta1.PubsubDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.FeedOutputConfig.class, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PUBSUB_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: return PUBSUB_DESTINATION; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int PUBSUB_DESTINATION_FIELD_NUMBER = 1; + /** + *
+   * Destination on Cloud Pubsub.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + * @return Whether the pubsubDestination field is set. + */ + @java.lang.Override + public boolean hasPubsubDestination() { + return destinationCase_ == 1; + } + /** + *
+   * Destination on Cloud Pubsub.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + * @return The pubsubDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestination getPubsubDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); + } + /** + *
+   * Destination on Cloud Pubsub.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.FeedOutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.FeedOutputConfig other = (com.google.cloud.asset.v1p2beta1.FeedOutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getPubsubDestination() + .equals(other.getPubsubDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + PUBSUB_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getPubsubDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.FeedOutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output configuration for asset feed destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.FeedOutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.FeedOutputConfig) + com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.FeedOutputConfig.class, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.FeedOutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig build() { + com.google.cloud.asset.v1p2beta1.FeedOutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig buildPartial() { + com.google.cloud.asset.v1p2beta1.FeedOutputConfig result = new com.google.cloud.asset.v1p2beta1.FeedOutputConfig(this); + if (destinationCase_ == 1) { + if (pubsubDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = pubsubDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.FeedOutputConfig) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.FeedOutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.FeedOutputConfig other) { + if (other == com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case PUBSUB_DESTINATION: { + mergePubsubDestination(other.getPubsubDestination()); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.FeedOutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.FeedOutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.PubsubDestination, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder, com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder> pubsubDestinationBuilder_; + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + * @return Whether the pubsubDestination field is set. + */ + @java.lang.Override + public boolean hasPubsubDestination() { + return destinationCase_ == 1; + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + * @return The pubsubDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestination getPubsubDestination() { + if (pubsubDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return pubsubDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + public Builder setPubsubDestination(com.google.cloud.asset.v1p2beta1.PubsubDestination value) { + if (pubsubDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + pubsubDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + public Builder setPubsubDestination( + com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder builderForValue) { + if (pubsubDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + pubsubDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + public Builder mergePubsubDestination(com.google.cloud.asset.v1p2beta1.PubsubDestination value) { + if (pubsubDestinationBuilder_ == null) { + if (destinationCase_ == 1 && + destination_ != com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1p2beta1.PubsubDestination.newBuilder((com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + pubsubDestinationBuilder_.mergeFrom(value); + } else { + pubsubDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + public Builder clearPubsubDestination() { + if (pubsubDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + pubsubDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + public com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder getPubsubDestinationBuilder() { + return getPubsubDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { + if ((destinationCase_ == 1) && (pubsubDestinationBuilder_ != null)) { + return pubsubDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Pubsub.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.PubsubDestination, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder, com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder> + getPubsubDestinationFieldBuilder() { + if (pubsubDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); + } + pubsubDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.PubsubDestination, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder, com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder>( + (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged();; + return pubsubDestinationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.FeedOutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.FeedOutputConfig) + private static final com.google.cloud.asset.v1p2beta1.FeedOutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.FeedOutputConfig(); + } + + public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeedOutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FeedOutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java new file mode 100644 index 000000000000..be3215779213 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface FeedOutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.FeedOutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Destination on Cloud Pubsub.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + * @return Whether the pubsubDestination field is set. + */ + boolean hasPubsubDestination(); + /** + *
+   * Destination on Cloud Pubsub.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + * @return The pubsubDestination. + */ + com.google.cloud.asset.v1p2beta1.PubsubDestination getPubsubDestination(); + /** + *
+   * Destination on Cloud Pubsub.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; + */ + com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder(); + + public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java new file mode 100644 index 000000000000..976185abc7be --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java @@ -0,0 +1,750 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * A Cloud Storage location.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.GcsDestination} + */ +public final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.GcsDestination) + GcsDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 1; + objectUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.GcsDestination.class, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder.class); + } + + private int objectUriCase_ = 0; + private java.lang.Object objectUri_; + public enum ObjectUriCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + URI(1), + OBJECTURI_NOT_SET(0); + private final int value; + private ObjectUriCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ObjectUriCase valueOf(int value) { + return forNumber(value); + } + + public static ObjectUriCase forNumber(int value) { + switch (value) { + case 1: return URI; + case 0: return OBJECTURI_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ObjectUriCase + getObjectUriCase() { + return ObjectUriCase.forNumber( + objectUriCase_); + } + + public static final int URI_FIELD_NUMBER = 1; + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return objectUriCase_ == 1; + } + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 1) { + objectUri_ = s; + } + return s; + } + } + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 1) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (objectUriCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (objectUriCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.GcsDestination other = (com.google.cloud.asset.v1p2beta1.GcsDestination) obj; + + if (!getObjectUriCase().equals(other.getObjectUriCase())) return false; + switch (objectUriCase_) { + case 1: + if (!getUri() + .equals(other.getUri())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (objectUriCase_) { + case 1: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Cloud Storage location.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.GcsDestination) + com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.GcsDestination.class, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + objectUriCase_ = 0; + objectUri_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestination build() { + com.google.cloud.asset.v1p2beta1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestination buildPartial() { + com.google.cloud.asset.v1p2beta1.GcsDestination result = new com.google.cloud.asset.v1p2beta1.GcsDestination(this); + if (objectUriCase_ == 1) { + result.objectUri_ = objectUri_; + } + result.objectUriCase_ = objectUriCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.GcsDestination) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.GcsDestination other) { + if (other == com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance()) return this; + switch (other.getObjectUriCase()) { + case URI: { + objectUriCase_ = 1; + objectUri_ = other.objectUri_; + onChanged(); + break; + } + case OBJECTURI_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int objectUriCase_ = 0; + private java.lang.Object objectUri_; + public ObjectUriCase + getObjectUriCase() { + return ObjectUriCase.forNumber( + objectUriCase_); + } + + public Builder clearObjectUri() { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + return this; + } + + + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return objectUriCase_ == 1; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 1) { + objectUri_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 1) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + objectUriCase_ = 1; + objectUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + if (objectUriCase_ == 1) { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + objectUriCase_ = 1; + objectUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.GcsDestination) + private static final com.google.cloud.asset.v1p2beta1.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.GcsDestination(); + } + + public static com.google.cloud.asset.v1p2beta1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..083a2c545a11 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + boolean hasUri(); + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + public com.google.cloud.asset.v1p2beta1.GcsDestination.ObjectUriCase getObjectUriCase(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java new file mode 100644 index 000000000000..e5959c1a559d --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java @@ -0,0 +1,616 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Get asset feed request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.GetFeedRequest} + */ +public final class GetFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.GetFeedRequest) + GetFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetFeedRequest.newBuilder() to construct. + private GetFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetFeedRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.GetFeedRequest.class, com.google.cloud.asset.v1p2beta1.GetFeedRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.GetFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.GetFeedRequest other = (com.google.cloud.asset.v1p2beta1.GetFeedRequest) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.GetFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Get asset feed request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.GetFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.GetFeedRequest) + com.google.cloud.asset.v1p2beta1.GetFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.GetFeedRequest.class, com.google.cloud.asset.v1p2beta1.GetFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.GetFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GetFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.GetFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GetFeedRequest build() { + com.google.cloud.asset.v1p2beta1.GetFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GetFeedRequest buildPartial() { + com.google.cloud.asset.v1p2beta1.GetFeedRequest result = new com.google.cloud.asset.v1p2beta1.GetFeedRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.GetFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.GetFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.GetFeedRequest other) { + if (other == com.google.cloud.asset.v1p2beta1.GetFeedRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.GetFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.GetFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required. The name of the Feed and it must be in the format of:
+     * projects/project_number/feeds/feed_id
+     * folders/folder_number/feeds/feed_id
+     * organizations/organization_number/feeds/feed_id
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.GetFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.GetFeedRequest) + private static final com.google.cloud.asset.v1p2beta1.GetFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.GetFeedRequest(); + } + + public static com.google.cloud.asset.v1p2beta1.GetFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GetFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java new file mode 100644 index 000000000000..1e57a7098971 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface GetFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.GetFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Required. The name of the Feed and it must be in the format of:
+   * projects/project_number/feeds/feed_id
+   * folders/folder_number/feeds/feed_id
+   * organizations/organization_number/feeds/feed_id
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java new file mode 100644 index 000000000000..ce368c5c9d6a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * List asset feeds request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsRequest} + */ +public final class ListFeedsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.ListFeedsRequest) + ListFeedsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFeedsRequest.newBuilder() to construct. + private ListFeedsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFeedsRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFeedsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListFeedsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.ListFeedsRequest.class, com.google.cloud.asset.v1p2beta1.ListFeedsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.ListFeedsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.ListFeedsRequest other = (com.google.cloud.asset.v1p2beta1.ListFeedsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.ListFeedsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * List asset feeds request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.ListFeedsRequest) + com.google.cloud.asset.v1p2beta1.ListFeedsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.ListFeedsRequest.class, com.google.cloud.asset.v1p2beta1.ListFeedsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.ListFeedsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.ListFeedsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsRequest build() { + com.google.cloud.asset.v1p2beta1.ListFeedsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsRequest buildPartial() { + com.google.cloud.asset.v1p2beta1.ListFeedsRequest result = new com.google.cloud.asset.v1p2beta1.ListFeedsRequest(this); + result.parent_ = parent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.ListFeedsRequest) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.ListFeedsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ListFeedsRequest other) { + if (other == com.google.cloud.asset.v1p2beta1.ListFeedsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.ListFeedsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.ListFeedsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The parent project/folder/organization whose feeds are to be
+     * listed. It can only be using project/folder/organization number (such as
+     * "folders/12345")", or a project ID (such as "projects/my-project-id").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.ListFeedsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ListFeedsRequest) + private static final com.google.cloud.asset.v1p2beta1.ListFeedsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.ListFeedsRequest(); + } + + public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeedsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFeedsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java new file mode 100644 index 000000000000..65b8118c4c25 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface ListFeedsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.ListFeedsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The parent project/folder/organization whose feeds are to be
+   * listed. It can only be using project/folder/organization number (such as
+   * "folders/12345")", or a project ID (such as "projects/my-project-id").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java new file mode 100644 index 000000000000..cd36a48864a8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java @@ -0,0 +1,864 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} + */ +public final class ListFeedsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.ListFeedsResponse) + ListFeedsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListFeedsResponse.newBuilder() to construct. + private ListFeedsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListFeedsResponse() { + feeds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListFeedsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListFeedsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + feeds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + feeds_.add( + input.readMessage(com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + feeds_ = java.util.Collections.unmodifiableList(feeds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.ListFeedsResponse.class, com.google.cloud.asset.v1p2beta1.ListFeedsResponse.Builder.class); + } + + public static final int FEEDS_FIELD_NUMBER = 1; + private java.util.List feeds_; + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + @java.lang.Override + public java.util.List getFeedsList() { + return feeds_; + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + @java.lang.Override + public java.util.List + getFeedsOrBuilderList() { + return feeds_; + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + @java.lang.Override + public int getFeedsCount() { + return feeds_.size(); + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Feed getFeeds(int index) { + return feeds_.get(index); + } + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedsOrBuilder( + int index) { + return feeds_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < feeds_.size(); i++) { + output.writeMessage(1, feeds_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < feeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, feeds_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.ListFeedsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.ListFeedsResponse other = (com.google.cloud.asset.v1p2beta1.ListFeedsResponse) obj; + + if (!getFeedsList() + .equals(other.getFeedsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFeedsCount() > 0) { + hash = (37 * hash) + FEEDS_FIELD_NUMBER; + hash = (53 * hash) + getFeedsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.ListFeedsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.ListFeedsResponse) + com.google.cloud.asset.v1p2beta1.ListFeedsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.ListFeedsResponse.class, com.google.cloud.asset.v1p2beta1.ListFeedsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.ListFeedsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getFeedsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (feedsBuilder_ == null) { + feeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + feedsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.ListFeedsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsResponse build() { + com.google.cloud.asset.v1p2beta1.ListFeedsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsResponse buildPartial() { + com.google.cloud.asset.v1p2beta1.ListFeedsResponse result = new com.google.cloud.asset.v1p2beta1.ListFeedsResponse(this); + int from_bitField0_ = bitField0_; + if (feedsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + feeds_ = java.util.Collections.unmodifiableList(feeds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.feeds_ = feeds_; + } else { + result.feeds_ = feedsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.ListFeedsResponse) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.ListFeedsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ListFeedsResponse other) { + if (other == com.google.cloud.asset.v1p2beta1.ListFeedsResponse.getDefaultInstance()) return this; + if (feedsBuilder_ == null) { + if (!other.feeds_.isEmpty()) { + if (feeds_.isEmpty()) { + feeds_ = other.feeds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeedsIsMutable(); + feeds_.addAll(other.feeds_); + } + onChanged(); + } + } else { + if (!other.feeds_.isEmpty()) { + if (feedsBuilder_.isEmpty()) { + feedsBuilder_.dispose(); + feedsBuilder_ = null; + feeds_ = other.feeds_; + bitField0_ = (bitField0_ & ~0x00000001); + feedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFeedsFieldBuilder() : null; + } else { + feedsBuilder_.addAllMessages(other.feeds_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.ListFeedsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.ListFeedsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List feeds_ = + java.util.Collections.emptyList(); + private void ensureFeedsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + feeds_ = new java.util.ArrayList(feeds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> feedsBuilder_; + + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public java.util.List getFeedsList() { + if (feedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(feeds_); + } else { + return feedsBuilder_.getMessageList(); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public int getFeedsCount() { + if (feedsBuilder_ == null) { + return feeds_.size(); + } else { + return feedsBuilder_.getCount(); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1p2beta1.Feed getFeeds(int index) { + if (feedsBuilder_ == null) { + return feeds_.get(index); + } else { + return feedsBuilder_.getMessage(index); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder setFeeds( + int index, com.google.cloud.asset.v1p2beta1.Feed value) { + if (feedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedsIsMutable(); + feeds_.set(index, value); + onChanged(); + } else { + feedsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder setFeeds( + int index, com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.set(index, builderForValue.build()); + onChanged(); + } else { + feedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder addFeeds(com.google.cloud.asset.v1p2beta1.Feed value) { + if (feedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedsIsMutable(); + feeds_.add(value); + onChanged(); + } else { + feedsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder addFeeds( + int index, com.google.cloud.asset.v1p2beta1.Feed value) { + if (feedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFeedsIsMutable(); + feeds_.add(index, value); + onChanged(); + } else { + feedsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder addFeeds( + com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.add(builderForValue.build()); + onChanged(); + } else { + feedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder addFeeds( + int index, com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.add(index, builderForValue.build()); + onChanged(); + } else { + feedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder addAllFeeds( + java.lang.Iterable values) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, feeds_); + onChanged(); + } else { + feedsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder clearFeeds() { + if (feedsBuilder_ == null) { + feeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + feedsBuilder_.clear(); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public Builder removeFeeds(int index) { + if (feedsBuilder_ == null) { + ensureFeedsIsMutable(); + feeds_.remove(index); + onChanged(); + } else { + feedsBuilder_.remove(index); + } + return this; + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedsBuilder( + int index) { + return getFeedsFieldBuilder().getBuilder(index); + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedsOrBuilder( + int index) { + if (feedsBuilder_ == null) { + return feeds_.get(index); } else { + return feedsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public java.util.List + getFeedsOrBuilderList() { + if (feedsBuilder_ != null) { + return feedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(feeds_); + } + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1p2beta1.Feed.Builder addFeedsBuilder() { + return getFeedsFieldBuilder().addBuilder( + com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance()); + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public com.google.cloud.asset.v1p2beta1.Feed.Builder addFeedsBuilder( + int index) { + return getFeedsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance()); + } + /** + *
+     * A list of feeds.
+     * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + public java.util.List + getFeedsBuilderList() { + return getFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> + getFeedsFieldBuilder() { + if (feedsBuilder_ == null) { + feedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder>( + feeds_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + feeds_ = null; + } + return feedsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.ListFeedsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ListFeedsResponse) + private static final com.google.cloud.asset.v1p2beta1.ListFeedsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.ListFeedsResponse(); + } + + public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListFeedsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListFeedsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.ListFeedsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java new file mode 100644 index 000000000000..b80afe70fd20 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface ListFeedsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.ListFeedsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + java.util.List + getFeedsList(); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + com.google.cloud.asset.v1p2beta1.Feed getFeeds(int index); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + int getFeedsCount(); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + java.util.List + getFeedsOrBuilderList(); + /** + *
+   * A list of feeds.
+   * 
+ * + * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; + */ + com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java new file mode 100644 index 000000000000..59309fe7068f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Output configuration for export assets destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.OutputConfig} + */ +public final class OutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.OutputConfig) + OutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1p2beta1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1p2beta1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1p2beta1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.OutputConfig.class, com.google.cloud.asset.v1p2beta1.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: return GCS_DESTINATION; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.OutputConfig other = (com.google.cloud.asset.v1p2beta1.OutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output configuration for export assets destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.OutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.OutputConfig) + com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.OutputConfig.class, com.google.cloud.asset.v1p2beta1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.OutputConfig build() { + com.google.cloud.asset.v1p2beta1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.OutputConfig buildPartial() { + com.google.cloud.asset.v1p2beta1.OutputConfig result = new com.google.cloud.asset.v1p2beta1.OutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.OutputConfig) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.OutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.OutputConfig other) { + if (other == com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.GcsDestination, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.asset.v1p2beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1p2beta1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.asset.v1p2beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 && + destination_ != com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1p2beta1.GcsDestination.newBuilder((com.google.cloud.asset.v1p2beta1.GcsDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } else { + gcsDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.asset.v1p2beta1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.GcsDestination, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.GcsDestination, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder>( + (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged();; + return gcsDestinationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.OutputConfig) + private static final com.google.cloud.asset.v1p2beta1.OutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.OutputConfig(); + } + + public static com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..ce0072cbcb16 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface OutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + public com.google.cloud.asset.v1p2beta1.OutputConfig.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java new file mode 100644 index 000000000000..10650ce965e8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java @@ -0,0 +1,602 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * A Cloud Pubsub destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.PubsubDestination} + */ +public final class PubsubDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.PubsubDestination) + PubsubDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use PubsubDestination.newBuilder() to construct. + private PubsubDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PubsubDestination() { + topic_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PubsubDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PubsubDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + topic_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.PubsubDestination.class, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder.class); + } + + public static final int TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object topic_; + /** + *
+   * The name of the Cloud Pub/Sub topic to publish to.
+   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The topic. + */ + @java.lang.Override + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } + } + /** + *
+   * The name of the Cloud Pub/Sub topic to publish to.
+   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.PubsubDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.PubsubDestination other = (com.google.cloud.asset.v1p2beta1.PubsubDestination) obj; + + if (!getTopic() + .equals(other.getTopic())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.PubsubDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Cloud Pubsub destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.PubsubDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.PubsubDestination) + com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.PubsubDestination.class, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.PubsubDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + topic_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestination build() { + com.google.cloud.asset.v1p2beta1.PubsubDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestination buildPartial() { + com.google.cloud.asset.v1p2beta1.PubsubDestination result = new com.google.cloud.asset.v1p2beta1.PubsubDestination(this); + result.topic_ = topic_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.PubsubDestination) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.PubsubDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.PubsubDestination other) { + if (other == com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance()) return this; + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.PubsubDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.PubsubDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object topic_ = ""; + /** + *
+     * The name of the Cloud Pub/Sub topic to publish to.
+     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @return The topic. + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The name of the Cloud Pub/Sub topic to publish to.
+     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The name of the Cloud Pub/Sub topic to publish to.
+     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @param value The topic to set. + * @return This builder for chaining. + */ + public Builder setTopic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + topic_ = value; + onChanged(); + return this; + } + /** + *
+     * The name of the Cloud Pub/Sub topic to publish to.
+     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @return This builder for chaining. + */ + public Builder clearTopic() { + + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + /** + *
+     * The name of the Cloud Pub/Sub topic to publish to.
+     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+     * 
+ * + * string topic = 1; + * @param value The bytes for topic to set. + * @return This builder for chaining. + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + topic_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.PubsubDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.PubsubDestination) + private static final com.google.cloud.asset.v1p2beta1.PubsubDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.PubsubDestination(); + } + + public static com.google.cloud.asset.v1p2beta1.PubsubDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PubsubDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PubsubDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.PubsubDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java new file mode 100644 index 000000000000..e6d950141c14 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface PubsubDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.PubsubDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The name of the Cloud Pub/Sub topic to publish to.
+   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The topic. + */ + java.lang.String getTopic(); + /** + *
+   * The name of the Cloud Pub/Sub topic to publish to.
+   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
+   * 
+ * + * string topic = 1; + * @return The bytes for topic. + */ + com.google.protobuf.ByteString + getTopicBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java new file mode 100644 index 000000000000..49979cd20c15 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java @@ -0,0 +1,1633 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Representation of a cloud resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.Resource} + */ +public final class Resource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.Resource) + ResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Resource() { + version_ = ""; + discoveryDocumentUri_ = ""; + discoveryName_ = ""; + resourceUrl_ = ""; + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Resource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryDocumentUri_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUrl_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 50: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (data_ != null) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.Resource.class, com.google.cloud.asset.v1p2beta1.Resource.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object discoveryDocumentUri_; + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + @java.lang.Override + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } + } + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object discoveryName_; + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + @java.lang.Override + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } + } + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object resourceUrl_; + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + @java.lang.Override + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } + } + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 5; + private volatile java.lang.Object parent_; + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 6; + private com.google.protobuf.Struct data_; + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return data_ != null; + } + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.Struct getData() { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + return getData(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); + } + if (data_ != null) { + output.writeMessage(6, getData()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); + } + if (data_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getData()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.Resource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.Resource other = (com.google.cloud.asset.v1p2beta1.Resource) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getDiscoveryDocumentUri() + .equals(other.getDiscoveryDocumentUri())) return false; + if (!getDiscoveryName() + .equals(other.getDiscoveryName())) return false; + if (!getResourceUrl() + .equals(other.getResourceUrl())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData() + .equals(other.getData())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); + hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryName().hashCode(); + hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResourceUrl().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.Resource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Representation of a cloud resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.Resource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.Resource) + com.google.cloud.asset.v1p2beta1.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.Resource.class, com.google.cloud.asset.v1p2beta1.Resource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.Resource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + discoveryDocumentUri_ = ""; + + discoveryName_ = ""; + + resourceUrl_ = ""; + + parent_ = ""; + + if (dataBuilder_ == null) { + data_ = null; + } else { + data_ = null; + dataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Resource getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Resource build() { + com.google.cloud.asset.v1p2beta1.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Resource buildPartial() { + com.google.cloud.asset.v1p2beta1.Resource result = new com.google.cloud.asset.v1p2beta1.Resource(this); + result.version_ = version_; + result.discoveryDocumentUri_ = discoveryDocumentUri_; + result.discoveryName_ = discoveryName_; + result.resourceUrl_ = resourceUrl_; + result.parent_ = parent_; + if (dataBuilder_ == null) { + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.Resource) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.Resource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Resource other) { + if (other == com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getDiscoveryDocumentUri().isEmpty()) { + discoveryDocumentUri_ = other.discoveryDocumentUri_; + onChanged(); + } + if (!other.getDiscoveryName().isEmpty()) { + discoveryName_ = other.discoveryName_; + onChanged(); + } + if (!other.getResourceUrl().isEmpty()) { + resourceUrl_ = other.resourceUrl_; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasData()) { + mergeData(other.getData()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryDocumentUri_ = ""; + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return This builder for chaining. + */ + public Builder clearDiscoveryDocumentUri() { + + discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The bytes for discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryName_ = ""; + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @param value The discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryName_ = value; + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @return This builder for chaining. + */ + public Builder clearDiscoveryName() { + + discoveryName_ = getDefaultInstance().getDiscoveryName(); + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @param value The bytes for discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryName_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceUrl_ = ""; + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUrl_ = value; + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return This builder for chaining. + */ + public Builder clearResourceUrl() { + + resourceUrl_ = getDefaultInstance().getResourceUrl(); + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The bytes for resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct data_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + public boolean hasData() { + return dataBuilder_ != null || data_ != null; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + public com.google.protobuf.Struct getData() { + if (dataBuilder_ == null) { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData( + com.google.protobuf.Struct.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder mergeData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (data_ != null) { + data_ = + com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + dataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = null; + onChanged(); + } else { + data_ = null; + dataBuilder_ = null; + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.Struct.Builder getDataBuilder() { + + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : data_; + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getData(), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Resource) + private static final com.google.cloud.asset.v1p2beta1.Resource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.Resource(); + } + + public static com.google.cloud.asset.v1p2beta1.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java new file mode 100644 index 000000000000..8e45f66a2bb8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java @@ -0,0 +1,175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface ResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + java.lang.String getDiscoveryDocumentUri(); + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes(); + + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + java.lang.String getDiscoveryName(); + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + com.google.protobuf.ByteString + getDiscoveryNameBytes(); + + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + java.lang.String getResourceUrl(); + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + com.google.protobuf.ByteString + getResourceUrlBytes(); + + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + boolean hasData(); + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + com.google.protobuf.Struct getData(); + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + com.google.protobuf.StructOrBuilder getDataOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java new file mode 100644 index 000000000000..0aedc3535e0d --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java @@ -0,0 +1,984 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Temporal asset. In addition to the asset, the temporal asset includes the
+ * status of the asset and valid from and to time of it.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.TemporalAsset} + */ +public final class TemporalAsset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.TemporalAsset) + TemporalAssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use TemporalAsset.newBuilder() to construct. + private TemporalAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TemporalAsset() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TemporalAsset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TemporalAsset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1p2beta1.TimeWindow.Builder subBuilder = null; + if (window_ != null) { + subBuilder = window_.toBuilder(); + } + window_ = input.readMessage(com.google.cloud.asset.v1p2beta1.TimeWindow.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(window_); + window_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + deleted_ = input.readBool(); + break; + } + case 26: { + com.google.cloud.asset.v1p2beta1.Asset.Builder subBuilder = null; + if (asset_ != null) { + subBuilder = asset_.toBuilder(); + } + asset_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Asset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(asset_); + asset_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.TemporalAsset.class, com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder.class); + } + + public static final int WINDOW_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p2beta1.TimeWindow window_; + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + * @return Whether the window field is set. + */ + @java.lang.Override + public boolean hasWindow() { + return window_ != null; + } + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + * @return The window. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TimeWindow getWindow() { + return window_ == null ? com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() : window_; + } + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getWindowOrBuilder() { + return getWindow(); + } + + public static final int DELETED_FIELD_NUMBER = 2; + private boolean deleted_; + /** + *
+   * If the asset is deleted or not.
+   * 
+ * + * bool deleted = 2; + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + + public static final int ASSET_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p2beta1.Asset asset_; + /** + *
+   * Asset.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + * @return Whether the asset field is set. + */ + @java.lang.Override + public boolean hasAsset() { + return asset_ != null; + } + /** + *
+   * Asset.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + * @return The asset. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Asset getAsset() { + return asset_ == null ? com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance() : asset_; + } + /** + *
+   * Asset.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.AssetOrBuilder getAssetOrBuilder() { + return getAsset(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (window_ != null) { + output.writeMessage(1, getWindow()); + } + if (deleted_ != false) { + output.writeBool(2, deleted_); + } + if (asset_ != null) { + output.writeMessage(3, getAsset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (window_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getWindow()); + } + if (deleted_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, deleted_); + } + if (asset_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAsset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.TemporalAsset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.TemporalAsset other = (com.google.cloud.asset.v1p2beta1.TemporalAsset) obj; + + if (hasWindow() != other.hasWindow()) return false; + if (hasWindow()) { + if (!getWindow() + .equals(other.getWindow())) return false; + } + if (getDeleted() + != other.getDeleted()) return false; + if (hasAsset() != other.hasAsset()) return false; + if (hasAsset()) { + if (!getAsset() + .equals(other.getAsset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasWindow()) { + hash = (37 * hash) + WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getWindow().hashCode(); + } + hash = (37 * hash) + DELETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDeleted()); + if (hasAsset()) { + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.TemporalAsset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Temporal asset. In addition to the asset, the temporal asset includes the
+   * status of the asset and valid from and to time of it.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.TemporalAsset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.TemporalAsset) + com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.TemporalAsset.class, com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.TemporalAsset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (windowBuilder_ == null) { + window_ = null; + } else { + window_ = null; + windowBuilder_ = null; + } + deleted_ = false; + + if (assetBuilder_ == null) { + asset_ = null; + } else { + asset_ = null; + assetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TemporalAsset getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.TemporalAsset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TemporalAsset build() { + com.google.cloud.asset.v1p2beta1.TemporalAsset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TemporalAsset buildPartial() { + com.google.cloud.asset.v1p2beta1.TemporalAsset result = new com.google.cloud.asset.v1p2beta1.TemporalAsset(this); + if (windowBuilder_ == null) { + result.window_ = window_; + } else { + result.window_ = windowBuilder_.build(); + } + result.deleted_ = deleted_; + if (assetBuilder_ == null) { + result.asset_ = asset_; + } else { + result.asset_ = assetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.TemporalAsset) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.TemporalAsset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.TemporalAsset other) { + if (other == com.google.cloud.asset.v1p2beta1.TemporalAsset.getDefaultInstance()) return this; + if (other.hasWindow()) { + mergeWindow(other.getWindow()); + } + if (other.getDeleted() != false) { + setDeleted(other.getDeleted()); + } + if (other.hasAsset()) { + mergeAsset(other.getAsset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.TemporalAsset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.TemporalAsset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1p2beta1.TimeWindow window_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.TimeWindow, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder> windowBuilder_; + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + * @return Whether the window field is set. + */ + public boolean hasWindow() { + return windowBuilder_ != null || window_ != null; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + * @return The window. + */ + public com.google.cloud.asset.v1p2beta1.TimeWindow getWindow() { + if (windowBuilder_ == null) { + return window_ == null ? com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() : window_; + } else { + return windowBuilder_.getMessage(); + } + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + public Builder setWindow(com.google.cloud.asset.v1p2beta1.TimeWindow value) { + if (windowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + window_ = value; + onChanged(); + } else { + windowBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + public Builder setWindow( + com.google.cloud.asset.v1p2beta1.TimeWindow.Builder builderForValue) { + if (windowBuilder_ == null) { + window_ = builderForValue.build(); + onChanged(); + } else { + windowBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + public Builder mergeWindow(com.google.cloud.asset.v1p2beta1.TimeWindow value) { + if (windowBuilder_ == null) { + if (window_ != null) { + window_ = + com.google.cloud.asset.v1p2beta1.TimeWindow.newBuilder(window_).mergeFrom(value).buildPartial(); + } else { + window_ = value; + } + onChanged(); + } else { + windowBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + public Builder clearWindow() { + if (windowBuilder_ == null) { + window_ = null; + onChanged(); + } else { + window_ = null; + windowBuilder_ = null; + } + + return this; + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + public com.google.cloud.asset.v1p2beta1.TimeWindow.Builder getWindowBuilder() { + + onChanged(); + return getWindowFieldBuilder().getBuilder(); + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + public com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getWindowOrBuilder() { + if (windowBuilder_ != null) { + return windowBuilder_.getMessageOrBuilder(); + } else { + return window_ == null ? + com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() : window_; + } + } + /** + *
+     * The time window when the asset data and state was observed.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.TimeWindow, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder> + getWindowFieldBuilder() { + if (windowBuilder_ == null) { + windowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.TimeWindow, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder>( + getWindow(), + getParentForChildren(), + isClean()); + window_ = null; + } + return windowBuilder_; + } + + private boolean deleted_ ; + /** + *
+     * If the asset is deleted or not.
+     * 
+ * + * bool deleted = 2; + * @return The deleted. + */ + @java.lang.Override + public boolean getDeleted() { + return deleted_; + } + /** + *
+     * If the asset is deleted or not.
+     * 
+ * + * bool deleted = 2; + * @param value The deleted to set. + * @return This builder for chaining. + */ + public Builder setDeleted(boolean value) { + + deleted_ = value; + onChanged(); + return this; + } + /** + *
+     * If the asset is deleted or not.
+     * 
+ * + * bool deleted = 2; + * @return This builder for chaining. + */ + public Builder clearDeleted() { + + deleted_ = false; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p2beta1.Asset asset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Asset, com.google.cloud.asset.v1p2beta1.Asset.Builder, com.google.cloud.asset.v1p2beta1.AssetOrBuilder> assetBuilder_; + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + * @return Whether the asset field is set. + */ + public boolean hasAsset() { + return assetBuilder_ != null || asset_ != null; + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + * @return The asset. + */ + public com.google.cloud.asset.v1p2beta1.Asset getAsset() { + if (assetBuilder_ == null) { + return asset_ == null ? com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance() : asset_; + } else { + return assetBuilder_.getMessage(); + } + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + public Builder setAsset(com.google.cloud.asset.v1p2beta1.Asset value) { + if (assetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + asset_ = value; + onChanged(); + } else { + assetBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + public Builder setAsset( + com.google.cloud.asset.v1p2beta1.Asset.Builder builderForValue) { + if (assetBuilder_ == null) { + asset_ = builderForValue.build(); + onChanged(); + } else { + assetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + public Builder mergeAsset(com.google.cloud.asset.v1p2beta1.Asset value) { + if (assetBuilder_ == null) { + if (asset_ != null) { + asset_ = + com.google.cloud.asset.v1p2beta1.Asset.newBuilder(asset_).mergeFrom(value).buildPartial(); + } else { + asset_ = value; + } + onChanged(); + } else { + assetBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + public Builder clearAsset() { + if (assetBuilder_ == null) { + asset_ = null; + onChanged(); + } else { + asset_ = null; + assetBuilder_ = null; + } + + return this; + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + public com.google.cloud.asset.v1p2beta1.Asset.Builder getAssetBuilder() { + + onChanged(); + return getAssetFieldBuilder().getBuilder(); + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + public com.google.cloud.asset.v1p2beta1.AssetOrBuilder getAssetOrBuilder() { + if (assetBuilder_ != null) { + return assetBuilder_.getMessageOrBuilder(); + } else { + return asset_ == null ? + com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance() : asset_; + } + } + /** + *
+     * Asset.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Asset, com.google.cloud.asset.v1p2beta1.Asset.Builder, com.google.cloud.asset.v1p2beta1.AssetOrBuilder> + getAssetFieldBuilder() { + if (assetBuilder_ == null) { + assetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Asset, com.google.cloud.asset.v1p2beta1.Asset.Builder, com.google.cloud.asset.v1p2beta1.AssetOrBuilder>( + getAsset(), + getParentForChildren(), + isClean()); + asset_ = null; + } + return assetBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.TemporalAsset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.TemporalAsset) + private static final com.google.cloud.asset.v1p2beta1.TemporalAsset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.TemporalAsset(); + } + + public static com.google.cloud.asset.v1p2beta1.TemporalAsset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TemporalAsset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TemporalAsset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TemporalAsset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java new file mode 100644 index 000000000000..d927836ba421 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface TemporalAssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.TemporalAsset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + * @return Whether the window field is set. + */ + boolean hasWindow(); + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + * @return The window. + */ + com.google.cloud.asset.v1p2beta1.TimeWindow getWindow(); + /** + *
+   * The time window when the asset data and state was observed.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; + */ + com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getWindowOrBuilder(); + + /** + *
+   * If the asset is deleted or not.
+   * 
+ * + * bool deleted = 2; + * @return The deleted. + */ + boolean getDeleted(); + + /** + *
+   * Asset.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + * @return Whether the asset field is set. + */ + boolean hasAsset(); + /** + *
+   * Asset.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + * @return The asset. + */ + com.google.cloud.asset.v1p2beta1.Asset getAsset(); + /** + *
+   * Asset.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Asset asset = 3; + */ + com.google.cloud.asset.v1p2beta1.AssetOrBuilder getAssetOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java new file mode 100644 index 000000000000..37ab68d91017 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java @@ -0,0 +1,913 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * A time window of (start_time, end_time].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.TimeWindow} + */ +public final class TimeWindow extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.TimeWindow) + TimeWindowOrBuilder { +private static final long serialVersionUID = 0L; + // Use TimeWindow.newBuilder() to construct. + private TimeWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TimeWindow() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TimeWindow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TimeWindow( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.TimeWindow.class, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + *
+   * End time of the time window (inclusive).
+   * Current timestamp if not specified.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + *
+   * End time of the time window (inclusive).
+   * Current timestamp if not specified.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + *
+   * End time of the time window (inclusive).
+   * Current timestamp if not specified.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.TimeWindow)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.TimeWindow other = (com.google.cloud.asset.v1p2beta1.TimeWindow) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime() + .equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime() + .equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.TimeWindow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A time window of (start_time, end_time].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.TimeWindow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.TimeWindow) + com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.TimeWindow.class, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.TimeWindow.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TimeWindow getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TimeWindow build() { + com.google.cloud.asset.v1p2beta1.TimeWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TimeWindow buildPartial() { + com.google.cloud.asset.v1p2beta1.TimeWindow result = new com.google.cloud.asset.v1p2beta1.TimeWindow(this); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.TimeWindow) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.TimeWindow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.TimeWindow other) { + if (other == com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.TimeWindow parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.TimeWindow) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + *
+     * Start time of the time window (exclusive).
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getStartTime(), + getParentForChildren(), + isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + *
+     * End time of the time window (inclusive).
+     * Current timestamp if not specified.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getEndTime(), + getParentForChildren(), + isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.TimeWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.TimeWindow) + private static final com.google.cloud.asset.v1p2beta1.TimeWindow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.TimeWindow(); + } + + public static com.google.cloud.asset.v1p2beta1.TimeWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeWindow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimeWindow(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.TimeWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java new file mode 100644 index 000000000000..c80313df9f9c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/assets.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface TimeWindowOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.TimeWindow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + *
+   * Start time of the time window (exclusive).
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + *
+   * End time of the time window (inclusive).
+   * Current timestamp if not specified.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + *
+   * End time of the time window (inclusive).
+   * Current timestamp if not specified.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + *
+   * End time of the time window (inclusive).
+   * Current timestamp if not specified.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java new file mode 100644 index 000000000000..a6a771069257 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java @@ -0,0 +1,973 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +/** + *
+ * Update asset feed request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.UpdateFeedRequest} + */ +public final class UpdateFeedRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.UpdateFeedRequest) + UpdateFeedRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateFeedRequest.newBuilder() to construct. + private UpdateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateFeedRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateFeedRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateFeedRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1p2beta1.Feed.Builder subBuilder = null; + if (feed_ != null) { + subBuilder = feed_.toBuilder(); + } + feed_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(feed_); + feed_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.class, com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.Builder.class); + } + + public static final int FEED_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p2beta1.Feed feed_; + /** + *
+   * Required. The new values of feed details. It must match an existing feed and the
+   * field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + @java.lang.Override + public boolean hasFeed() { + return feed_ != null; + } + /** + *
+   * Required. The new values of feed details. It must match an existing feed and the
+   * field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.Feed getFeed() { + return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; + } + /** + *
+   * Required. The new values of feed details. It must match an existing feed and the
+   * field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { + return getFeed(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (feed_ != null) { + output.writeMessage(1, getFeed()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (feed_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getFeed()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p2beta1.UpdateFeedRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest other = (com.google.cloud.asset.v1p2beta1.UpdateFeedRequest) obj; + + if (hasFeed() != other.hasFeed()) return false; + if (hasFeed()) { + if (!getFeed() + .equals(other.getFeed())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask() + .equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFeed()) { + hash = (37 * hash) + FEED_FIELD_NUMBER; + hash = (53 * hash) + getFeed().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Update asset feed request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p2beta1.UpdateFeedRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.UpdateFeedRequest) + com.google.cloud.asset.v1p2beta1.UpdateFeedRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.class, com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (feedBuilder_ == null) { + feed_ = null; + } else { + feed_ = null; + feedBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest build() { + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest buildPartial() { + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest result = new com.google.cloud.asset.v1p2beta1.UpdateFeedRequest(this); + if (feedBuilder_ == null) { + result.feed_ = feed_; + } else { + result.feed_ = feedBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p2beta1.UpdateFeedRequest) { + return mergeFrom((com.google.cloud.asset.v1p2beta1.UpdateFeedRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest other) { + if (other == com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.getDefaultInstance()) return this; + if (other.hasFeed()) { + mergeFeed(other.getFeed()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p2beta1.UpdateFeedRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1p2beta1.Feed feed_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> feedBuilder_; + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + public boolean hasFeed() { + return feedBuilder_ != null || feed_ != null; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + public com.google.cloud.asset.v1p2beta1.Feed getFeed() { + if (feedBuilder_ == null) { + return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; + } else { + return feedBuilder_.getMessage(); + } + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { + if (feedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + feed_ = value; + onChanged(); + } else { + feedBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setFeed( + com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { + if (feedBuilder_ == null) { + feed_ = builderForValue.build(); + onChanged(); + } else { + feedBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { + if (feedBuilder_ == null) { + if (feed_ != null) { + feed_ = + com.google.cloud.asset.v1p2beta1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); + } else { + feed_ = value; + } + onChanged(); + } else { + feedBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearFeed() { + if (feedBuilder_ == null) { + feed_ = null; + onChanged(); + } else { + feed_ = null; + feedBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { + + onChanged(); + return getFeedFieldBuilder().getBuilder(); + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { + if (feedBuilder_ != null) { + return feedBuilder_.getMessageOrBuilder(); + } else { + return feed_ == null ? + com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; + } + } + /** + *
+     * Required. The new values of feed details. It must match an existing feed and the
+     * field `name` must be in the format of:
+     * projects/project_number/feeds/feed_id or
+     * folders/folder_number/feeds/feed_id or
+     * organizations/organization_number/feeds/feed_id.
+     * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> + getFeedFieldBuilder() { + if (feedBuilder_ == null) { + feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder>( + getFeed(), + getParentForChildren(), + isClean()); + feed_ = null; + } + return feedBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * Required. Only updates the `feed` fields indicated by this mask.
+     * The field mask must not be empty, and it must not contain fields that
+     * are immutable or only set by the server.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), + getParentForChildren(), + isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.UpdateFeedRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.UpdateFeedRequest) + private static final com.google.cloud.asset.v1p2beta1.UpdateFeedRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.UpdateFeedRequest(); + } + + public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFeedRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateFeedRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java new file mode 100644 index 000000000000..dc99969d8825 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p2beta1/asset_service.proto + +package com.google.cloud.asset.v1p2beta1; + +public interface UpdateFeedRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.UpdateFeedRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The new values of feed details. It must match an existing feed and the
+   * field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the feed field is set. + */ + boolean hasFeed(); + /** + *
+   * Required. The new values of feed details. It must match an existing feed and the
+   * field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The feed. + */ + com.google.cloud.asset.v1p2beta1.Feed getFeed(); + /** + *
+   * Required. The new values of feed details. It must match an existing feed and the
+   * field `name` must be in the format of:
+   * projects/project_number/feeds/feed_id or
+   * folders/folder_number/feeds/feed_id or
+   * organizations/organization_number/feeds/feed_id.
+   * 
+ * + * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder(); + + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * Required. Only updates the `feed` fields indicated by this mask.
+   * The field mask must not be empty, and it must not contain fields that
+   * are immutable or only set by the server.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto new file mode 100644 index 000000000000..92f285f86524 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto @@ -0,0 +1,259 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.asset.v1p2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/asset/v1p2beta1/assets.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1p2Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p2beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p2beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a feed in a parent project/folder/organization to listen to its + // asset updates. + rpc CreateFeed(CreateFeedRequest) returns (Feed) { + option (google.api.http) = { + post: "/v1p2beta1/{parent=*/*}/feeds" + body: "*" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about an asset feed. + rpc GetFeed(GetFeedRequest) returns (Feed) { + option (google.api.http) = { + get: "/v1p2beta1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all asset feeds in a parent project/folder/organization. + rpc ListFeeds(ListFeedsRequest) returns (ListFeedsResponse) { + option (google.api.http) = { + get: "/v1p2beta1/{parent=*/*}/feeds" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates an asset feed configuration. + rpc UpdateFeed(UpdateFeedRequest) returns (Feed) { + option (google.api.http) = { + patch: "/v1p2beta1/{feed.name=*/*/feeds/*}" + body: "*" + }; + option (google.api.method_signature) = "feed"; + } + + // Deletes an asset feed. + rpc DeleteFeed(DeleteFeedRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1p2beta1/{name=*/*/feeds/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Create asset feed request. +message CreateFeedRequest { + // Required. The name of the project/folder/organization where this feed + // should be created in. It can only be an organization number (such as + // "organizations/123"), a folder number (such as "folders/123"), a project ID + // (such as "projects/my-project-id")", or a project number (such as + // "projects/12345"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. This is the client-assigned asset feed identifier and it needs to + // be unique under a specific parent project/folder/organization. + string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The feed details. The field `name` must be empty and it will be generated + // in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Get asset feed request. +message GetFeedRequest { + // Required. The name of the Feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; +} + +// List asset feeds request. +message ListFeedsRequest { + // Required. The parent project/folder/organization whose feeds are to be + // listed. It can only be using project/folder/organization number (such as + // "folders/12345")", or a project ID (such as "projects/my-project-id"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; +} + +message ListFeedsResponse { + // A list of feeds. + repeated Feed feeds = 1; +} + +// Update asset feed request. +message UpdateFeedRequest { + // Required. The new values of feed details. It must match an existing feed and the + // field `name` must be in the format of: + // projects/project_number/feeds/feed_id or + // folders/folder_number/feeds/feed_id or + // organizations/organization_number/feeds/feed_id. + Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Only updates the `feed` fields indicated by this mask. + // The field mask must not be empty, and it must not contain fields that + // are immutable or only set by the server. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +message DeleteFeedRequest { + // Required. The name of the feed and it must be in the format of: + // projects/project_number/feeds/feed_id + // folders/folder_number/feeds/feed_id + // organizations/organization_number/feeds/feed_id + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Feed" + } + ]; +} + +// Output configuration for export assets destination. +message OutputConfig { + // Asset export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + } +} + +// A Cloud Storage location. +message GcsDestination { + // Required. + oneof object_uri { + // The uri of the Cloud Storage object. It's the same uri that is used by + // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + string uri = 1; + } +} + +// A Cloud Pubsub destination. +message PubsubDestination { + // The name of the Cloud Pub/Sub topic to publish to. + // For example: `projects/PROJECT_ID/topics/TOPIC_ID`. + string topic = 1; +} + +// Output configuration for asset feed destination. +message FeedOutputConfig { + // Asset feed destination. + oneof destination { + // Destination on Cloud Pubsub. + PubsubDestination pubsub_destination = 1; + } +} + +// An asset feed used to export asset updates to a destinations. +// An asset feed filter controls what updates are exported. +// The asset feed must be created within a project, organization, or +// folder. Supported destinations are: +// Cloud Pub/Sub topics. +message Feed { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Feed" + pattern: "projects/{project}/feeds/{feed}" + pattern: "folders/{folder}/feeds/{feed}" + pattern: "organizations/{organization}/feeds/{feed}" + history: ORIGINALLY_SINGLE_PATTERN + }; + + // Required. The format will be + // projects/{project_number}/feeds/{client-assigned_feed_identifier} or + // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or + // organizations/{organization_number}/feeds/{client-assigned_feed_identifier} + // + // The client-assigned feed identifier must be unique within the parent + // project/folder/organization. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of the full names of the assets to receive updates. You must specify + // either or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. For + // example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more info. + repeated string asset_names = 2; + + // A list of types of the assets to receive updates. You must specify either + // or both of asset_names and asset_types. Only asset updates matching + // specified asset_names and asset_types are exported to the feed. + // For example: + // "compute.googleapis.com/Disk" See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name and + // type will be returned. + ContentType content_type = 4; + + // Required. Feed output configuration defining where the asset updates are + // published to. + FeedOutputConfig feed_output_config = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Asset content type. +enum ContentType { + // Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0; + + // Resource metadata. + RESOURCE = 1; + + // The actual IAM policy set on a resource. + IAM_POLICY = 2; +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto new file mode 100644 index 000000000000..bc2a9c511f28 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto @@ -0,0 +1,124 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.asset.v1p2beta1; + +import "google/iam/v1/policy.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.v1p2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p2beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p2beta1"; + +// Temporal asset. In addition to the asset, the temporal asset includes the +// status of the asset and valid from and to time of it. +message TemporalAsset { + // The time window when the asset data and state was observed. + TimeWindow window = 1; + + // If the asset is deleted or not. + bool deleted = 2; + + // Asset. + Asset asset = 3; +} + +// A time window of (start_time, end_time]. +message TimeWindow { + // Start time of the time window (exclusive). + google.protobuf.Timestamp start_time = 1; + + // End time of the time window (inclusive). + // Current timestamp if not specified. + google.protobuf.Timestamp end_time = 2; +} + +// Cloud asset. This includes all Google Cloud Platform resources, +// Cloud IAM policies, and other non-GCP assets. +message Asset { + // The full name of the asset. For example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string name = 1; + + // Type of the asset. Example: "compute.googleapis.com/Disk". + string asset_type = 2; + + // Representation of the resource. + Resource resource = 3; + + // Representation of the actual Cloud IAM policy set on a cloud resource. For + // each resource, there must be at most one Cloud IAM policy set on it. + google.iam.v1.Policy iam_policy = 4; + + // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + // represented as a list of relative resource names. Ancestry path starts with + // the closest CRM ancestor and ends at root. If the asset is a CRM + // project/folder/organization, this starts from the asset itself. + // + // Example: ["projects/123456789", "folders/5432", "organizations/1234"] + repeated string ancestors = 6; +} + +// Representation of a cloud resource. +message Resource { + // The API version. Example: "v1". + string version = 1; + + // The URL of the discovery document containing the resource's JSON schema. + // For example: + // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + // It will be left unspecified for resources without a discovery-based API, + // such as Cloud Bigtable. + string discovery_document_uri = 2; + + // The JSON schema name listed in the discovery document. + // Example: "Project". It will be left unspecified for resources (such as + // Cloud Bigtable) without a discovery-based API. + string discovery_name = 3; + + // The REST URL for accessing the resource. An HTTP GET operation using this + // URL returns the resource itself. + // Example: + // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + // It will be left unspecified for resources without a REST API. + string resource_url = 4; + + // The full name of the immediate parent of this resource. See + // [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + // + // For GCP assets, it is the parent resource defined in the [Cloud IAM policy + // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + // For example: + // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + // + // For third-party assets, it is up to the users to define. + string parent = 5; + + // The content of the resource, in which some sensitive fields are scrubbed + // away and may not be present. + google.protobuf.Struct data = 6; +} diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..505cc911afaa --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; +import com.google.cloud.asset.v1p2beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..e42eabf71639 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..323d7ba473c6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_create_setendpoint_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; +import com.google.cloud.asset.v1p2beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java new file mode 100644 index 000000000000..2d5f5932fec3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_createfeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; +import com.google.cloud.asset.v1p2beta1.Feed; + +public class AsyncCreateFeed { + + public static void main(String[] args) throws Exception { + asyncCreateFeed(); + } + + public static void asyncCreateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + CreateFeedRequest request = + CreateFeedRequest.newBuilder() + .setParent("parent-995424086") + .setFeedId("feedId-1278410919") + .setFeed(Feed.newBuilder().build()) + .build(); + ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request); + // Do something. + Feed response = future.get(); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_createfeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java new file mode 100644 index 000000000000..0bb60b076b0c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_createfeed_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; +import com.google.cloud.asset.v1p2beta1.Feed; + +public class SyncCreateFeed { + + public static void main(String[] args) throws Exception { + syncCreateFeed(); + } + + public static void syncCreateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + CreateFeedRequest request = + CreateFeedRequest.newBuilder() + .setParent("parent-995424086") + .setFeedId("feedId-1278410919") + .setFeed(Feed.newBuilder().build()) + .build(); + Feed response = assetServiceClient.createFeed(request); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java new file mode 100644 index 000000000000..706e9c5cd649 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_createfeed_string_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; + +public class SyncCreateFeedString { + + public static void main(String[] args) throws Exception { + syncCreateFeedString(); + } + + public static void syncCreateFeedString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String parent = "parent-995424086"; + Feed response = assetServiceClient.createFeed(parent); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_createfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java new file mode 100644 index 000000000000..3c6eb4cfd28d --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; +import com.google.cloud.asset.v1p2beta1.FeedName; +import com.google.protobuf.Empty; + +public class AsyncDeleteFeed { + + public static void main(String[] args) throws Exception { + asyncDeleteFeed(); + } + + public static void asyncDeleteFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + DeleteFeedRequest request = + DeleteFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java new file mode 100644 index 000000000000..c1e9e3d83a5b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; +import com.google.cloud.asset.v1p2beta1.FeedName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeed { + + public static void main(String[] args) throws Exception { + syncDeleteFeed(); + } + + public static void syncDeleteFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + DeleteFeedRequest request = + DeleteFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + assetServiceClient.deleteFeed(request); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java new file mode 100644 index 000000000000..6e2ffada1bf0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_feedname_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.FeedName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeedFeedname { + + public static void main(String[] args) throws Exception { + syncDeleteFeedFeedname(); + } + + public static void syncDeleteFeedFeedname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + assetServiceClient.deleteFeed(name); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java new file mode 100644 index 000000000000..19f78d7f0d05 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_string_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.FeedName; +import com.google.protobuf.Empty; + +public class SyncDeleteFeedString { + + public static void main(String[] args) throws Exception { + syncDeleteFeedString(); + } + + public static void syncDeleteFeedString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); + assetServiceClient.deleteFeed(name); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java new file mode 100644 index 000000000000..0efa51f42907 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.FeedName; +import com.google.cloud.asset.v1p2beta1.GetFeedRequest; + +public class AsyncGetFeed { + + public static void main(String[] args) throws Exception { + asyncGetFeed(); + } + + public static void asyncGetFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + GetFeedRequest request = + GetFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request); + // Do something. + Feed response = future.get(); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java new file mode 100644 index 000000000000..af5e9e133f01 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.FeedName; +import com.google.cloud.asset.v1p2beta1.GetFeedRequest; + +public class SyncGetFeed { + + public static void main(String[] args) throws Exception { + syncGetFeed(); + } + + public static void syncGetFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + GetFeedRequest request = + GetFeedRequest.newBuilder() + .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) + .build(); + Feed response = assetServiceClient.getFeed(request); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java new file mode 100644 index 000000000000..792f043571e3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_feedname_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.FeedName; + +public class SyncGetFeedFeedname { + + public static void main(String[] args) throws Exception { + syncGetFeedFeedname(); + } + + public static void syncGetFeedFeedname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + Feed response = assetServiceClient.getFeed(name); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java new file mode 100644 index 000000000000..182b9732c758 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_string_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.FeedName; + +public class SyncGetFeedString { + + public static void main(String[] args) throws Exception { + syncGetFeedString(); + } + + public static void syncGetFeedString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); + Feed response = assetServiceClient.getFeed(name); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java new file mode 100644 index 000000000000..59655ddfbf41 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_listfeeds_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; + +public class AsyncListFeeds { + + public static void main(String[] args) throws Exception { + asyncListFeeds(); + } + + public static void asyncListFeeds() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListFeedsRequest request = + ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); + ApiFuture future = + assetServiceClient.listFeedsCallable().futureCall(request); + // Do something. + ListFeedsResponse response = future.get(); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_listfeeds_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java new file mode 100644 index 000000000000..58cac9c64acd --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_listfeeds_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; +import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; + +public class SyncListFeeds { + + public static void main(String[] args) throws Exception { + syncListFeeds(); + } + + public static void syncListFeeds() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListFeedsRequest request = + ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); + ListFeedsResponse response = assetServiceClient.listFeeds(request); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_listfeeds_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java new file mode 100644 index 000000000000..5f4045935400 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_listfeeds_string_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; + +public class SyncListFeedsString { + + public static void main(String[] args) throws Exception { + syncListFeedsString(); + } + + public static void syncListFeedsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + String parent = "parent-995424086"; + ListFeedsResponse response = assetServiceClient.listFeeds(parent); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_listfeeds_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java new file mode 100644 index 000000000000..0e89d9449f7d --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_updatefeed_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateFeed { + + public static void main(String[] args) throws Exception { + asyncUpdateFeed(); + } + + public static void asyncUpdateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + UpdateFeedRequest request = + UpdateFeedRequest.newBuilder() + .setFeed(Feed.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request); + // Do something. + Feed response = future.get(); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_updatefeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java new file mode 100644 index 000000000000..d78fe022bb41 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_updatefeed_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; +import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateFeed { + + public static void main(String[] args) throws Exception { + syncUpdateFeed(); + } + + public static void syncUpdateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + UpdateFeedRequest request = + UpdateFeedRequest.newBuilder() + .setFeed(Feed.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Feed response = assetServiceClient.updateFeed(request); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_updatefeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java new file mode 100644 index 000000000000..98258534de5c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetserviceclient_updatefeed_feed_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceClient; +import com.google.cloud.asset.v1p2beta1.Feed; + +public class SyncUpdateFeedFeed { + + public static void main(String[] args) throws Exception { + syncUpdateFeedFeed(); + } + + public static void syncUpdateFeedFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + Feed feed = Feed.newBuilder().build(); + Feed response = assetServiceClient.updateFeed(feed); + } + } +} +// [END asset_v1p2beta1_generated_assetserviceclient_updatefeed_feed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java new file mode 100644 index 000000000000..97b9c8702479 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p2beta1_generated_assetservicesettings_createfeed_sync] +import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; +import java.time.Duration; + +public class SyncCreateFeed { + + public static void main(String[] args) throws Exception { + syncCreateFeed(); + } + + public static void syncCreateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); + assetServiceSettingsBuilder + .createFeedSettings() + .setRetrySettings( + assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1p2beta1_generated_assetservicesettings_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java new file mode 100644 index 000000000000..9ff707d408be --- /dev/null +++ b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.stub.samples; + +// [START asset_v1p2beta1_generated_assetservicestubsettings_createfeed_sync] +import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; +import java.time.Duration; + +public class SyncCreateFeed { + + public static void main(String[] args) throws Exception { + syncCreateFeed(); + } + + public static void syncCreateFeed() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceStubSettings.Builder assetServiceSettingsBuilder = + AssetServiceStubSettings.newBuilder(); + assetServiceSettingsBuilder + .createFeedSettings() + .setRetrySettings( + assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1p2beta1_generated_assetservicestubsettings_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java new file mode 100644 index 000000000000..130fea08c0af --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java @@ -0,0 +1,400 @@ +/* + * Copyright 2022 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 com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStub; +import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Asset service definition. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   ListAssetsRequest request =
+ *       ListAssetsRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setReadTime(Timestamp.newBuilder().build())
+ *           .addAllAssetTypes(new ArrayList())
+ *           .setContentType(ContentType.forNumber(0))
+ *           .setPageSize(883849137)
+ *           .setPageToken("pageToken873572522")
+ *           .build();
+ *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AssetServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceClient implements BackgroundResource { + private final AssetServiceSettings settings; + private final AssetServiceStub stub; + + /** Constructs an instance of AssetServiceClient with default settings. */ + public static final AssetServiceClient create() throws IOException { + return create(AssetServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { + return new AssetServiceClient(settings); + } + + /** + * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AssetServiceSettings). + */ + public static final AssetServiceClient create(AssetServiceStub stub) { + return new AssetServiceClient(stub); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected AssetServiceClient(AssetServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AssetServiceClient(AssetServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AssetServiceSettings getSettings() { + return settings; + } + + public AssetServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { + return listAssetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Asset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsPagedCallable() { + return stub.listAssetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request);
+   *     for (Asset element : response.getAssetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsCallable() { + return stub.listAssetsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAssetsPagedResponse + extends AbstractPagedListResponse< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListAssetsPagedResponse(ListAssetsPage page) { + super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAssetsPage + extends AbstractPage { + + private ListAssetsPage( + PageContext context, + ListAssetsResponse response) { + super(context, response); + } + + private static ListAssetsPage createEmptyPage() { + return new ListAssetsPage(null, null); + } + + @Override + protected ListAssetsPage createPage( + PageContext context, + ListAssetsResponse response) { + return new ListAssetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAssetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + private ListAssetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAssetsFixedSizeCollection createEmptyCollection() { + return new ListAssetsFixedSizeCollection(null, 0); + } + + @Override + protected ListAssetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAssetsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java new file mode 100644 index 000000000000..5ad8e0041dc1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java @@ -0,0 +1,208 @@ +/* + * Copyright 2022 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 com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of listAssets to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .listAssetsSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).listAssetsSettings(); + } + + public static final AssetServiceSettings create(AssetServiceStubSettings stub) + throws IOException { + return new AssetServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AssetServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AssetServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AssetServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AssetServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AssetServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AssetServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AssetServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AssetServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AssetServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); + } + + public AssetServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AssetServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return getStubSettingsBuilder().listAssetsSettings(); + } + + @Override + public AssetServiceSettings build() throws IOException { + return new AssetServiceSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json new file mode 100644 index 000000000000..06316893be70 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json @@ -0,0 +1,21 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.asset.v1p5beta1", + "libraryPackage": "com.google.cloud.asset.v1p5beta1", + "services": { + "AssetService": { + "clients": { + "grpc": { + "libraryClient": "AssetServiceClient", + "rpcs": { + "ListAssets": { + "methods": ["listAssets", "listAssetsPagedCallable", "listAssetsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java new file mode 100644 index 000000000000..567e1650e8c0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= AssetServiceClient ======================= + * + *

Service Description: Asset service definition. + * + *

Sample for AssetServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   ListAssetsRequest request =
+ *       ListAssetsRequest.newBuilder()
+ *           .setParent("parent-995424086")
+ *           .setReadTime(Timestamp.newBuilder().build())
+ *           .addAllAssetTypes(new ArrayList())
+ *           .setContentType(ContentType.forNumber(0))
+ *           .setPageSize(883849137)
+ *           .setPageToken("pageToken873572522")
+ *           .build();
+ *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.asset.v1p5beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java new file mode 100644 index 000000000000..a04a59c0279a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 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.stub; + +import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; +import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class AssetServiceStub implements BackgroundResource { + + public UnaryCallable listAssetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); + } + + public UnaryCallable listAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java new file mode 100644 index 000000000000..cade28599fc0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java @@ -0,0 +1,393 @@ +/* + * Copyright 2022 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.stub; + +import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p5beta1.Asset; +import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; +import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of listAssets to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ *     AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .listAssetsSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings + listAssetsSettings; + + private static final PagedListDescriptor + LIST_ASSETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { + return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { + return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAssetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAssetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAssetsResponse payload) { + return payload.getAssetsList() == null + ? ImmutableList.of() + : payload.getAssetsList(); + } + }; + + private static final PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + LIST_ASSETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAssetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); + return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return listAssetsSettings; + } + + public AssetServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAssetServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAssetServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "cloudasset.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudasset.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listAssetsSettings = settingsBuilder.listAssetsSettings().build(); + } + + /** Builder for AssetServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + listAssetsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listAssetsSettings); + initDefaults(this); + } + + protected Builder(AssetServiceStubSettings settings) { + super(settings); + + listAssetsSettings = settings.listAssetsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listAssetsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return listAssetsSettings; + } + + @Override + public AssetServiceStubSettings build() throws IOException { + return new AssetServiceStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java new file mode 100644 index 000000000000..1a0d0cff1649 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java new file mode 100644 index 000000000000..9be0edcf03da --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java @@ -0,0 +1,173 @@ +/* + * Copyright 2022 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.stub; + +import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; +import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceStub extends AssetServiceStub { + private static final MethodDescriptor + listAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p5beta1.AssetService/ListAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAssetServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAssetServiceStub( + AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java new file mode 100644 index 000000000000..cec88147621b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssetServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java new file mode 100644 index 000000000000..ef08931ef00a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java @@ -0,0 +1,209 @@ +/* + * Copyright 2022 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.stub; + +import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; +import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssetServiceStub extends AssetServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + listAssetsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.asset.v1p5beta1.AssetService/ListAssets") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1p5beta1/{parent=*/*}/assets", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "assetTypes", request.getAssetTypesList()); + serializer.putQueryParam( + fields, "contentType", request.getContentType()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "readTime", request.getReadTime()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAssetServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAssetServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAssetServiceStub( + AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings listAssetsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listAssetsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..1514c3cb5c9a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java @@ -0,0 +1,145 @@ +/* + * Copyright 2022 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 com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.asset.v1p5beta1.stub.HttpJsonAssetServiceStub; +import com.google.common.collect.Lists; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAssetServiceStub.getMethodDescriptors(), + AssetServiceSettings.getDefaultEndpoint()); + AssetServiceSettings settings = + AssetServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent("parent-4715/parent-4715") + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent("parent-4715/parent-4715") + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listAssets(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java new file mode 100644 index 000000000000..3a07d88a6f06 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java @@ -0,0 +1,147 @@ +/* + * Copyright 2022 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 com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientTest { + private static MockAssetService mockAssetService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAssetService = new MockAssetService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AssetServiceSettings settings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent("parent-995424086") + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); + Assert.assertEquals(request.getAssetTypesList(), actualRequest.getAssetTypesList()); + Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent("parent-995424086") + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listAssets(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java new file mode 100644 index 000000000000..d7e1b31ac2d3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetService implements MockGrpcService { + private final MockAssetServiceImpl serviceImpl; + + public MockAssetService() { + serviceImpl = new MockAssetServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java new file mode 100644 index 000000000000..0da2b09706b6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java @@ -0,0 +1,81 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.cloud.asset.v1p5beta1.AssetServiceGrpc.AssetServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetServiceImpl extends AssetServiceImplBase { + private List requests; + private Queue responses; + + public MockAssetServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listAssets( + ListAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAssetsResponse) { + requests.add(request); + responseObserver.onNext(((ListAssetsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } +} 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/owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java new file mode 100644 index 000000000000..f931499fa9d2 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java @@ -0,0 +1,307 @@ +package com.google.cloud.asset.v1p5beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Asset service definition.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/asset/v1p5beta1/asset_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AssetServiceGrpc { + + private AssetServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.asset.v1p5beta1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor 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; + 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(); + } + } + } + return getListAssetsMethod; + } + + /** + * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * 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.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + 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>( + this, METHODID_LIST_ASSETS))) + .build(); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAssetsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * Lists assets with time and resource types and returns paged results in
+     * response.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listAssets( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_ASSETS = 0; + + 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 AssetServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AssetServiceImplBase 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_LIST_ASSETS: + serviceImpl.listAssets((com.google.cloud.asset.v1p5beta1.ListAssetsRequest) 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(); + } + } + } + + private static abstract 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.v1p5beta1.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 String methodName; + + AssetServiceMethodDescriptorSupplier(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(getListAssetsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java new file mode 100644 index 000000000000..a74a13f4f6d1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java @@ -0,0 +1,2774 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/assets.proto + +package com.google.cloud.asset.v1p5beta1; + +/** + *
+ * Cloud asset. This includes all Google Cloud Platform resources,
+ * Cloud IAM policies, and other non-GCP assets.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Asset} + */ +public final class Asset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.Asset) + AssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Asset() { + name_ = ""; + assetType_ = ""; + orgPolicy_ = java.util.Collections.emptyList(); + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Asset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Asset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + com.google.cloud.asset.v1p5beta1.Resource.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = input.readMessage(com.google.cloud.asset.v1p5beta1.Resource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (iamPolicy_ != null) { + subBuilder = iamPolicy_.toBuilder(); + } + iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamPolicy_); + iamPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + orgPolicy_.add( + input.readMessage(com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); + break; + } + case 58: { + com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; + if (accessContextPolicyCase_ == 7) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 7; + break; + } + case 66: { + com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; + if (accessContextPolicyCase_ == 8) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 8; + break; + } + case 74: { + com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = null; + if (accessContextPolicyCase_ == 9) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 9; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + ancestors_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.Asset.class, com.google.cloud.asset.v1p5beta1.Asset.Builder.class); + } + + private int accessContextPolicyCase_ = 0; + private java.lang.Object accessContextPolicy_; + public enum AccessContextPolicyCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ACCESS_POLICY(7), + ACCESS_LEVEL(8), + SERVICE_PERIMETER(9), + ACCESSCONTEXTPOLICY_NOT_SET(0); + private final int value; + private AccessContextPolicyCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AccessContextPolicyCase valueOf(int value) { + return forNumber(value); + } + + public static AccessContextPolicyCase forNumber(int value) { + switch (value) { + case 7: return ACCESS_POLICY; + case 8: return ACCESS_LEVEL; + case 9: return SERVICE_PERIMETER; + case 0: return ACCESSCONTEXTPOLICY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public AccessContextPolicyCase + getAccessContextPolicyCase() { + return AccessContextPolicyCase.forNumber( + accessContextPolicyCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p5beta1.Resource resource_; + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Resource getResource() { + return resource_ == null ? com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance() : resource_; + } + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder() { + return getResource(); + } + + public static final int IAM_POLICY_FIELD_NUMBER = 4; + private com.google.iam.v1.Policy iamPolicy_; + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + @java.lang.Override + public boolean hasIamPolicy() { + return iamPolicy_ != null; + } + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getIamPolicy() { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + return getIamPolicy(); + } + + public static final int ORG_POLICY_FIELD_NUMBER = 6; + private java.util.List orgPolicy_; + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public java.util.List getOrgPolicyList() { + return orgPolicy_; + } + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public java.util.List + getOrgPolicyOrBuilderList() { + return orgPolicy_; + } + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public int getOrgPolicyCount() { + return orgPolicy_.size(); + } + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { + return orgPolicy_.get(index); + } + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index) { + return orgPolicy_.get(index); + } + + public static final int ACCESS_POLICY_FIELD_NUMBER = 7; + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + @java.lang.Override + public boolean hasAccessPolicy() { + return accessContextPolicyCase_ == 7; + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + + public static final int ACCESS_LEVEL_FIELD_NUMBER = 8; + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + @java.lang.Override + public boolean hasAccessLevel() { + return accessContextPolicyCase_ == 8; + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + + public static final int SERVICE_PERIMETER_FIELD_NUMBER = 9; + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + @java.lang.Override + public boolean hasServicePerimeter() { + return accessContextPolicyCase_ == 9; + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + + public static final int ANCESTORS_FIELD_NUMBER = 10; + private com.google.protobuf.LazyStringList ancestors_; + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_; + } + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + if (resource_ != null) { + output.writeMessage(3, getResource()); + } + if (iamPolicy_ != null) { + output.writeMessage(4, getIamPolicy()); + } + for (int i = 0; i < orgPolicy_.size(); i++) { + output.writeMessage(6, orgPolicy_.get(i)); + } + if (accessContextPolicyCase_ == 7) { + output.writeMessage(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 8) { + output.writeMessage(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 9) { + output.writeMessage(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + } + for (int i = 0; i < ancestors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResource()); + } + if (iamPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIamPolicy()); + } + for (int i = 0; i < orgPolicy_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, orgPolicy_.get(i)); + } + if (accessContextPolicyCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + } + { + int dataSize = 0; + for (int i = 0; i < ancestors_.size(); i++) { + dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); + } + size += dataSize; + size += 1 * getAncestorsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p5beta1.Asset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p5beta1.Asset other = (com.google.cloud.asset.v1p5beta1.Asset) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (hasIamPolicy() != other.hasIamPolicy()) return false; + if (hasIamPolicy()) { + if (!getIamPolicy() + .equals(other.getIamPolicy())) return false; + } + if (!getOrgPolicyList() + .equals(other.getOrgPolicyList())) return false; + if (!getAncestorsList() + .equals(other.getAncestorsList())) return false; + if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false; + switch (accessContextPolicyCase_) { + case 7: + if (!getAccessPolicy() + .equals(other.getAccessPolicy())) return false; + break; + case 8: + if (!getAccessLevel() + .equals(other.getAccessLevel())) return false; + break; + case 9: + if (!getServicePerimeter() + .equals(other.getServicePerimeter())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + if (hasIamPolicy()) { + hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicy().hashCode(); + } + if (getOrgPolicyCount() > 0) { + hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getOrgPolicyList().hashCode(); + } + if (getAncestorsCount() > 0) { + hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAncestorsList().hashCode(); + } + switch (accessContextPolicyCase_) { + case 7: + hash = (37 * hash) + ACCESS_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAccessPolicy().hashCode(); + break; + case 8: + hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getAccessLevel().hashCode(); + break; + case 9: + hash = (37 * hash) + SERVICE_PERIMETER_FIELD_NUMBER; + hash = (53 * hash) + getServicePerimeter().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.Asset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Cloud asset. This includes all Google Cloud Platform resources,
+   * Cloud IAM policies, and other non-GCP assets.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Asset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.Asset) + com.google.cloud.asset.v1p5beta1.AssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.Asset.class, com.google.cloud.asset.v1p5beta1.Asset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p5beta1.Asset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getOrgPolicyFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + assetType_ = ""; + + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + if (orgPolicyBuilder_ == null) { + orgPolicy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + orgPolicyBuilder_.clear(); + } + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Asset getDefaultInstanceForType() { + return com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Asset build() { + com.google.cloud.asset.v1p5beta1.Asset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Asset buildPartial() { + com.google.cloud.asset.v1p5beta1.Asset result = new com.google.cloud.asset.v1p5beta1.Asset(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.assetType_ = assetType_; + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + if (iamPolicyBuilder_ == null) { + result.iamPolicy_ = iamPolicy_; + } else { + result.iamPolicy_ = iamPolicyBuilder_.build(); + } + if (orgPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.orgPolicy_ = orgPolicy_; + } else { + result.orgPolicy_ = orgPolicyBuilder_.build(); + } + if (accessContextPolicyCase_ == 7) { + if (accessPolicyBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = accessPolicyBuilder_.build(); + } + } + if (accessContextPolicyCase_ == 8) { + if (accessLevelBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = accessLevelBuilder_.build(); + } + } + if (accessContextPolicyCase_ == 9) { + if (servicePerimeterBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = servicePerimeterBuilder_.build(); + } + } + if (((bitField0_ & 0x00000002) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ancestors_ = ancestors_; + result.accessContextPolicyCase_ = accessContextPolicyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p5beta1.Asset) { + return mergeFrom((com.google.cloud.asset.v1p5beta1.Asset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.Asset other) { + if (other == com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (other.hasIamPolicy()) { + mergeIamPolicy(other.getIamPolicy()); + } + if (orgPolicyBuilder_ == null) { + if (!other.orgPolicy_.isEmpty()) { + if (orgPolicy_.isEmpty()) { + orgPolicy_ = other.orgPolicy_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOrgPolicyIsMutable(); + orgPolicy_.addAll(other.orgPolicy_); + } + onChanged(); + } + } else { + if (!other.orgPolicy_.isEmpty()) { + if (orgPolicyBuilder_.isEmpty()) { + orgPolicyBuilder_.dispose(); + orgPolicyBuilder_ = null; + orgPolicy_ = other.orgPolicy_; + bitField0_ = (bitField0_ & ~0x00000001); + orgPolicyBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOrgPolicyFieldBuilder() : null; + } else { + orgPolicyBuilder_.addAllMessages(other.orgPolicy_); + } + } + } + if (!other.ancestors_.isEmpty()) { + if (ancestors_.isEmpty()) { + ancestors_ = other.ancestors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAncestorsIsMutable(); + ancestors_.addAll(other.ancestors_); + } + onChanged(); + } + switch (other.getAccessContextPolicyCase()) { + case ACCESS_POLICY: { + mergeAccessPolicy(other.getAccessPolicy()); + break; + } + case ACCESS_LEVEL: { + mergeAccessLevel(other.getAccessLevel()); + break; + } + case SERVICE_PERIMETER: { + mergeServicePerimeter(other.getServicePerimeter()); + break; + } + case ACCESSCONTEXTPOLICY_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p5beta1.Asset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p5beta1.Asset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int accessContextPolicyCase_ = 0; + private java.lang.Object accessContextPolicy_; + public AccessContextPolicyCase + getAccessContextPolicyCase() { + return AccessContextPolicyCase.forNumber( + accessContextPolicyCase_); + } + + public Builder clearAccessContextPolicy() { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. For example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+     * See [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * Type of the asset. Example: "compute.googleapis.com/Disk".
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p5beta1.Resource resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p5beta1.Resource, com.google.cloud.asset.v1p5beta1.Resource.Builder, com.google.cloud.asset.v1p5beta1.ResourceOrBuilder> resourceBuilder_; + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + * @return The resource. + */ + public com.google.cloud.asset.v1p5beta1.Resource getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + public Builder setResource(com.google.cloud.asset.v1p5beta1.Resource value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + public Builder setResource( + com.google.cloud.asset.v1p5beta1.Resource.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + public Builder mergeResource(com.google.cloud.asset.v1p5beta1.Resource value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.asset.v1p5beta1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + public com.google.cloud.asset.v1p5beta1.Resource.Builder getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + public com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance() : resource_; + } + } + /** + *
+     * Representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p5beta1.Resource, com.google.cloud.asset.v1p5beta1.Resource.Builder, com.google.cloud.asset.v1p5beta1.ResourceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p5beta1.Resource, com.google.cloud.asset.v1p5beta1.Resource.Builder, com.google.cloud.asset.v1p5beta1.ResourceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private com.google.iam.v1.Policy iamPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + public boolean hasIamPolicy() { + return iamPolicyBuilder_ != null || iamPolicy_ != null; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + public com.google.iam.v1.Policy getIamPolicy() { + if (iamPolicyBuilder_ == null) { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } else { + return iamPolicyBuilder_.getMessage(); + } + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicy_ = value; + onChanged(); + } else { + iamPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy( + com.google.iam.v1.Policy.Builder builderForValue) { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = builderForValue.build(); + onChanged(); + } else { + iamPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (iamPolicy_ != null) { + iamPolicy_ = + com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); + } else { + iamPolicy_ = value; + } + onChanged(); + } else { + iamPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder clearIamPolicy() { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + onChanged(); + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + + return this; + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { + + onChanged(); + return getIamPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + if (iamPolicyBuilder_ != null) { + return iamPolicyBuilder_.getMessageOrBuilder(); + } else { + return iamPolicy_ == null ? + com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + } + /** + *
+     * Representation of the actual Cloud IAM policy set on a cloud resource. For
+     * each resource, there must be at most one Cloud IAM policy set on it.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> + getIamPolicyFieldBuilder() { + if (iamPolicyBuilder_ == null) { + iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( + getIamPolicy(), + getParentForChildren(), + isClean()); + iamPolicy_ = null; + } + return iamPolicyBuilder_; + } + + private java.util.List orgPolicy_ = + java.util.Collections.emptyList(); + private void ensureOrgPolicyIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = new java.util.ArrayList(orgPolicy_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> orgPolicyBuilder_; + + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List getOrgPolicyList() { + if (orgPolicyBuilder_ == null) { + return java.util.Collections.unmodifiableList(orgPolicy_); + } else { + return orgPolicyBuilder_.getMessageList(); + } + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public int getOrgPolicyCount() { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.size(); + } else { + return orgPolicyBuilder_.getCount(); + } + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.get(index); + } else { + return orgPolicyBuilder_.getMessage(index); + } + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder setOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.set(index, value); + onChanged(); + } else { + orgPolicyBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder setOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.set(index, builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.add(value); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.add(index, value); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(index, builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addAllOrgPolicy( + java.lang.Iterable values) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, orgPolicy_); + onChanged(); + } else { + orgPolicyBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder clearOrgPolicy() { + if (orgPolicyBuilder_ == null) { + orgPolicy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + orgPolicyBuilder_.clear(); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder removeOrgPolicy(int index) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.remove(index); + onChanged(); + } else { + orgPolicyBuilder_.remove(index); + } + return this; + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder getOrgPolicyBuilder( + int index) { + return getOrgPolicyFieldBuilder().getBuilder(index); + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index) { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.get(index); } else { + return orgPolicyBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List + getOrgPolicyOrBuilderList() { + if (orgPolicyBuilder_ != null) { + return orgPolicyBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orgPolicy_); + } + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder() { + return getOrgPolicyFieldBuilder().addBuilder( + com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder( + int index) { + return getOrgPolicyFieldBuilder().addBuilder( + index, com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); + } + /** + *
+     * Representation of the Cloud Organization Policy set on an asset. For each
+     * asset, there could be multiple Organization policies with different
+     * constraints.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List + getOrgPolicyBuilderList() { + return getOrgPolicyFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> + getOrgPolicyFieldBuilder() { + if (orgPolicyBuilder_ == null) { + orgPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder>( + orgPolicy_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + orgPolicy_ = null; + } + return orgPolicyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> accessPolicyBuilder_; + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + @java.lang.Override + public boolean hasAccessPolicy() { + return accessContextPolicyCase_ == 7; + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 7) { + return accessPolicyBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder setAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { + if (accessPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + accessPolicyBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 7; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder setAccessPolicy( + com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder builderForValue) { + if (accessPolicyBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + accessPolicyBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 7; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder mergeAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.newBuilder((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 7) { + accessPolicyBuilder_.mergeFrom(value); + } else { + accessPolicyBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 7; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder clearAccessPolicy() { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 7) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + accessPolicyBuilder_.clear(); + } + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder getAccessPolicyBuilder() { + return getAccessPolicyFieldBuilder().getBuilder(); + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { + if ((accessContextPolicyCase_ == 7) && (accessPolicyBuilder_ != null)) { + return accessPolicyBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + } + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> + getAccessPolicyFieldBuilder() { + if (accessPolicyBuilder_ == null) { + if (!(accessContextPolicyCase_ == 7)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + accessPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>( + (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 7; + onChanged();; + return accessPolicyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> accessLevelBuilder_; + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + @java.lang.Override + public boolean hasAccessLevel() { + return accessContextPolicyCase_ == 8; + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 8) { + return accessLevelBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder setAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { + if (accessLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + accessLevelBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 8; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder setAccessLevel( + com.google.identity.accesscontextmanager.v1.AccessLevel.Builder builderForValue) { + if (accessLevelBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + accessLevelBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 8; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder mergeAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.newBuilder((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 8) { + accessLevelBuilder_.mergeFrom(value); + } else { + accessLevelBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 8; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder clearAccessLevel() { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 8) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + accessLevelBuilder_.clear(); + } + return this; + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public com.google.identity.accesscontextmanager.v1.AccessLevel.Builder getAccessLevelBuilder() { + return getAccessLevelFieldBuilder().getBuilder(); + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { + if ((accessContextPolicyCase_ == 8) && (accessLevelBuilder_ != null)) { + return accessLevelBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + } + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> + getAccessLevelFieldBuilder() { + if (accessLevelBuilder_ == null) { + if (!(accessContextPolicyCase_ == 8)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + accessLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>( + (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 8; + onChanged();; + return accessLevelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> servicePerimeterBuilder_; + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + @java.lang.Override + public boolean hasServicePerimeter() { + return accessContextPolicyCase_ == 9; + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 9) { + return servicePerimeterBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder setServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { + if (servicePerimeterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + servicePerimeterBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 9; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder setServicePerimeter( + com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder builderForValue) { + if (servicePerimeterBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + servicePerimeterBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 9; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder mergeServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.newBuilder((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 9) { + servicePerimeterBuilder_.mergeFrom(value); + } else { + servicePerimeterBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 9; + return this; + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder clearServicePerimeter() { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 9) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + servicePerimeterBuilder_.clear(); + } + return this; + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder getServicePerimeterBuilder() { + return getServicePerimeterFieldBuilder().getBuilder(); + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { + if ((accessContextPolicyCase_ == 9) && (servicePerimeterBuilder_ != null)) { + return servicePerimeterBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + } + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> + getServicePerimeterFieldBuilder() { + if (servicePerimeterBuilder_ == null) { + if (!(accessContextPolicyCase_ == 9)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + servicePerimeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>( + (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 9; + onChanged();; + return servicePerimeterBuilder_; + } + + private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAncestorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_.getUnmodifiableView(); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index to set the value at. + * @param value The ancestors to set. + * @return This builder for chaining. + */ + public Builder setAncestors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @param value The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @param values The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAllAncestors( + java.lang.Iterable values) { + ensureAncestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ancestors_); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @return This builder for chaining. + */ + public Builder clearAncestors() { + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+     * represented as a list of relative resource names. Ancestry path starts with
+     * the closest CRM ancestor and ends at root. If the asset is a CRM
+     * project/folder/organization, this starts from the asset itself.
+     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+     * 
+ * + * repeated string ancestors = 10; + * @param value The bytes of the ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.Asset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.Asset) + private static final com.google.cloud.asset.v1p5beta1.Asset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.Asset(); + } + + public static com.google.cloud.asset.v1p5beta1.Asset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Asset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Asset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Asset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java new file mode 100644 index 000000000000..c54c20d16b1b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java @@ -0,0 +1,272 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/assets.proto + +package com.google.cloud.asset.v1p5beta1; + +public interface AssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.Asset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The full name of the asset. For example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+   * See [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * Type of the asset. Example: "compute.googleapis.com/Disk".
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + * @return The resource. + */ + com.google.cloud.asset.v1p5beta1.Resource getResource(); + /** + *
+   * Representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.Resource resource = 3; + */ + com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder(); + + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + boolean hasIamPolicy(); + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + com.google.iam.v1.Policy getIamPolicy(); + /** + *
+   * Representation of the actual Cloud IAM policy set on a cloud resource. For
+   * each resource, there must be at most one Cloud IAM policy set on it.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); + + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + java.util.List + getOrgPolicyList(); + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index); + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + int getOrgPolicyCount(); + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + java.util.List + getOrgPolicyOrBuilderList(); + /** + *
+   * Representation of the Cloud Organization Policy set on an asset. For each
+   * asset, there could be multiple Organization policies with different
+   * constraints.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index); + + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + boolean hasAccessPolicy(); + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy(); + /** + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder(); + + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + boolean hasAccessLevel(); + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel(); + /** + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder(); + + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + boolean hasServicePerimeter(); + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter(); + /** + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder(); + + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + java.util.List + getAncestorsList(); + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + int getAncestorsCount(); + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + java.lang.String getAncestors(int index); + /** + *
+   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
+   * represented as a list of relative resource names. Ancestry path starts with
+   * the closest CRM ancestor and ends at root. If the asset is a CRM
+   * project/folder/organization, this starts from the asset itself.
+   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + com.google.protobuf.ByteString + getAncestorsBytes(int index); + + public com.google.cloud.asset.v1p5beta1.Asset.AccessContextPolicyCase getAccessContextPolicyCase(); +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java new file mode 100644 index 000000000000..cab08c9049fa --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/assets.proto + +package com.google.cloud.asset.v1p5beta1; + +public final class AssetProto { + private AssetProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/asset/v1p5beta1/assets.pr" + + "oto\022\034google.cloud.asset.v1p5beta1\032\031googl" + + "e/api/resource.proto\032)google/cloud/orgpo" + + "licy/v1/orgpolicy.proto\032\032google/iam/v1/p" + + "olicy.proto\032:google/identity/accessconte" + + "xtmanager/v1/access_level.proto\032;google/" + + "identity/accesscontextmanager/v1/access_" + + "policy.proto\032?google/identity/accesscont" + + "extmanager/v1/service_perimeter.proto\032\034g" + + "oogle/protobuf/struct.proto\"\220\004\n\005Asset\022\014\n" + + "\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0228\n\010resou" + + "rce\030\003 \001(\0132&.google.cloud.asset.v1p5beta1" + + ".Resource\022)\n\niam_policy\030\004 \001(\0132\025.google.i" + + "am.v1.Policy\0225\n\norg_policy\030\006 \003(\0132!.googl" + + "e.cloud.orgpolicy.v1.Policy\022N\n\raccess_po" + + "licy\030\007 \001(\01325.google.identity.accessconte" + + "xtmanager.v1.AccessPolicyH\000\022L\n\014access_le" + + "vel\030\010 \001(\01324.google.identity.accesscontex" + + "tmanager.v1.AccessLevelH\000\022V\n\021service_per" + + "imeter\030\t \001(\01329.google.identity.accesscon" + + "textmanager.v1.ServicePerimeterH\000\022\021\n\tanc" + + "estors\030\n \003(\t:\'\352A$\n\037cloudasset.googleapis" + + ".com/Asset\022\001*B\027\n\025access_context_policy\"\240" + + "\001\n\010Resource\022\017\n\007version\030\001 \001(\t\022\036\n\026discover" + + "y_document_uri\030\002 \001(\t\022\026\n\016discovery_name\030\003" + + " \001(\t\022\024\n\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001" + + "(\t\022%\n\004data\030\006 \001(\0132\027.google.protobuf.Struc" + + "tB\264\001\n com.google.cloud.asset.v1p5beta1B\n" + + "AssetProtoP\001ZAgoogle.golang.org/genproto" + + "/googleapis/cloud/asset/v1p5beta1;asset\370" + + "\001\001\252\002\034Google.Cloud.Asset.V1p5Beta1\312\002\034Goog" + + "le\\Cloud\\Asset\\V1p5beta1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor, + new java.lang.String[] { "Name", "AssetType", "Resource", "IamPolicy", "OrgPolicy", "AccessPolicy", "AccessLevel", "ServicePerimeter", "Ancestors", "AccessContextPolicy", }); + internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor, + new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java new file mode 100644 index 000000000000..444c8baba5e8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java @@ -0,0 +1,104 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/asset_service.proto + +package com.google.cloud.asset.v1p5beta1; + +public final class AssetServiceProto { + private AssetServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/asset/v1p5beta1/asset_ser" + + "vice.proto\022\034google.cloud.asset.v1p5beta1" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032)google/cloud/asset/v1p5beta1/a" + + "ssets.proto\032\037google/protobuf/timestamp.p" + + "roto\"\324\001\n\021ListAssetsRequest\022\023\n\006parent\030\001 \001" + + "(\tB\003\340A\002\022-\n\tread_time\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\022\023\n\013asset_types\030\003 \003(\t\022?\n\014c" + + "ontent_type\030\004 \001(\0162).google.cloud.asset.v" + + "1p5beta1.ContentType\022\021\n\tpage_size\030\005 \001(\005\022" + + "\022\n\npage_token\030\006 \001(\t\"\221\001\n\022ListAssetsRespon" + + "se\022-\n\tread_time\030\001 \001(\0132\032.google.protobuf." + + "Timestamp\0223\n\006assets\030\002 \003(\0132#.google.cloud" + + ".asset.v1p5beta1.Asset\022\027\n\017next_page_toke" + + "n\030\003 \001(\t*l\n\013ContentType\022\034\n\030CONTENT_TYPE_U" + + "NSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY" + + "\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020\0052\367\001" + + "\n\014AssetService\022\227\001\n\nListAssets\022/.google.c" + + "loud.asset.v1p5beta1.ListAssetsRequest\0320" + + ".google.cloud.asset.v1p5beta1.ListAssets" + + "Response\"&\202\323\344\223\002 \022\036/v1p5beta1/{parent=*/*" + + "}/assets\032M\312A\031cloudasset.googleapis.com\322A" + + ".https://www.googleapis.com/auth/cloud-p" + + "latformB\270\001\n com.google.cloud.asset.v1p5b" + + "eta1B\021AssetServiceProtoP\001ZAgoogle.golang" + + ".org/genproto/googleapis/cloud/asset/v1p" + + "5beta1;asset\252\002\034Google.Cloud.Asset.V1P5Be" + + "ta1\312\002\034Google\\Cloud\\Asset\\V1p5beta1b\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.asset.v1p5beta1.AssetProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor, + new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "PageSize", "PageToken", }); + internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor, + new java.lang.String[] { "ReadTime", "Assets", "NextPageToken", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.asset.v1p5beta1.AssetProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java new file mode 100644 index 000000000000..edc9ca3e0510 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java @@ -0,0 +1,184 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/asset_service.proto + +package com.google.cloud.asset.v1p5beta1; + +/** + *
+ * Asset content type.
+ * 
+ * + * Protobuf enum {@code google.cloud.asset.v1p5beta1.ContentType} + */ +public enum ContentType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + CONTENT_TYPE_UNSPECIFIED(0), + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + RESOURCE(1), + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + IAM_POLICY(2), + /** + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + ORG_POLICY(4), + /** + *
+   * The Cloud Access context mananger Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + ACCESS_POLICY(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + public static final int RESOURCE_VALUE = 1; + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + public static final int IAM_POLICY_VALUE = 2; + /** + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + public static final int ORG_POLICY_VALUE = 4; + /** + *
+   * The Cloud Access context mananger Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + public static final int ACCESS_POLICY_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContentType forNumber(int value) { + switch (value) { + case 0: return CONTENT_TYPE_UNSPECIFIED; + case 1: return RESOURCE; + case 2: return IAM_POLICY; + case 4: return ORG_POLICY; + case 5: return ACCESS_POLICY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ContentType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ContentType findValueByNumber(int number) { + return ContentType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ContentType[] VALUES = values(); + + public static ContentType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ContentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p5beta1.ContentType) +} + diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java new file mode 100644 index 000000000000..b5cfe3b32d4c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java @@ -0,0 +1,1594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/asset_service.proto + +package com.google.cloud.asset.v1p5beta1; + +/** + *
+ * ListAssets request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsRequest} + */ +public final class ListAssetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.ListAssetsRequest) + ListAssetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAssetsRequest.newBuilder() to construct. + private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAssetsRequest() { + parent_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAssetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListAssetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 40: { + + pageSize_ = input.readInt32(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest.class, com.google.cloud.asset.v1p5beta1.ListAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. Name of the organization or project the assets belong to. Format:
+   * "organizations/[organization-number]" (such as "organizations/123"),
+   * "projects/[project-number]" (such as "projects/my-project-id"), or
+   * "projects/[project-id]" (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. Name of the organization or project the assets belong to. Format:
+   * "organizations/[organization-number]" (such as "organizations/123"),
+   * "projects/[project-number]" (such as "projects/my-project-id"), or
+   * "projects/[project-id]" (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+   * the current time will be used. Due to delays in resource data collection
+   * and indexing, there is a volatile window during which running the same
+   * query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+   * the current time will be used. Due to delays in resource data collection
+   * and indexing, there is a volatile window during which running the same
+   * query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+   * the current time will be used. Due to delays in resource data collection
+   * and indexing, there is a volatile window during which running the same
+   * query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 4; + private int contentType_; + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override public com.google.cloud.asset.v1p5beta1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p5beta1.ContentType result = com.google.cloud.asset.v1p5beta1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1p5beta1.ContentType.UNRECOGNIZED : result; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 5; + private int pageSize_; + /** + *
+   * The maximum number of assets to be returned in a single response. Default
+   * is 100, minimum is 1, and maximum is 1000.
+   * 
+ * + * int32 page_size = 5; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object pageToken_; + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (readTime_ != null) { + output.writeMessage(2, getReadTime()); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (contentType_ != com.google.cloud.asset.v1p5beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, contentType_); + } + if (pageSize_ != 0) { + output.writeInt32(5, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadTime()); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (contentType_ != com.google.cloud.asset.v1p5beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, contentType_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p5beta1.ListAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p5beta1.ListAssetsRequest other = (com.google.cloud.asset.v1p5beta1.ListAssetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (contentType_ != other.contentType_) return false; + if (getPageSize() + != other.getPageSize()) return false; + if (!getPageToken() + .equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.ListAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * ListAssets request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.ListAssetsRequest) + com.google.cloud.asset.v1p5beta1.ListAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.ListAssetsRequest.class, com.google.cloud.asset.v1p5beta1.ListAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p5beta1.ListAssetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + contentType_ = 0; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p5beta1.ListAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsRequest build() { + com.google.cloud.asset.v1p5beta1.ListAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsRequest buildPartial() { + com.google.cloud.asset.v1p5beta1.ListAssetsRequest result = new com.google.cloud.asset.v1p5beta1.ListAssetsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.contentType_ = contentType_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p5beta1.ListAssetsRequest) { + return mergeFrom((com.google.cloud.asset.v1p5beta1.ListAssetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.ListAssetsRequest other) { + if (other == com.google.cloud.asset.v1p5beta1.ListAssetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p5beta1.ListAssetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p5beta1.ListAssetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. Name of the organization or project the assets belong to. Format:
+     * "organizations/[organization-number]" (such as "organizations/123"),
+     * "projects/[project-number]" (such as "projects/my-project-id"), or
+     * "projects/[project-id]" (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. Name of the organization or project the assets belong to. Format:
+     * "organizations/[organization-number]" (such as "organizations/123"),
+     * "projects/[project-number]" (such as "projects/my-project-id"), or
+     * "projects/[project-id]" (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. Name of the organization or project the assets belong to. Format:
+     * "organizations/[organization-number]" (such as "organizations/123"),
+     * "projects/[project-number]" (such as "projects/my-project-id"), or
+     * "projects/[project-id]" (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Name of the organization or project the assets belong to. Format:
+     * "organizations/[organization-number]" (such as "organizations/123"),
+     * "projects/[project-number]" (such as "projects/my-project-id"), or
+     * "projects/[project-id]" (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. Name of the organization or project the assets belong to. Format:
+     * "organizations/[organization-number]" (such as "organizations/123"),
+     * "projects/[project-number]" (such as "projects/my-project-id"), or
+     * "projects/[project-id]" (such as "projects/12345").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+     * the current time will be used. Due to delays in resource data collection
+     * and indexing, there is a volatile window during which running the same
+     * query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of asset types of which to take a snapshot for. For  example:
+     * "compute.googleapis.com/Disk". If specified, only matching assets will be
+     * returned. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p5beta1.ContentType result = com.google.cloud.asset.v1p5beta1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1p5beta1.ContentType.UNRECOGNIZED : result; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1p5beta1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will
+     * be returned.
+     * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * The maximum number of assets to be returned in a single response. Default
+     * is 100, minimum is 1, and maximum is 1000.
+     * 
+ * + * int32 page_size = 5; + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + *
+     * The maximum number of assets to be returned in a single response. Default
+     * is 100, minimum is 1, and maximum is 1000.
+     * 
+ * + * int32 page_size = 5; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of assets to be returned in a single response. Default
+     * is 100, minimum is 1, and maximum is 1000.
+     * 
+ * + * int32 page_size = 5; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString + getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+     * prior `ListAssets` call, and the API should return the next page of assets.
+     * 
+ * + * string page_token = 6; + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.ListAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.ListAssetsRequest) + private static final com.google.cloud.asset.v1p5beta1.ListAssetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.ListAssetsRequest(); + } + + public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAssetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..38c78bebe193 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/asset_service.proto + +package com.google.cloud.asset.v1p5beta1; + +public interface ListAssetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.ListAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. Name of the organization or project the assets belong to. Format:
+   * "organizations/[organization-number]" (such as "organizations/123"),
+   * "projects/[project-number]" (such as "projects/my-project-id"), or
+   * "projects/[project-id]" (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. Name of the organization or project the assets belong to. Format:
+   * "organizations/[organization-number]" (such as "organizations/123"),
+   * "projects/[project-number]" (such as "projects/my-project-id"), or
+   * "projects/[project-id]" (such as "projects/12345").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+   * the current time will be used. Due to delays in resource data collection
+   * and indexing, there is a volatile window during which running the same
+   * query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+   * the current time will be used. Due to delays in resource data collection
+   * and indexing, there is a volatile window during which running the same
+   * query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
+   * the current time will be used. Due to delays in resource data collection
+   * and indexing, there is a volatile window during which running the same
+   * query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * A list of asset types of which to take a snapshot for. For  example:
+   * "compute.googleapis.com/Disk". If specified, only matching assets will be
+   * returned. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + *
+   * Asset content type. If not specified, no content but the asset name will
+   * be returned.
+   * 
+ * + * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; + * @return The contentType. + */ + com.google.cloud.asset.v1p5beta1.ContentType getContentType(); + + /** + *
+   * The maximum number of assets to be returned in a single response. Default
+   * is 100, minimum is 1, and maximum is 1000.
+   * 
+ * + * int32 page_size = 5; + * @return The pageSize. + */ + int getPageSize(); + + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + *
+   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
+   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
+   * prior `ListAssets` call, and the API should return the next page of assets.
+   * 
+ * + * string page_token = 6; + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java new file mode 100644 index 000000000000..20fa08484095 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java @@ -0,0 +1,1281 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/asset_service.proto + +package com.google.cloud.asset.v1p5beta1; + +/** + *
+ * ListAssets response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsResponse} + */ +public final class ListAssetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.ListAssetsResponse) + ListAssetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListAssetsResponse.newBuilder() to construct. + private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListAssetsResponse() { + assets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListAssetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListAssetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assets_.add( + input.readMessage(com.google.cloud.asset.v1p5beta1.Asset.parser(), extensionRegistry)); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.ListAssetsResponse.class, com.google.cloud.asset.v1p5beta1.ListAssetsResponse.Builder.class); + } + + public static final int READ_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSETS_FIELD_NUMBER = 2; + private java.util.List assets_; + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Asset getAssets(int index) { + return assets_.get(index); + } + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder( + int index) { + return assets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * Token to retrieve the next page of results. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + *
+   * Token to retrieve the next page of results. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (readTime_ != null) { + output.writeMessage(1, getReadTime()); + } + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(2, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getReadTime()); + } + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, assets_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p5beta1.ListAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p5beta1.ListAssetsResponse other = (com.google.cloud.asset.v1p5beta1.ListAssetsResponse) obj; + + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (!getAssetsList() + .equals(other.getAssetsList())) return false; + if (!getNextPageToken() + .equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.ListAssetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * ListAssets response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.ListAssetsResponse) + com.google.cloud.asset.v1p5beta1.ListAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.ListAssetsResponse.class, com.google.cloud.asset.v1p5beta1.ListAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p5beta1.ListAssetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAssetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + assetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1p5beta1.ListAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsResponse build() { + com.google.cloud.asset.v1p5beta1.ListAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsResponse buildPartial() { + com.google.cloud.asset.v1p5beta1.ListAssetsResponse result = new com.google.cloud.asset.v1p5beta1.ListAssetsResponse(this); + int from_bitField0_ = bitField0_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p5beta1.ListAssetsResponse) { + return mergeFrom((com.google.cloud.asset.v1p5beta1.ListAssetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.ListAssetsResponse other) { + if (other == com.google.cloud.asset.v1p5beta1.ListAssetsResponse.getDefaultInstance()) return this; + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssetsFieldBuilder() : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p5beta1.ListAssetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p5beta1.ListAssetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private java.util.List assets_ = + java.util.Collections.emptyList(); + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p5beta1.Asset, com.google.cloud.asset.v1p5beta1.Asset.Builder, com.google.cloud.asset.v1p5beta1.AssetOrBuilder> assetsBuilder_; + + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public com.google.cloud.asset.v1p5beta1.Asset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1p5beta1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1p5beta1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1p5beta1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder addAssets( + com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public com.google.cloud.asset.v1p5beta1.Asset.Builder getAssetsBuilder( + int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder( + int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public com.google.cloud.asset.v1p5beta1.Asset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder().addBuilder( + com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance()); + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public com.google.cloud.asset.v1p5beta1.Asset.Builder addAssetsBuilder( + int index) { + return getAssetsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance()); + } + /** + *
+     * Assets.
+     * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + public java.util.List + getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p5beta1.Asset, com.google.cloud.asset.v1p5beta1.Asset.Builder, com.google.cloud.asset.v1p5beta1.AssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p5beta1.Asset, com.google.cloud.asset.v1p5beta1.Asset.Builder, com.google.cloud.asset.v1p5beta1.AssetOrBuilder>( + assets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * Token to retrieve the next page of results. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Token to retrieve the next page of results. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString + getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Token to retrieve the next page of results. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * Token to retrieve the next page of results. Set to empty if there are no
+     * remaining results.
+     * 
+ * + * string next_page_token = 3; + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.ListAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.ListAssetsResponse) + private static final com.google.cloud.asset.v1p5beta1.ListAssetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.ListAssetsResponse(); + } + + public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAssetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.ListAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..89435126e1f4 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/asset_service.proto + +package com.google.cloud.asset.v1p5beta1; + +public interface ListAssetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.ListAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + java.util.List + getAssetsList(); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + com.google.cloud.asset.v1p5beta1.Asset getAssets(int index); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + int getAssetsCount(); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + java.util.List + getAssetsOrBuilderList(); + /** + *
+   * Assets.
+   * 
+ * + * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; + */ + com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder( + int index); + + /** + *
+   * Token to retrieve the next page of results. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + *
+   * Token to retrieve the next page of results. Set to empty if there are no
+   * remaining results.
+   * 
+ * + * string next_page_token = 3; + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java new file mode 100644 index 000000000000..1a5a85b82cf2 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java @@ -0,0 +1,1633 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/assets.proto + +package com.google.cloud.asset.v1p5beta1; + +/** + *
+ * Representation of a cloud resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Resource} + */ +public final class Resource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.Resource) + ResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Resource() { + version_ = ""; + discoveryDocumentUri_ = ""; + discoveryName_ = ""; + resourceUrl_ = ""; + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Resource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryDocumentUri_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUrl_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 50: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (data_ != null) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.Resource.class, com.google.cloud.asset.v1p5beta1.Resource.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object discoveryDocumentUri_; + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + @java.lang.Override + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } + } + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object discoveryName_; + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + @java.lang.Override + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } + } + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object resourceUrl_; + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + @java.lang.Override + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } + } + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 5; + private volatile java.lang.Object parent_; + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 6; + private com.google.protobuf.Struct data_; + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return data_ != null; + } + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.Struct getData() { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + return getData(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); + } + if (data_ != null) { + output.writeMessage(6, getData()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); + } + if (data_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getData()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p5beta1.Resource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p5beta1.Resource other = (com.google.cloud.asset.v1p5beta1.Resource) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getDiscoveryDocumentUri() + .equals(other.getDiscoveryDocumentUri())) return false; + if (!getDiscoveryName() + .equals(other.getDiscoveryName())) return false; + if (!getResourceUrl() + .equals(other.getResourceUrl())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData() + .equals(other.getData())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); + hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryName().hashCode(); + hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResourceUrl().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.Resource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Representation of a cloud resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p5beta1.Resource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.Resource) + com.google.cloud.asset.v1p5beta1.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p5beta1.Resource.class, com.google.cloud.asset.v1p5beta1.Resource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p5beta1.Resource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + discoveryDocumentUri_ = ""; + + discoveryName_ = ""; + + resourceUrl_ = ""; + + parent_ = ""; + + if (dataBuilder_ == null) { + data_ = null; + } else { + data_ = null; + dataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Resource getDefaultInstanceForType() { + return com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Resource build() { + com.google.cloud.asset.v1p5beta1.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Resource buildPartial() { + com.google.cloud.asset.v1p5beta1.Resource result = new com.google.cloud.asset.v1p5beta1.Resource(this); + result.version_ = version_; + result.discoveryDocumentUri_ = discoveryDocumentUri_; + result.discoveryName_ = discoveryName_; + result.resourceUrl_ = resourceUrl_; + result.parent_ = parent_; + if (dataBuilder_ == null) { + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p5beta1.Resource) { + return mergeFrom((com.google.cloud.asset.v1p5beta1.Resource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.Resource other) { + if (other == com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getDiscoveryDocumentUri().isEmpty()) { + discoveryDocumentUri_ = other.discoveryDocumentUri_; + onChanged(); + } + if (!other.getDiscoveryName().isEmpty()) { + discoveryName_ = other.discoveryName_; + onChanged(); + } + if (!other.getResourceUrl().isEmpty()) { + resourceUrl_ = other.resourceUrl_; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasData()) { + mergeData(other.getData()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p5beta1.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p5beta1.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * The API version. Example: "v1".
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryDocumentUri_ = ""; + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return This builder for chaining. + */ + public Builder clearDiscoveryDocumentUri() { + + discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * For example:
+     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+     * It will be left unspecified for resources without a discovery-based API,
+     * such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The bytes for discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryName_ = ""; + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @param value The discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryName_ = value; + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @return This builder for chaining. + */ + public Builder clearDiscoveryName() { + + discoveryName_ = getDefaultInstance().getDiscoveryName(); + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document.
+     * Example: "Project". It will be left unspecified for resources (such as
+     * Cloud Bigtable) without a discovery-based API.
+     * 
+ * + * string discovery_name = 3; + * @param value The bytes for discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryName_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceUrl_ = ""; + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUrl_ = value; + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return This builder for chaining. + */ + public Builder clearResourceUrl() { + + resourceUrl_ = getDefaultInstance().getResourceUrl(); + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP GET operation using this
+     * URL returns the resource itself.
+     * Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+     * It will be left unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The bytes for resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * For example:
+     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+     * For third-party assets, it is up to the users to define.
+     * 
+ * + * string parent = 5; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct data_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + public boolean hasData() { + return dataBuilder_ != null || data_ != null; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + public com.google.protobuf.Struct getData() { + if (dataBuilder_ == null) { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData( + com.google.protobuf.Struct.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder mergeData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (data_ != null) { + data_ = + com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + dataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = null; + onChanged(); + } else { + data_ = null; + dataBuilder_ = null; + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.Struct.Builder getDataBuilder() { + + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : data_; + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are scrubbed
+     * away and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getData(), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.Resource) + private static final com.google.cloud.asset.v1p5beta1.Resource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.Resource(); + } + + public static com.google.cloud.asset.v1p5beta1.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p5beta1.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java new file mode 100644 index 000000000000..175f61af1448 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java @@ -0,0 +1,175 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p5beta1/assets.proto + +package com.google.cloud.asset.v1p5beta1; + +public interface ResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The API version. Example: "v1".
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + java.lang.String getDiscoveryDocumentUri(); + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * For example:
+   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
+   * It will be left unspecified for resources without a discovery-based API,
+   * such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes(); + + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + java.lang.String getDiscoveryName(); + /** + *
+   * The JSON schema name listed in the discovery document.
+   * Example: "Project". It will be left unspecified for resources (such as
+   * Cloud Bigtable) without a discovery-based API.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + com.google.protobuf.ByteString + getDiscoveryNameBytes(); + + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + java.lang.String getResourceUrl(); + /** + *
+   * The REST URL for accessing the resource. An HTTP GET operation using this
+   * URL returns the resource itself.
+   * Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
+   * It will be left unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + com.google.protobuf.ByteString + getResourceUrlBytes(); + + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * For example:
+   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
+   * For third-party assets, it is up to the users to define.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + boolean hasData(); + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + com.google.protobuf.Struct getData(); + /** + *
+   * The content of the resource, in which some sensitive fields are scrubbed
+   * away and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + com.google.protobuf.StructOrBuilder getDataOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto new file mode 100644 index 000000000000..52233ad05b3e --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto @@ -0,0 +1,112 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p5beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/asset/v1p5beta1/assets.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1P5Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p5beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p5beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists assets with time and resource types and returns paged results in + // response. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1p5beta1/{parent=*/*}/assets" + }; + } +} + +// ListAssets request. +message ListAssetsRequest { + // Required. Name of the organization or project the assets belong to. Format: + // "organizations/[organization-number]" (such as "organizations/123"), + // "projects/[project-number]" (such as "projects/my-project-id"), or + // "projects/[project-id]" (such as "projects/12345"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Timestamp to take an asset snapshot. This can only be set to a timestamp + // between 2018-10-02 UTC (inclusive) and the current time. If not specified, + // the current time will be used. Due to delays in resource data collection + // and indexing, there is a volatile window during which running the same + // query may get different results. + google.protobuf.Timestamp read_time = 2; + + // A list of asset types of which to take a snapshot for. For example: + // "compute.googleapis.com/Disk". If specified, only matching assets will be + // returned. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name will + // be returned. + ContentType content_type = 4; + + // The maximum number of assets to be returned in a single response. Default + // is 100, minimum is 1, and maximum is 1000. + int32 page_size = 5; + + // The `next_page_token` returned from the previous `ListAssetsResponse`, or + // unspecified for the first `ListAssetsRequest`. It is a continuation of a + // prior `ListAssets` call, and the API should return the next page of assets. + string page_token = 6; +} + +// Asset content type. +enum ContentType { + // Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0; + + // Resource metadata. + RESOURCE = 1; + + // The actual IAM policy set on a resource. + IAM_POLICY = 2; + + // The Cloud Organization Policy set on an asset. + ORG_POLICY = 4; + + // The Cloud Access context mananger Policy set on an asset. + ACCESS_POLICY = 5; +} + +// ListAssets response. +message ListAssetsResponse { + // Time the snapshot was taken. + google.protobuf.Timestamp read_time = 1; + + // Assets. + repeated Asset assets = 2; + + // Token to retrieve the next page of results. Set to empty if there are no + // remaining results. + string next_page_token = 3; +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto new file mode 100644 index 000000000000..7ad133a5484f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto @@ -0,0 +1,124 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p5beta1; + +import "google/api/resource.proto"; +import "google/cloud/orgpolicy/v1/orgpolicy.proto"; +import "google/iam/v1/policy.proto"; +import "google/identity/accesscontextmanager/v1/access_level.proto"; +import "google/identity/accesscontextmanager/v1/access_policy.proto"; +import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.V1p5Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p5beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p5beta1"; + +// Cloud asset. This includes all Google Cloud Platform resources, +// Cloud IAM policies, and other non-GCP assets. +message Asset { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + + // The full name of the asset. For example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + // See [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string name = 1; + + // Type of the asset. Example: "compute.googleapis.com/Disk". + string asset_type = 2; + + // Representation of the resource. + Resource resource = 3; + + // Representation of the actual Cloud IAM policy set on a cloud resource. For + // each resource, there must be at most one Cloud IAM policy set on it. + google.iam.v1.Policy iam_policy = 4; + + // Representation of the Cloud Organization Policy set on an asset. For each + // asset, there could be multiple Organization policies with different + // constraints. + repeated google.cloud.orgpolicy.v1.Policy org_policy = 6; + + // Representation of the Cloud Organization access policy. + oneof access_context_policy { + google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + + google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + + google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = + 9; + } + + // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, + // represented as a list of relative resource names. Ancestry path starts with + // the closest CRM ancestor and ends at root. If the asset is a CRM + // project/folder/organization, this starts from the asset itself. + // + // Example: ["projects/123456789", "folders/5432", "organizations/1234"] + repeated string ancestors = 10; +} + +// Representation of a cloud resource. +message Resource { + // The API version. Example: "v1". + string version = 1; + + // The URL of the discovery document containing the resource's JSON schema. + // For example: + // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. + // It will be left unspecified for resources without a discovery-based API, + // such as Cloud Bigtable. + string discovery_document_uri = 2; + + // The JSON schema name listed in the discovery document. + // Example: "Project". It will be left unspecified for resources (such as + // Cloud Bigtable) without a discovery-based API. + string discovery_name = 3; + + // The REST URL for accessing the resource. An HTTP GET operation using this + // URL returns the resource itself. + // Example: + // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. + // It will be left unspecified for resources without a REST API. + string resource_url = 4; + + // The full name of the immediate parent of this resource. See + // [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + // + // For GCP assets, it is the parent resource defined in the [Cloud IAM policy + // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + // For example: + // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. + // + // For third-party assets, it is up to the users to define. + string parent = 5; + + // The content of the resource, in which some sensitive fields are scrubbed + // away and may not be present. + google.protobuf.Struct data = 6; +} diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..3f3193cc9147 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.asset.v1p5beta1.AssetServiceClient; +import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; +import com.google.cloud.asset.v1p5beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..36e9aa64ecd1 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] +import com.google.cloud.asset.v1p5beta1.AssetServiceClient; +import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider( + AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..ca906f26c7bc --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p5beta1_generated_assetserviceclient_create_setendpoint_sync] +import com.google.cloud.asset.v1p5beta1.AssetServiceClient; +import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; +import com.google.cloud.asset.v1p5beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings assetServiceSettings = + AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); + } +} +// [END asset_v1p5beta1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java new file mode 100644 index 000000000000..853894706b9d --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p5beta1_generated_assetserviceclient_listassets_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.asset.v1p5beta1.Asset; +import com.google.cloud.asset.v1p5beta1.AssetServiceClient; +import com.google.cloud.asset.v1p5beta1.ContentType; +import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class AsyncListAssets { + + public static void main(String[] args) throws Exception { + asyncListAssets(); + } + + public static void asyncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent("parent-995424086") + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request); + // Do something. + for (Asset element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p5beta1_generated_assetserviceclient_listassets_async] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java new file mode 100644 index 000000000000..62a99e54402c --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p5beta1_generated_assetserviceclient_listassets_paged_async] +import com.google.cloud.asset.v1p5beta1.Asset; +import com.google.cloud.asset.v1p5beta1.AssetServiceClient; +import com.google.cloud.asset.v1p5beta1.ContentType; +import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; +import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; +import com.google.common.base.Strings; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class AsyncListAssetsPaged { + + public static void main(String[] args) throws Exception { + asyncListAssetsPaged(); + } + + public static void asyncListAssetsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent("parent-995424086") + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request); + for (Asset element : response.getAssetsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END asset_v1p5beta1_generated_assetserviceclient_listassets_paged_async] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java new file mode 100644 index 000000000000..44e4bfeb1616 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p5beta1_generated_assetserviceclient_listassets_sync] +import com.google.cloud.asset.v1p5beta1.Asset; +import com.google.cloud.asset.v1p5beta1.AssetServiceClient; +import com.google.cloud.asset.v1p5beta1.ContentType; +import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; +import com.google.protobuf.Timestamp; +import java.util.ArrayList; + +public class SyncListAssets { + + public static void main(String[] args) throws Exception { + syncListAssets(); + } + + public static void syncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder() + .setParent("parent-995424086") + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Asset element : assetServiceClient.listAssets(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END asset_v1p5beta1_generated_assetserviceclient_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java new file mode 100644 index 000000000000..c5fb1d53bac0 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 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.samples; + +// [START asset_v1p5beta1_generated_assetservicesettings_listassets_sync] +import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; +import java.time.Duration; + +public class SyncListAssets { + + public static void main(String[] args) throws Exception { + syncListAssets(); + } + + public static void syncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); + assetServiceSettingsBuilder + .listAssetsSettings() + .setRetrySettings( + assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1p5beta1_generated_assetservicesettings_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java new file mode 100644 index 000000000000..aa05377dbfb8 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 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.stub.samples; + +// [START asset_v1p5beta1_generated_assetservicestubsettings_listassets_sync] +import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStubSettings; +import java.time.Duration; + +public class SyncListAssets { + + public static void main(String[] args) throws Exception { + syncListAssets(); + } + + public static void syncListAssets() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + AssetServiceStubSettings.Builder assetServiceSettingsBuilder = + AssetServiceStubSettings.newBuilder(); + assetServiceSettingsBuilder + .listAssetsSettings() + .setRetrySettings( + assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); + } +} +// [END asset_v1p5beta1_generated_assetservicestubsettings_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java new file mode 100644 index 000000000000..5db3ef4a817a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java @@ -0,0 +1,329 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p7beta1.stub.AssetServiceStub; +import com.google.cloud.asset.v1p7beta1.stub.AssetServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Asset service definition. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   ExportAssetsRequest request =
+ *       ExportAssetsRequest.newBuilder()
+ *           .setParent("ExportAssetsRequest-846449128".toString())
+ *           .setReadTime(Timestamp.newBuilder().build())
+ *           .addAllAssetTypes(new ArrayList())
+ *           .setContentType(ContentType.forNumber(0))
+ *           .setOutputConfig(OutputConfig.newBuilder().build())
+ *           .addAllRelationshipTypes(new ArrayList())
+ *           .build();
+ *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AssetServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceClient implements BackgroundResource { + private final AssetServiceSettings settings; + private final AssetServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of AssetServiceClient with default settings. */ + public static final AssetServiceClient create() throws IOException { + return create(AssetServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { + return new AssetServiceClient(settings); + } + + /** + * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(AssetServiceSettings). + */ + public static final AssetServiceClient create(AssetServiceStub stub) { + return new AssetServiceClient(stub); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected AssetServiceClient(AssetServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected AssetServiceClient(AssetServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final AssetServiceSettings getSettings() { + return settings; + } + + public AssetServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in the + * JSON format; for BigQuery table destinations, the output table stores the fields in asset proto + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ExportAssetsRequest request =
+   *       ExportAssetsRequest.newBuilder()
+   *           .setParent("ExportAssetsRequest-846449128".toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture exportAssetsAsync( + ExportAssetsRequest request) { + return exportAssetsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in the + * JSON format; for BigQuery table destinations, the output table stores the fields in asset proto + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ExportAssetsRequest request =
+   *       ExportAssetsRequest.newBuilder()
+   *           .setParent("ExportAssetsRequest-846449128".toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       assetServiceClient.exportAssetsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportAssetsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportAssetsOperationCallable() { + return stub.exportAssetsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in the + * JSON format; for BigQuery table destinations, the output table stores the fields in asset proto + * 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. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ExportAssetsRequest request =
+   *       ExportAssetsRequest.newBuilder()
+   *           .setParent("ExportAssetsRequest-846449128".toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setOutputConfig(OutputConfig.newBuilder().build())
+   *           .addAllRelationshipTypes(new ArrayList())
+   *           .build();
+   *   ApiFuture future = assetServiceClient.exportAssetsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportAssetsCallable() { + return stub.exportAssetsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java new file mode 100644 index 000000000000..4300c24794e3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java @@ -0,0 +1,199 @@ +/* + * Copyright 2022 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 com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p7beta1.stub.AssetServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of exportAssets to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .exportAssetsSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.exportAssetsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to exportAssets. */ + public UnaryCallSettings exportAssetsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).exportAssetsSettings(); + } + + /** Returns the object with the settings used for calls to exportAssets. */ + public OperationCallSettings + exportAssetsOperationSettings() { + return ((AssetServiceStubSettings) getStubSettings()).exportAssetsOperationSettings(); + } + + public static final AssetServiceSettings create(AssetServiceStubSettings stub) + throws IOException { + return new AssetServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AssetServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AssetServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AssetServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AssetServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AssetServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AssetServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AssetServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AssetServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AssetServiceStubSettings.newBuilder()); + } + + public AssetServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AssetServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + public UnaryCallSettings.Builder exportAssetsSettings() { + return getStubSettingsBuilder().exportAssetsSettings(); + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + public OperationCallSettings.Builder< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings() { + return getStubSettingsBuilder().exportAssetsOperationSettings(); + } + + @Override + public AssetServiceSettings build() throws IOException { + return new AssetServiceSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json new file mode 100644 index 000000000000..70c675dd38c4 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json @@ -0,0 +1,21 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.asset.v1p7beta1", + "libraryPackage": "com.google.cloud.asset.v1p7beta1", + "services": { + "AssetService": { + "clients": { + "grpc": { + "libraryClient": "AssetServiceClient", + "rpcs": { + "ExportAssets": { + "methods": ["exportAssetsAsync", "exportAssetsOperationCallable", "exportAssetsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java new file mode 100644 index 000000000000..1789a8b3b626 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= AssetServiceClient ======================= + * + *

Service Description: Asset service definition. + * + *

Sample for AssetServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   ExportAssetsRequest request =
+ *       ExportAssetsRequest.newBuilder()
+ *           .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString())
+ *           .setReadTime(Timestamp.newBuilder().build())
+ *           .addAllAssetTypes(new ArrayList())
+ *           .setContentType(ContentType.forNumber(0))
+ *           .setOutputConfig(OutputConfig.newBuilder().build())
+ *           .addAllRelationshipTypes(new ArrayList())
+ *           .build();
+ *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.asset.v1p7beta1; + +import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java new file mode 100644 index 000000000000..fb9e6a139b75 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p7beta1.ExportAssetsRequest; +import com.google.cloud.asset.v1p7beta1.ExportAssetsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class AssetServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + exportAssetsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportAssetsOperationCallable()"); + } + + public UnaryCallable exportAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: exportAssetsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java new file mode 100644 index 000000000000..fade292a0853 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java @@ -0,0 +1,331 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p7beta1.ExportAssetsRequest; +import com.google.cloud.asset.v1p7beta1.ExportAssetsResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssetServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of exportAssets to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ *     AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .exportAssetsSettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.exportAssetsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssetServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings exportAssetsSettings; + private final OperationCallSettings< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings; + + /** Returns the object with the settings used for calls to exportAssets. */ + public UnaryCallSettings exportAssetsSettings() { + return exportAssetsSettings; + } + + /** Returns the object with the settings used for calls to exportAssets. */ + public OperationCallSettings + exportAssetsOperationSettings() { + return exportAssetsOperationSettings; + } + + public AssetServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAssetServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "cloudasset.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudasset.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + exportAssetsSettings = settingsBuilder.exportAssetsSettings().build(); + exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build(); + } + + /** Builder for AssetServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder exportAssetsSettings; + private final OperationCallSettings.Builder< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + exportAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportAssetsOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(exportAssetsSettings); + initDefaults(this); + } + + protected Builder(AssetServiceStubSettings settings) { + super(settings); + + exportAssetsSettings = settings.exportAssetsSettings.toBuilder(); + exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(exportAssetsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .exportAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportAssetsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportAssetsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ExportAssetsRequest.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + public UnaryCallSettings.Builder exportAssetsSettings() { + return exportAssetsSettings; + } + + /** Returns the builder for the settings used for calls to exportAssets. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> + exportAssetsOperationSettings() { + return exportAssetsOperationSettings; + } + + @Override + public AssetServiceStubSettings build() throws IOException { + return new AssetServiceStubSettings(this); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java new file mode 100644 index 000000000000..8b080d4b27f6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AssetService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java new file mode 100644 index 000000000000..38f973b48370 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java @@ -0,0 +1,178 @@ +/* + * Copyright 2022 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.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p7beta1.ExportAssetsRequest; +import com.google.cloud.asset.v1p7beta1.ExportAssetsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AssetService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssetServiceStub extends AssetServiceStub { + private static final MethodDescriptor + exportAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p7beta1.AssetService/ExportAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ExportAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable exportAssetsCallable; + private final OperationCallable + exportAssetsOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAssetServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAssetServiceStub( + AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings exportAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportAssetsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + + this.exportAssetsCallable = + callableFactory.createUnaryCallable( + exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); + this.exportAssetsOperationCallable = + callableFactory.createOperationCallable( + exportAssetsTransportSettings, + settings.exportAssetsOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable exportAssetsCallable() { + return exportAssetsCallable; + } + + @Override + public OperationCallable + exportAssetsOperationCallable() { + return exportAssetsOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java new file mode 100644 index 000000000000..2dcc7b654931 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java @@ -0,0 +1,153 @@ +/* + * Copyright 2022 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 com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssetServiceClientTest { + private static MockAssetService mockAssetService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AssetServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAssetService = new MockAssetService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AssetServiceSettings settings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void exportAssetsTest() throws Exception { + ExportAssetsResponse expectedResponse = + ExportAssetsResponse.newBuilder() + .setReadTime(Timestamp.newBuilder().build()) + .setOutputConfig(OutputConfig.newBuilder().build()) + .setOutputResult(OutputResult.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportAssetsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent("ExportAssetsRequest-846449128".toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + + ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportAssetsRequest actualRequest = ((ExportAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); + Assert.assertEquals(request.getAssetTypesList(), actualRequest.getAssetTypesList()); + Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); + Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); + Assert.assertEquals( + request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ExportAssetsRequest request = + ExportAssetsRequest.newBuilder() + .setParent("ExportAssetsRequest-846449128".toString()) + .setReadTime(Timestamp.newBuilder().build()) + .addAllAssetTypes(new ArrayList()) + .setContentType(ContentType.forNumber(0)) + .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) + .build(); + client.exportAssetsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java new file mode 100644 index 000000000000..539cf06672ae --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetService implements MockGrpcService { + private final MockAssetServiceImpl serviceImpl; + + public MockAssetService() { + serviceImpl = new MockAssetServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java new file mode 100644 index 000000000000..db27f479dcee --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java @@ -0,0 +1,82 @@ +/* + * Copyright 2022 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 com.google.api.core.BetaApi; +import com.google.cloud.asset.v1p7beta1.AssetServiceGrpc.AssetServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssetServiceImpl extends AssetServiceImplBase { + private List requests; + private Queue responses; + + public MockAssetServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void exportAssets( + ExportAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} 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/owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java new file mode 100644 index 000000000000..c443a291ea1f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java @@ -0,0 +1,343 @@ +package com.google.cloud.asset.v1p7beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Asset service definition.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/asset/v1p7beta1/asset_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class AssetServiceGrpc { + + private AssetServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.asset.v1p7beta1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor 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; + 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(); + } + } + } + return getExportAssetsMethod; + } + + /** + * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { + + /** + *
+     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
+     * the JSON format; for BigQuery table destinations, the output table stores
+     * the fields in asset proto 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.v1p7beta1.ExportAssetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportAssetsMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getExportAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest, + com.google.longrunning.Operation>( + this, METHODID_EXPORT_ASSETS))) + .build(); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
+     * the JSON format; for BigQuery table destinations, the output table stores
+     * the fields in asset proto 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.v1p7beta1.ExportAssetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
+     * the JSON format; for BigQuery table destinations, the output table stores
+     * the fields in asset proto 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.v1p7beta1.ExportAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportAssetsMethod(), getCallOptions(), request); + } + } + + /** + *
+   * 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); + } + + /** + *
+     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
+     * the JSON format; for BigQuery table destinations, the output table stores
+     * the fields in asset proto 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 exportAssets( + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_EXPORT_ASSETS = 0; + + 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 AssetServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AssetServiceImplBase 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_EXPORT_ASSETS: + serviceImpl.exportAssets((com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) 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(); + } + } + } + + private static abstract 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.v1p7beta1.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 String methodName; + + AssetServiceMethodDescriptorSupplier(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(getExportAssetsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java new file mode 100644 index 000000000000..92d3a5406025 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java @@ -0,0 +1,3616 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * An asset in Google Cloud. An asset can be any resource in the Google Cloud
+ * [resource
+ * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+ * a resource outside the Google Cloud resource hierarchy (such as Google
+ * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+ * See [Supported asset
+ * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+ * for more information.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.Asset} + */ +public final class Asset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.Asset) + AssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use Asset.newBuilder() to construct. + private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Asset() { + name_ = ""; + assetType_ = ""; + orgPolicy_ = java.util.Collections.emptyList(); + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Asset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Asset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + com.google.cloud.asset.v1p7beta1.Resource.Builder subBuilder = null; + if (resource_ != null) { + subBuilder = resource_.toBuilder(); + } + resource_ = input.readMessage(com.google.cloud.asset.v1p7beta1.Resource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resource_); + resource_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (iamPolicy_ != null) { + subBuilder = iamPolicy_.toBuilder(); + } + iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamPolicy_); + iamPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + orgPolicy_.add( + input.readMessage(com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); + break; + } + case 58: { + com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; + if (accessContextPolicyCase_ == 7) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 7; + break; + } + case 66: { + com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; + if (accessContextPolicyCase_ == 8) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 8; + break; + } + case 74: { + com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = null; + if (accessContextPolicyCase_ == 9) { + subBuilder = ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_).toBuilder(); + } + accessContextPolicy_ = + input.readMessage(com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + accessContextPolicy_ = subBuilder.buildPartial(); + } + accessContextPolicyCase_ = 9; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + ancestors_.add(s); + break; + } + case 90: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder subBuilder = null; + if (relatedAssets_ != null) { + subBuilder = relatedAssets_.toBuilder(); + } + relatedAssets_ = input.readMessage(com.google.cloud.asset.v1p7beta1.RelatedAssets.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relatedAssets_); + relatedAssets_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.Asset.class, com.google.cloud.asset.v1p7beta1.Asset.Builder.class); + } + + private int accessContextPolicyCase_ = 0; + private java.lang.Object accessContextPolicy_; + public enum AccessContextPolicyCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ACCESS_POLICY(7), + ACCESS_LEVEL(8), + SERVICE_PERIMETER(9), + ACCESSCONTEXTPOLICY_NOT_SET(0); + private final int value; + private AccessContextPolicyCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AccessContextPolicyCase valueOf(int value) { + return forNumber(value); + } + + public static AccessContextPolicyCase forNumber(int value) { + switch (value) { + case 7: return ACCESS_POLICY; + case 8: return ACCESS_LEVEL; + case 9: return SERVICE_PERIMETER; + case 0: return ACCESSCONTEXTPOLICY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public AccessContextPolicyCase + getAccessContextPolicyCase() { + return AccessContextPolicyCase.forNumber( + accessContextPolicyCase_); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p7beta1.Resource resource_; + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resource_ != null; + } + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + * @return The resource. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Resource getResource() { + return resource_ == null ? com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance() : resource_; + } + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ResourceOrBuilder getResourceOrBuilder() { + return getResource(); + } + + public static final int IAM_POLICY_FIELD_NUMBER = 4; + private com.google.iam.v1.Policy iamPolicy_; + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+   * more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + @java.lang.Override + public boolean hasIamPolicy() { + return iamPolicy_ != null; + } + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+   * more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + @java.lang.Override + public com.google.iam.v1.Policy getIamPolicy() { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+   * more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + @java.lang.Override + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + return getIamPolicy(); + } + + public static final int ORG_POLICY_FIELD_NUMBER = 6; + private java.util.List orgPolicy_; + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public java.util.List getOrgPolicyList() { + return orgPolicy_; + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public java.util.List + getOrgPolicyOrBuilderList() { + return orgPolicy_; + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public int getOrgPolicyCount() { + return orgPolicy_.size(); + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { + return orgPolicy_.get(index); + } + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + @java.lang.Override + public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index) { + return orgPolicy_.get(index); + } + + public static final int ACCESS_POLICY_FIELD_NUMBER = 7; + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + @java.lang.Override + public boolean hasAccessPolicy() { + return accessContextPolicyCase_ == 7; + } + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + + public static final int ACCESS_LEVEL_FIELD_NUMBER = 8; + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + @java.lang.Override + public boolean hasAccessLevel() { + return accessContextPolicyCase_ == 8; + } + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + + public static final int SERVICE_PERIMETER_FIELD_NUMBER = 9; + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + @java.lang.Override + public boolean hasServicePerimeter() { + return accessContextPolicyCase_ == 9; + } + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + + public static final int RELATED_ASSETS_FIELD_NUMBER = 13; + private com.google.cloud.asset.v1p7beta1.RelatedAssets relatedAssets_; + /** + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + * @return Whether the relatedAssets field is set. + */ + @java.lang.Override + public boolean hasRelatedAssets() { + return relatedAssets_ != null; + } + /** + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + * @return The relatedAssets. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAssets getRelatedAssets() { + return relatedAssets_ == null ? com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance() : relatedAssets_; + } + /** + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { + return getRelatedAssets(); + } + + public static final int ANCESTORS_FIELD_NUMBER = 10; + private com.google.protobuf.LazyStringList ancestors_; + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_; + } + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + if (resource_ != null) { + output.writeMessage(3, getResource()); + } + if (iamPolicy_ != null) { + output.writeMessage(4, getIamPolicy()); + } + for (int i = 0; i < orgPolicy_.size(); i++) { + output.writeMessage(6, orgPolicy_.get(i)); + } + if (accessContextPolicyCase_ == 7) { + output.writeMessage(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 8) { + output.writeMessage(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 9) { + output.writeMessage(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + } + for (int i = 0; i < ancestors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i)); + } + if (updateTime_ != null) { + output.writeMessage(11, getUpdateTime()); + } + if (relatedAssets_ != null) { + output.writeMessage(13, getRelatedAssets()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + if (resource_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResource()); + } + if (iamPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIamPolicy()); + } + for (int i = 0; i < orgPolicy_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, orgPolicy_.get(i)); + } + if (accessContextPolicyCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); + } + if (accessContextPolicyCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); + } + { + int dataSize = 0; + for (int i = 0; i < ancestors_.size(); i++) { + dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); + } + size += dataSize; + size += 1 * getAncestorsList().size(); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getUpdateTime()); + } + if (relatedAssets_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getRelatedAssets()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.Asset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.Asset other = (com.google.cloud.asset.v1p7beta1.Asset) obj; + + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime() + .equals(other.getUpdateTime())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (hasResource() != other.hasResource()) return false; + if (hasResource()) { + if (!getResource() + .equals(other.getResource())) return false; + } + if (hasIamPolicy() != other.hasIamPolicy()) return false; + if (hasIamPolicy()) { + if (!getIamPolicy() + .equals(other.getIamPolicy())) return false; + } + if (!getOrgPolicyList() + .equals(other.getOrgPolicyList())) return false; + if (hasRelatedAssets() != other.hasRelatedAssets()) return false; + if (hasRelatedAssets()) { + if (!getRelatedAssets() + .equals(other.getRelatedAssets())) return false; + } + if (!getAncestorsList() + .equals(other.getAncestorsList())) return false; + if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false; + switch (accessContextPolicyCase_) { + case 7: + if (!getAccessPolicy() + .equals(other.getAccessPolicy())) return false; + break; + case 8: + if (!getAccessLevel() + .equals(other.getAccessLevel())) return false; + break; + case 9: + if (!getServicePerimeter() + .equals(other.getServicePerimeter())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (hasResource()) { + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + } + if (hasIamPolicy()) { + hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getIamPolicy().hashCode(); + } + if (getOrgPolicyCount() > 0) { + hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getOrgPolicyList().hashCode(); + } + if (hasRelatedAssets()) { + hash = (37 * hash) + RELATED_ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedAssets().hashCode(); + } + if (getAncestorsCount() > 0) { + hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAncestorsList().hashCode(); + } + switch (accessContextPolicyCase_) { + case 7: + hash = (37 * hash) + ACCESS_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAccessPolicy().hashCode(); + break; + case 8: + hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getAccessLevel().hashCode(); + break; + case 9: + hash = (37 * hash) + SERVICE_PERIMETER_FIELD_NUMBER; + hash = (53 * hash) + getServicePerimeter().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.Asset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset in Google Cloud. An asset can be any resource in the Google Cloud
+   * [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * a resource outside the Google Cloud resource hierarchy (such as Google
+   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.Asset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.Asset) + com.google.cloud.asset.v1p7beta1.AssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.Asset.class, com.google.cloud.asset.v1p7beta1.Asset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.Asset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getOrgPolicyFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + name_ = ""; + + assetType_ = ""; + + if (resourceBuilder_ == null) { + resource_ = null; + } else { + resource_ = null; + resourceBuilder_ = null; + } + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + if (orgPolicyBuilder_ == null) { + orgPolicy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + orgPolicyBuilder_.clear(); + } + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = null; + } else { + relatedAssets_ = null; + relatedAssetsBuilder_ = null; + } + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Asset getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.Asset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Asset build() { + com.google.cloud.asset.v1p7beta1.Asset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Asset buildPartial() { + com.google.cloud.asset.v1p7beta1.Asset result = new com.google.cloud.asset.v1p7beta1.Asset(this); + int from_bitField0_ = bitField0_; + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.name_ = name_; + result.assetType_ = assetType_; + if (resourceBuilder_ == null) { + result.resource_ = resource_; + } else { + result.resource_ = resourceBuilder_.build(); + } + if (iamPolicyBuilder_ == null) { + result.iamPolicy_ = iamPolicy_; + } else { + result.iamPolicy_ = iamPolicyBuilder_.build(); + } + if (orgPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.orgPolicy_ = orgPolicy_; + } else { + result.orgPolicy_ = orgPolicyBuilder_.build(); + } + if (accessContextPolicyCase_ == 7) { + if (accessPolicyBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = accessPolicyBuilder_.build(); + } + } + if (accessContextPolicyCase_ == 8) { + if (accessLevelBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = accessLevelBuilder_.build(); + } + } + if (accessContextPolicyCase_ == 9) { + if (servicePerimeterBuilder_ == null) { + result.accessContextPolicy_ = accessContextPolicy_; + } else { + result.accessContextPolicy_ = servicePerimeterBuilder_.build(); + } + } + if (relatedAssetsBuilder_ == null) { + result.relatedAssets_ = relatedAssets_; + } else { + result.relatedAssets_ = relatedAssetsBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ancestors_ = ancestors_; + result.accessContextPolicyCase_ = accessContextPolicyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.Asset) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.Asset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.Asset other) { + if (other == com.google.cloud.asset.v1p7beta1.Asset.getDefaultInstance()) return this; + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (other.hasResource()) { + mergeResource(other.getResource()); + } + if (other.hasIamPolicy()) { + mergeIamPolicy(other.getIamPolicy()); + } + if (orgPolicyBuilder_ == null) { + if (!other.orgPolicy_.isEmpty()) { + if (orgPolicy_.isEmpty()) { + orgPolicy_ = other.orgPolicy_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOrgPolicyIsMutable(); + orgPolicy_.addAll(other.orgPolicy_); + } + onChanged(); + } + } else { + if (!other.orgPolicy_.isEmpty()) { + if (orgPolicyBuilder_.isEmpty()) { + orgPolicyBuilder_.dispose(); + orgPolicyBuilder_ = null; + orgPolicy_ = other.orgPolicy_; + bitField0_ = (bitField0_ & ~0x00000001); + orgPolicyBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getOrgPolicyFieldBuilder() : null; + } else { + orgPolicyBuilder_.addAllMessages(other.orgPolicy_); + } + } + } + if (other.hasRelatedAssets()) { + mergeRelatedAssets(other.getRelatedAssets()); + } + if (!other.ancestors_.isEmpty()) { + if (ancestors_.isEmpty()) { + ancestors_ = other.ancestors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAncestorsIsMutable(); + ancestors_.addAll(other.ancestors_); + } + onChanged(); + } + switch (other.getAccessContextPolicyCase()) { + case ACCESS_POLICY: { + mergeAccessPolicy(other.getAccessPolicy()); + break; + } + case ACCESS_LEVEL: { + mergeAccessLevel(other.getAccessLevel()); + break; + } + case SERVICE_PERIMETER: { + mergeServicePerimeter(other.getServicePerimeter()); + break; + } + case ACCESSCONTEXTPOLICY_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.Asset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.Asset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int accessContextPolicyCase_ = 0; + private java.lang.Object accessContextPolicy_; + public AccessContextPolicyCase + getAccessContextPolicyCase() { + return AccessContextPolicyCase.forNumber( + accessContextPolicyCase_); + } + + public Builder clearAccessContextPolicy() { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder setUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + } + /** + *
+     * The last update timestamp of an asset. update_time is updated when
+     * create/update/delete operation is performed.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), + getParentForChildren(), + isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p7beta1.Resource resource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.Resource, com.google.cloud.asset.v1p7beta1.Resource.Builder, com.google.cloud.asset.v1p7beta1.ResourceOrBuilder> resourceBuilder_; + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceBuilder_ != null || resource_ != null; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + * @return The resource. + */ + public com.google.cloud.asset.v1p7beta1.Resource getResource() { + if (resourceBuilder_ == null) { + return resource_ == null ? com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance() : resource_; + } else { + return resourceBuilder_.getMessage(); + } + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + public Builder setResource(com.google.cloud.asset.v1p7beta1.Resource value) { + if (resourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + onChanged(); + } else { + resourceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + public Builder setResource( + com.google.cloud.asset.v1p7beta1.Resource.Builder builderForValue) { + if (resourceBuilder_ == null) { + resource_ = builderForValue.build(); + onChanged(); + } else { + resourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + public Builder mergeResource(com.google.cloud.asset.v1p7beta1.Resource value) { + if (resourceBuilder_ == null) { + if (resource_ != null) { + resource_ = + com.google.cloud.asset.v1p7beta1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); + } else { + resource_ = value; + } + onChanged(); + } else { + resourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + public Builder clearResource() { + if (resourceBuilder_ == null) { + resource_ = null; + onChanged(); + } else { + resource_ = null; + resourceBuilder_ = null; + } + + return this; + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + public com.google.cloud.asset.v1p7beta1.Resource.Builder getResourceBuilder() { + + onChanged(); + return getResourceFieldBuilder().getBuilder(); + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + public com.google.cloud.asset.v1p7beta1.ResourceOrBuilder getResourceOrBuilder() { + if (resourceBuilder_ != null) { + return resourceBuilder_.getMessageOrBuilder(); + } else { + return resource_ == null ? + com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance() : resource_; + } + } + /** + *
+     * A representation of the resource.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.Resource, com.google.cloud.asset.v1p7beta1.Resource.Builder, com.google.cloud.asset.v1p7beta1.ResourceOrBuilder> + getResourceFieldBuilder() { + if (resourceBuilder_ == null) { + resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.Resource, com.google.cloud.asset.v1p7beta1.Resource.Builder, com.google.cloud.asset.v1p7beta1.ResourceOrBuilder>( + getResource(), + getParentForChildren(), + isClean()); + resource_ = null; + } + return resourceBuilder_; + } + + private com.google.iam.v1.Policy iamPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + public boolean hasIamPolicy() { + return iamPolicyBuilder_ != null || iamPolicy_ != null; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + public com.google.iam.v1.Policy getIamPolicy() { + if (iamPolicyBuilder_ == null) { + return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } else { + return iamPolicyBuilder_.getMessage(); + } + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamPolicy_ = value; + onChanged(); + } else { + iamPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder setIamPolicy( + com.google.iam.v1.Policy.Builder builderForValue) { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = builderForValue.build(); + onChanged(); + } else { + iamPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { + if (iamPolicyBuilder_ == null) { + if (iamPolicy_ != null) { + iamPolicy_ = + com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); + } else { + iamPolicy_ = value; + } + onChanged(); + } else { + iamPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public Builder clearIamPolicy() { + if (iamPolicyBuilder_ == null) { + iamPolicy_ = null; + onChanged(); + } else { + iamPolicy_ = null; + iamPolicyBuilder_ = null; + } + + return this; + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { + + onChanged(); + return getIamPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { + if (iamPolicyBuilder_ != null) { + return iamPolicyBuilder_.getMessageOrBuilder(); + } else { + return iamPolicy_ == null ? + com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; + } + } + /** + *
+     * A representation of the Cloud IAM policy set on a Google Cloud resource.
+     * There can be a maximum of one Cloud IAM policy set on any given resource.
+     * In addition, Cloud IAM policies inherit their granted access scope from any
+     * policies set on parent resources in the resource hierarchy. Therefore, the
+     * effectively policy is the union of both the policy set on this resource
+     * and each policy set on all of the resource's ancestry resource levels in
+     * the hierarchy. See
+     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+     * more information.
+     * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> + getIamPolicyFieldBuilder() { + if (iamPolicyBuilder_ == null) { + iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( + getIamPolicy(), + getParentForChildren(), + isClean()); + iamPolicy_ = null; + } + return iamPolicyBuilder_; + } + + private java.util.List orgPolicy_ = + java.util.Collections.emptyList(); + private void ensureOrgPolicyIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + orgPolicy_ = new java.util.ArrayList(orgPolicy_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> orgPolicyBuilder_; + + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List getOrgPolicyList() { + if (orgPolicyBuilder_ == null) { + return java.util.Collections.unmodifiableList(orgPolicy_); + } else { + return orgPolicyBuilder_.getMessageList(); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public int getOrgPolicyCount() { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.size(); + } else { + return orgPolicyBuilder_.getCount(); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.get(index); + } else { + return orgPolicyBuilder_.getMessage(index); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder setOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.set(index, value); + onChanged(); + } else { + orgPolicyBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder setOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.set(index, builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.add(value); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy value) { + if (orgPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrgPolicyIsMutable(); + orgPolicy_.add(index, value); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addOrgPolicy( + int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.add(index, builderForValue.build()); + onChanged(); + } else { + orgPolicyBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder addAllOrgPolicy( + java.lang.Iterable values) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, orgPolicy_); + onChanged(); + } else { + orgPolicyBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder clearOrgPolicy() { + if (orgPolicyBuilder_ == null) { + orgPolicy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + orgPolicyBuilder_.clear(); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public Builder removeOrgPolicy(int index) { + if (orgPolicyBuilder_ == null) { + ensureOrgPolicyIsMutable(); + orgPolicy_.remove(index); + onChanged(); + } else { + orgPolicyBuilder_.remove(index); + } + return this; + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder getOrgPolicyBuilder( + int index) { + return getOrgPolicyFieldBuilder().getBuilder(index); + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index) { + if (orgPolicyBuilder_ == null) { + return orgPolicy_.get(index); } else { + return orgPolicyBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List + getOrgPolicyOrBuilderList() { + if (orgPolicyBuilder_ != null) { + return orgPolicyBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orgPolicy_); + } + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder() { + return getOrgPolicyFieldBuilder().addBuilder( + com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder( + int index) { + return getOrgPolicyFieldBuilder().addBuilder( + index, com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); + } + /** + *
+     * A representation of an [organization
+     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+     * There can be more than one organization policy with different constraints
+     * set on a given resource.
+     * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + public java.util.List + getOrgPolicyBuilderList() { + return getOrgPolicyFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> + getOrgPolicyFieldBuilder() { + if (orgPolicyBuilder_ == null) { + orgPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder>( + orgPolicy_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + orgPolicy_ = null; + } + return orgPolicyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> accessPolicyBuilder_; + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + @java.lang.Override + public boolean hasAccessPolicy() { + return accessContextPolicyCase_ == 7; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 7) { + return accessPolicyBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder setAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { + if (accessPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + accessPolicyBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 7; + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder setAccessPolicy( + com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder builderForValue) { + if (accessPolicyBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + accessPolicyBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 7; + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder mergeAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.newBuilder((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 7) { + accessPolicyBuilder_.mergeFrom(value); + } else { + accessPolicyBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 7; + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public Builder clearAccessPolicy() { + if (accessPolicyBuilder_ == null) { + if (accessContextPolicyCase_ == 7) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 7) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + accessPolicyBuilder_.clear(); + } + return this; + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + public com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder getAccessPolicyBuilder() { + return getAccessPolicyFieldBuilder().getBuilder(); + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { + if ((accessContextPolicyCase_ == 7) && (accessPolicyBuilder_ != null)) { + return accessPolicyBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 7) { + return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access policy user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> + getAccessPolicyFieldBuilder() { + if (accessPolicyBuilder_ == null) { + if (!(accessContextPolicyCase_ == 7)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); + } + accessPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>( + (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 7; + onChanged();; + return accessPolicyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> accessLevelBuilder_; + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + @java.lang.Override + public boolean hasAccessLevel() { + return accessContextPolicyCase_ == 8; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 8) { + return accessLevelBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder setAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { + if (accessLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + accessLevelBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 8; + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder setAccessLevel( + com.google.identity.accesscontextmanager.v1.AccessLevel.Builder builderForValue) { + if (accessLevelBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + accessLevelBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 8; + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder mergeAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.newBuilder((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 8) { + accessLevelBuilder_.mergeFrom(value); + } else { + accessLevelBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 8; + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public Builder clearAccessLevel() { + if (accessLevelBuilder_ == null) { + if (accessContextPolicyCase_ == 8) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 8) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + accessLevelBuilder_.clear(); + } + return this; + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + public com.google.identity.accesscontextmanager.v1.AccessLevel.Builder getAccessLevelBuilder() { + return getAccessLevelFieldBuilder().getBuilder(); + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { + if ((accessContextPolicyCase_ == 8) && (accessLevelBuilder_ != null)) { + return accessLevelBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 8) { + return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [access level user
+     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> + getAccessLevelFieldBuilder() { + if (accessLevelBuilder_ == null) { + if (!(accessContextPolicyCase_ == 8)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); + } + accessLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>( + (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 8; + onChanged();; + return accessLevelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> servicePerimeterBuilder_; + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + @java.lang.Override + public boolean hasServicePerimeter() { + return accessContextPolicyCase_ == 9; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } else { + if (accessContextPolicyCase_ == 9) { + return servicePerimeterBuilder_.getMessage(); + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder setServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { + if (servicePerimeterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessContextPolicy_ = value; + onChanged(); + } else { + servicePerimeterBuilder_.setMessage(value); + } + accessContextPolicyCase_ = 9; + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder setServicePerimeter( + com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder builderForValue) { + if (servicePerimeterBuilder_ == null) { + accessContextPolicy_ = builderForValue.build(); + onChanged(); + } else { + servicePerimeterBuilder_.setMessage(builderForValue.build()); + } + accessContextPolicyCase_ = 9; + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder mergeServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9 && + accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance()) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.newBuilder((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_) + .mergeFrom(value).buildPartial(); + } else { + accessContextPolicy_ = value; + } + onChanged(); + } else { + if (accessContextPolicyCase_ == 9) { + servicePerimeterBuilder_.mergeFrom(value); + } else { + servicePerimeterBuilder_.setMessage(value); + } + } + accessContextPolicyCase_ = 9; + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public Builder clearServicePerimeter() { + if (servicePerimeterBuilder_ == null) { + if (accessContextPolicyCase_ == 9) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + onChanged(); + } + } else { + if (accessContextPolicyCase_ == 9) { + accessContextPolicyCase_ = 0; + accessContextPolicy_ = null; + } + servicePerimeterBuilder_.clear(); + } + return this; + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + public com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder getServicePerimeterBuilder() { + return getServicePerimeterFieldBuilder().getBuilder(); + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + @java.lang.Override + public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { + if ((accessContextPolicyCase_ == 9) && (servicePerimeterBuilder_ != null)) { + return servicePerimeterBuilder_.getMessageOrBuilder(); + } else { + if (accessContextPolicyCase_ == 9) { + return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; + } + return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + } + /** + *
+     * Please also refer to the [service perimeter user
+     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+     * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> + getServicePerimeterFieldBuilder() { + if (servicePerimeterBuilder_ == null) { + if (!(accessContextPolicyCase_ == 9)) { + accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); + } + servicePerimeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>( + (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_, + getParentForChildren(), + isClean()); + accessContextPolicy_ = null; + } + accessContextPolicyCase_ = 9; + onChanged();; + return servicePerimeterBuilder_; + } + + private com.google.cloud.asset.v1p7beta1.RelatedAssets relatedAssets_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelatedAssets, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder> relatedAssetsBuilder_; + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + * @return Whether the relatedAssets field is set. + */ + public boolean hasRelatedAssets() { + return relatedAssetsBuilder_ != null || relatedAssets_ != null; + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + * @return The relatedAssets. + */ + public com.google.cloud.asset.v1p7beta1.RelatedAssets getRelatedAssets() { + if (relatedAssetsBuilder_ == null) { + return relatedAssets_ == null ? com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance() : relatedAssets_; + } else { + return relatedAssetsBuilder_.getMessage(); + } + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + public Builder setRelatedAssets(com.google.cloud.asset.v1p7beta1.RelatedAssets value) { + if (relatedAssetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relatedAssets_ = value; + onChanged(); + } else { + relatedAssetsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + public Builder setRelatedAssets( + com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder builderForValue) { + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = builderForValue.build(); + onChanged(); + } else { + relatedAssetsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + public Builder mergeRelatedAssets(com.google.cloud.asset.v1p7beta1.RelatedAssets value) { + if (relatedAssetsBuilder_ == null) { + if (relatedAssets_ != null) { + relatedAssets_ = + com.google.cloud.asset.v1p7beta1.RelatedAssets.newBuilder(relatedAssets_).mergeFrom(value).buildPartial(); + } else { + relatedAssets_ = value; + } + onChanged(); + } else { + relatedAssetsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + public Builder clearRelatedAssets() { + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = null; + onChanged(); + } else { + relatedAssets_ = null; + relatedAssetsBuilder_ = null; + } + + return this; + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + public com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder getRelatedAssetsBuilder() { + + onChanged(); + return getRelatedAssetsFieldBuilder().getBuilder(); + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + public com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { + if (relatedAssetsBuilder_ != null) { + return relatedAssetsBuilder_.getMessageOrBuilder(); + } else { + return relatedAssets_ == null ? + com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance() : relatedAssets_; + } + } + /** + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelatedAssets, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder> + getRelatedAssetsFieldBuilder() { + if (relatedAssetsBuilder_ == null) { + relatedAssetsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelatedAssets, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder>( + getRelatedAssets(), + getParentForChildren(), + isClean()); + relatedAssets_ = null; + } + return relatedAssetsBuilder_; + } + + private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAncestorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_.getUnmodifiableView(); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param index The index to set the value at. + * @param value The ancestors to set. + * @return This builder for chaining. + */ + public Builder setAncestors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param value The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param values The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAllAncestors( + java.lang.Iterable values) { + ensureAncestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ancestors_); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @return This builder for chaining. + */ + public Builder clearAncestors() { + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The ancestry path of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root. If the asset
+     * is a project, folder, or organization, the ancestry path starts from the
+     * asset itself.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 10; + * @param value The bytes of the ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.Asset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.Asset) + private static final com.google.cloud.asset.v1p7beta1.Asset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.Asset(); + } + + public static com.google.cloud.asset.v1p7beta1.Asset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Asset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Asset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Asset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java new file mode 100644 index 000000000000..4711ab6e07b9 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java @@ -0,0 +1,417 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface AssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.Asset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + *
+   * The last update timestamp of an asset. update_time is updated when
+   * create/update/delete operation is performed.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + * @return The resource. + */ + com.google.cloud.asset.v1p7beta1.Resource getResource(); + /** + *
+   * A representation of the resource.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.Resource resource = 3; + */ + com.google.cloud.asset.v1p7beta1.ResourceOrBuilder getResourceOrBuilder(); + + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+   * more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return Whether the iamPolicy field is set. + */ + boolean hasIamPolicy(); + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+   * more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + * @return The iamPolicy. + */ + com.google.iam.v1.Policy getIamPolicy(); + /** + *
+   * A representation of the Cloud IAM policy set on a Google Cloud resource.
+   * There can be a maximum of one Cloud IAM policy set on any given resource.
+   * In addition, Cloud IAM policies inherit their granted access scope from any
+   * policies set on parent resources in the resource hierarchy. Therefore, the
+   * effectively policy is the union of both the policy set on this resource
+   * and each policy set on all of the resource's ancestry resource levels in
+   * the hierarchy. See
+   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
+   * more information.
+   * 
+ * + * .google.iam.v1.Policy iam_policy = 4; + */ + com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); + + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + java.util.List + getOrgPolicyList(); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + int getOrgPolicyCount(); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + java.util.List + getOrgPolicyOrBuilderList(); + /** + *
+   * A representation of an [organization
+   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
+   * There can be more than one organization policy with different constraints
+   * set on a given resource.
+   * 
+ * + * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; + */ + com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( + int index); + + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return Whether the accessPolicy field is set. + */ + boolean hasAccessPolicy(); + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + * @return The accessPolicy. + */ + com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy(); + /** + *
+   * Please also refer to the [access policy user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + */ + com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder(); + + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return Whether the accessLevel field is set. + */ + boolean hasAccessLevel(); + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + * @return The accessLevel. + */ + com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel(); + /** + *
+   * Please also refer to the [access level user
+   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + */ + com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder(); + + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return Whether the servicePerimeter field is set. + */ + boolean hasServicePerimeter(); + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + * @return The servicePerimeter. + */ + com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter(); + /** + *
+   * Please also refer to the [service perimeter user
+   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
+   * 
+ * + * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + */ + com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder(); + + /** + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + * @return Whether the relatedAssets field is set. + */ + boolean hasRelatedAssets(); + /** + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + * @return The relatedAssets. + */ + com.google.cloud.asset.v1p7beta1.RelatedAssets getRelatedAssets(); + /** + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; + */ + com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder(); + + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return A list containing the ancestors. + */ + java.util.List + getAncestorsList(); + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @return The count of ancestors. + */ + int getAncestorsCount(); + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + java.lang.String getAncestors(int index); + /** + *
+   * The ancestry path of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root. If the asset
+   * is a project, folder, or organization, the ancestry path starts from the
+   * asset itself.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 10; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + com.google.protobuf.ByteString + getAncestorsBytes(int index); + + public com.google.cloud.asset.v1p7beta1.Asset.AccessContextPolicyCase getAccessContextPolicyCase(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java new file mode 100644 index 000000000000..f29c856c2589 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java @@ -0,0 +1,160 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +public final class AssetProto { + private AssetProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/asset/v1p7beta1/assets.pr" + + "oto\022\034google.cloud.asset.v1p7beta1\032\031googl" + + "e/api/resource.proto\032)google/cloud/orgpo" + + "licy/v1/orgpolicy.proto\032(google/cloud/os" + + "config/v1/inventory.proto\032\032google/iam/v1" + + "/policy.proto\032:google/identity/accesscon" + + "textmanager/v1/access_level.proto\032;googl" + + "e/identity/accesscontextmanager/v1/acces" + + "s_policy.proto\032?google/identity/accessco" + + "ntextmanager/v1/service_perimeter.proto\032" + + "\034google/protobuf/struct.proto\032\037google/pr" + + "otobuf/timestamp.proto\"\206\005\n\005Asset\022/\n\013upda" + + "te_time\030\013 \001(\0132\032.google.protobuf.Timestam" + + "p\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0228\n\010r" + + "esource\030\003 \001(\0132&.google.cloud.asset.v1p7b" + + "eta1.Resource\022)\n\niam_policy\030\004 \001(\0132\025.goog" + + "le.iam.v1.Policy\0225\n\norg_policy\030\006 \003(\0132!.g" + + "oogle.cloud.orgpolicy.v1.Policy\022N\n\racces" + + "s_policy\030\007 \001(\01325.google.identity.accessc" + + "ontextmanager.v1.AccessPolicyH\000\022L\n\014acces" + + "s_level\030\010 \001(\01324.google.identity.accessco" + + "ntextmanager.v1.AccessLevelH\000\022V\n\021service" + + "_perimeter\030\t \001(\01329.google.identity.acces" + + "scontextmanager.v1.ServicePerimeterH\000\022C\n" + + "\016related_assets\030\r \001(\0132+.google.cloud.ass" + + "et.v1p7beta1.RelatedAssets\022\021\n\tancestors\030" + + "\n \003(\t:\'\352A$\n\037cloudasset.googleapis.com/As" + + "set\022\001*B\027\n\025access_context_policy\"\262\001\n\010Reso" + + "urce\022\017\n\007version\030\001 \001(\t\022\036\n\026discovery_docum" + + "ent_uri\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n" + + "\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004d" + + "ata\030\006 \001(\0132\027.google.protobuf.Struct\022\020\n\010lo" + + "cation\030\010 \001(\t\"\242\001\n\rRelatedAssets\022U\n\027relati" + + "onship_attributes\030\001 \001(\01324.google.cloud.a" + + "sset.v1p7beta1.RelationshipAttributes\022:\n" + + "\006assets\030\002 \003(\0132*.google.cloud.asset.v1p7b" + + "eta1.RelatedAsset\"r\n\026RelationshipAttribu" + + "tes\022\014\n\004type\030\004 \001(\t\022\034\n\024source_resource_typ" + + "e\030\001 \001(\t\022\034\n\024target_resource_type\030\002 \001(\t\022\016\n" + + "\006action\030\003 \001(\t\"j\n\014RelatedAsset\0223\n\005asset\030\001" + + " \001(\tB$\372A!\n\037cloudasset.googleapis.com/Ass" + + "et\022\022\n\nasset_type\030\002 \001(\t\022\021\n\tancestors\030\003 \003(" + + "\tB\264\001\n com.google.cloud.asset.v1p7beta1B\n" + + "AssetProtoP\001ZAgoogle.golang.org/genproto" + + "/googleapis/cloud/asset/v1p7beta1;asset\370" + + "\001\001\252\002\034Google.Cloud.Asset.V1P7Beta1\312\002\034Goog" + + "le\\Cloud\\Asset\\V1p7beta1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(), + com.google.cloud.osconfig.v1.Inventories.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(), + com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor, + new java.lang.String[] { "UpdateTime", "Name", "AssetType", "Resource", "IamPolicy", "OrgPolicy", "AccessPolicy", "AccessLevel", "ServicePerimeter", "RelatedAssets", "Ancestors", "AccessContextPolicy", }); + internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor, + new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", "Location", }); + internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor, + new java.lang.String[] { "RelationshipAttributes", "Assets", }); + internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor, + new java.lang.String[] { "Type", "SourceResourceType", "TargetResourceType", "Action", }); + internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor, + new java.lang.String[] { "Asset", "AssetType", "Ancestors", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(); + com.google.cloud.osconfig.v1.Inventories.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(); + com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java new file mode 100644 index 000000000000..93f4e5177984 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java @@ -0,0 +1,203 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public final class AssetServiceProto { + private AssetServiceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/asset/v1p7beta1/asset_ser" + + "vice.proto\022\034google.cloud.asset.v1p7beta1" + + "\032\034google/api/annotations.proto\032\027google/a" + + "pi/client.proto\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032)goo" + + "gle/cloud/asset/v1p7beta1/assets.proto\032#" + + "google/longrunning/operations.proto\032\037goo" + + "gle/protobuf/timestamp.proto\"\267\002\n\023ExportA" + + "ssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cl" + + "oudasset.googleapis.com/Asset\022-\n\tread_ti" + + "me\030\002 \001(\0132\032.google.protobuf.Timestamp\022\023\n\013" + + "asset_types\030\003 \003(\t\022?\n\014content_type\030\004 \001(\0162" + + ").google.cloud.asset.v1p7beta1.ContentTy" + + "pe\022F\n\routput_config\030\005 \001(\0132*.google.cloud" + + ".asset.v1p7beta1.OutputConfigB\003\340A\002\022\032\n\022re" + + "lationship_types\030\006 \003(\t\"\313\001\n\024ExportAssetsR" + + "esponse\022-\n\tread_time\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022A\n\routput_config\030\002 \001(\0132*." + + "google.cloud.asset.v1p7beta1.OutputConfi" + + "g\022A\n\routput_result\030\003 \001(\0132*.google.cloud." + + "asset.v1p7beta1.OutputResult\"\271\001\n\014OutputC" + + "onfig\022G\n\017gcs_destination\030\001 \001(\0132,.google." + + "cloud.asset.v1p7beta1.GcsDestinationH\000\022Q" + + "\n\024bigquery_destination\030\002 \001(\01321.google.cl" + + "oud.asset.v1p7beta1.BigQueryDestinationH" + + "\000B\r\n\013destination\"]\n\014OutputResult\022C\n\ngcs_" + + "result\030\001 \001(\0132-.google.cloud.asset.v1p7be" + + "ta1.GcsOutputResultH\000B\010\n\006result\"\037\n\017GcsOu" + + "tputResult\022\014\n\004uris\030\001 \003(\t\"C\n\016GcsDestinati" + + "on\022\r\n\003uri\030\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 \001(\tH\000B" + + "\014\n\nobject_uri\"\273\001\n\023BigQueryDestination\022\024\n" + + "\007dataset\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\tB\003\340A\002\022" + + "\r\n\005force\030\003 \001(\010\022C\n\016partition_spec\030\004 \001(\0132+" + + ".google.cloud.asset.v1p7beta1.PartitionS" + + "pec\022&\n\036separate_tables_per_asset_type\030\005 " + + "\001(\010\"\260\001\n\rPartitionSpec\022O\n\rpartition_key\030\001" + + " \001(\01628.google.cloud.asset.v1p7beta1.Part" + + "itionSpec.PartitionKey\"N\n\014PartitionKey\022\035" + + "\n\031PARTITION_KEY_UNSPECIFIED\020\000\022\r\n\tREAD_TI" + + "ME\020\001\022\020\n\014REQUEST_TIME\020\002*~\n\013ContentType\022\034\n" + + "\030CONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020" + + "\001\022\016\n\nIAM_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACC" + + "ESS_POLICY\020\005\022\020\n\014RELATIONSHIP\020\0072\332\002\n\014Asset" + + "Service\022\372\001\n\014ExportAssets\0221.google.cloud." + + "asset.v1p7beta1.ExportAssetsRequest\032\035.go" + + "ogle.longrunning.Operation\"\227\001\202\323\344\223\002)\"$/v1" + + "p7beta1/{parent=*/*}:exportAssets:\001*\312Ae\n" + + "1google.cloud.asset.v1p7beta1.ExportAsse" + + "tsResponse\0220google.cloud.asset.v1p7beta1" + + ".ExportAssetsRequest\032M\312A\031cloudasset.goog" + + "leapis.com\322A.https://www.googleapis.com/" + + "auth/cloud-platformB\270\001\n com.google.cloud" + + ".asset.v1p7beta1B\021AssetServiceProtoP\001ZAg" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/asset/v1p7beta1;asset\252\002\034Google.Cloud." + + "Asset.V1P7Beta1\312\002\034Google\\Cloud\\Asset\\V1p" + + "7beta1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.asset.v1p7beta1.AssetProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor, + new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "OutputConfig", "RelationshipTypes", }); + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor, + new java.lang.String[] { "ReadTime", "OutputConfig", "OutputResult", }); + internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor, + new java.lang.String[] { "GcsDestination", "BigqueryDestination", "Destination", }); + internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor, + new java.lang.String[] { "GcsResult", "Result", }); + internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor, + new java.lang.String[] { "Uris", }); + internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor, + new java.lang.String[] { "Uri", "UriPrefix", "ObjectUri", }); + internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor, + new java.lang.String[] { "Dataset", "Table", "Force", "PartitionSpec", "SeparateTablesPerAssetType", }); + internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor, + new java.lang.String[] { "PartitionKey", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.asset.v1p7beta1.AssetProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java new file mode 100644 index 000000000000..abf75e2117fb --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java @@ -0,0 +1,1466 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * A BigQuery destination for exporting assets to.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.BigQueryDestination} + */ +public final class BigQueryDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.BigQueryDestination) + BigQueryDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use BigQueryDestination.newBuilder() to construct. + private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BigQueryDestination() { + dataset_ = ""; + table_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BigQueryDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BigQueryDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + table_ = s; + break; + } + case 24: { + + force_ = input.readBool(); + break; + } + case 34: { + com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder subBuilder = null; + if (partitionSpec_ != null) { + subBuilder = partitionSpec_.toBuilder(); + } + partitionSpec_ = input.readMessage(com.google.cloud.asset.v1p7beta1.PartitionSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(partitionSpec_); + partitionSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 40: { + + separateTablesPerAssetType_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.BigQueryDestination.class, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_FIELD_NUMBER = 2; + private volatile java.lang.Object table_; + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + @java.lang.Override + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } + } + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_; + /** + *
+   * If the destination table already exists and this flag is `TRUE`, the
+   * table will be overwritten by the contents of assets snapshot. If the flag
+   * is `FALSE` or unset and the destination table already exists, the export
+   * call returns an INVALID_ARGUMEMT error.
+   * 
+ * + * bool force = 3; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + public static final int PARTITION_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1p7beta1.PartitionSpec partitionSpec_; + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + * @return Whether the partitionSpec field is set. + */ + @java.lang.Override + public boolean hasPartitionSpec() { + return partitionSpec_ != null; + } + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + * @return The partitionSpec. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.PartitionSpec getPartitionSpec() { + return partitionSpec_ == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance() : partitionSpec_; + } + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { + return getPartitionSpec(); + } + + public static final int SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER = 5; + private boolean separateTablesPerAssetType_; + /** + *
+   * If this flag is `TRUE`, the snapshot results will be written to one or
+   * multiple tables, each of which contains results of one asset type. The
+   * [force] and [partition_spec] fields will apply to each of them.
+   * Field [table] will be concatenated with "_" and the asset type names (see
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+   * supported asset types) to construct per-asset-type table names, in which
+   * all non-alphanumeric characters like "." and "/" will be substituted by
+   * "_". Example: if field [table] is "mytable" and snapshot results
+   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+   * tables does not exist, a new table with the concatenated name will be
+   * created.
+   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+   * each table will include RECORD-type columns mapped to the nested fields in
+   * the Asset.resource.data field of that asset type (up to the 15 nested level
+   * BigQuery supports
+   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+   * fields in >15 nested levels will be stored in JSON format string as a child
+   * column of its parent RECORD column.
+   * If error occurs when exporting to any table, the whole export call will
+   * return an error but the export results that already succeed will persist.
+   * Example: if exporting to table_type_A succeeds when exporting to
+   * table_type_B fails during one export call, the results in table_type_A will
+   * persist and there will not be partial results persisting in a table.
+   * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return The separateTablesPerAssetType. + */ + @java.lang.Override + public boolean getSeparateTablesPerAssetType() { + return separateTablesPerAssetType_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + if (partitionSpec_ != null) { + output.writeMessage(4, getPartitionSpec()); + } + if (separateTablesPerAssetType_ != false) { + output.writeBool(5, separateTablesPerAssetType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, force_); + } + if (partitionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPartitionSpec()); + } + if (separateTablesPerAssetType_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, separateTablesPerAssetType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.BigQueryDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.BigQueryDestination other = (com.google.cloud.asset.v1p7beta1.BigQueryDestination) obj; + + if (!getDataset() + .equals(other.getDataset())) return false; + if (!getTable() + .equals(other.getTable())) return false; + if (getForce() + != other.getForce()) return false; + if (hasPartitionSpec() != other.hasPartitionSpec()) return false; + if (hasPartitionSpec()) { + if (!getPartitionSpec() + .equals(other.getPartitionSpec())) return false; + } + if (getSeparateTablesPerAssetType() + != other.getSeparateTablesPerAssetType()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForce()); + if (hasPartitionSpec()) { + hash = (37 * hash) + PARTITION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPartitionSpec().hashCode(); + } + hash = (37 * hash) + SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSeparateTablesPerAssetType()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.BigQueryDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A BigQuery destination for exporting assets to.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.BigQueryDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.BigQueryDestination) + com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.BigQueryDestination.class, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.BigQueryDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + table_ = ""; + + force_ = false; + + if (partitionSpecBuilder_ == null) { + partitionSpec_ = null; + } else { + partitionSpec_ = null; + partitionSpecBuilder_ = null; + } + separateTablesPerAssetType_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestination build() { + com.google.cloud.asset.v1p7beta1.BigQueryDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestination buildPartial() { + com.google.cloud.asset.v1p7beta1.BigQueryDestination result = new com.google.cloud.asset.v1p7beta1.BigQueryDestination(this); + result.dataset_ = dataset_; + result.table_ = table_; + result.force_ = force_; + if (partitionSpecBuilder_ == null) { + result.partitionSpec_ = partitionSpec_; + } else { + result.partitionSpec_ = partitionSpecBuilder_.build(); + } + result.separateTablesPerAssetType_ = separateTablesPerAssetType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.BigQueryDestination) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.BigQueryDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.BigQueryDestination other) { + if (other == com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getTable().isEmpty()) { + table_ = other.table_; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + if (other.hasPartitionSpec()) { + mergePartitionSpec(other.getPartitionSpec()); + } + if (other.getSeparateTablesPerAssetType() != false) { + setSeparateTablesPerAssetType(other.getSeparateTablesPerAssetType()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.BigQueryDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.BigQueryDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString + getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery dataset in format
+     * "projects/projectId/datasets/datasetId", to which the snapshot result
+     * should be exported. If this dataset does not exist, the export call returns
+     * an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object table_ = ""; + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + public java.lang.String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + table_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + public com.google.protobuf.ByteString + getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The table to set. + * @return This builder for chaining. + */ + public Builder setTable( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + table_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTable() { + + table_ = getDefaultInstance().getTable(); + onChanged(); + return this; + } + /** + *
+     * Required. The BigQuery table to which the snapshot result should be
+     * written. If this table does not exist, a new table with the given name
+     * will be created.
+     * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for table to set. + * @return This builder for chaining. + */ + public Builder setTableBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + table_ = value; + onChanged(); + return this; + } + + private boolean force_ ; + /** + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is `FALSE` or unset and the destination table already exists, the export
+     * call returns an INVALID_ARGUMEMT error.
+     * 
+ * + * bool force = 3; + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is `FALSE` or unset and the destination table already exists, the export
+     * call returns an INVALID_ARGUMEMT error.
+     * 
+ * + * bool force = 3; + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + onChanged(); + return this; + } + /** + *
+     * If the destination table already exists and this flag is `TRUE`, the
+     * table will be overwritten by the contents of assets snapshot. If the flag
+     * is `FALSE` or unset and the destination table already exists, the export
+     * call returns an INVALID_ARGUMEMT error.
+     * 
+ * + * bool force = 3; + * @return This builder for chaining. + */ + public Builder clearForce() { + + force_ = false; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p7beta1.PartitionSpec partitionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.PartitionSpec, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder, com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder> partitionSpecBuilder_; + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + * @return Whether the partitionSpec field is set. + */ + public boolean hasPartitionSpec() { + return partitionSpecBuilder_ != null || partitionSpec_ != null; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + * @return The partitionSpec. + */ + public com.google.cloud.asset.v1p7beta1.PartitionSpec getPartitionSpec() { + if (partitionSpecBuilder_ == null) { + return partitionSpec_ == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance() : partitionSpec_; + } else { + return partitionSpecBuilder_.getMessage(); + } + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + public Builder setPartitionSpec(com.google.cloud.asset.v1p7beta1.PartitionSpec value) { + if (partitionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partitionSpec_ = value; + onChanged(); + } else { + partitionSpecBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + public Builder setPartitionSpec( + com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder builderForValue) { + if (partitionSpecBuilder_ == null) { + partitionSpec_ = builderForValue.build(); + onChanged(); + } else { + partitionSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + public Builder mergePartitionSpec(com.google.cloud.asset.v1p7beta1.PartitionSpec value) { + if (partitionSpecBuilder_ == null) { + if (partitionSpec_ != null) { + partitionSpec_ = + com.google.cloud.asset.v1p7beta1.PartitionSpec.newBuilder(partitionSpec_).mergeFrom(value).buildPartial(); + } else { + partitionSpec_ = value; + } + onChanged(); + } else { + partitionSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + public Builder clearPartitionSpec() { + if (partitionSpecBuilder_ == null) { + partitionSpec_ = null; + onChanged(); + } else { + partitionSpec_ = null; + partitionSpecBuilder_ = null; + } + + return this; + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + public com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder getPartitionSpecBuilder() { + + onChanged(); + return getPartitionSpecFieldBuilder().getBuilder(); + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + public com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { + if (partitionSpecBuilder_ != null) { + return partitionSpecBuilder_.getMessageOrBuilder(); + } else { + return partitionSpec_ == null ? + com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance() : partitionSpec_; + } + } + /** + *
+     * [partition_spec] determines whether to export to partitioned table(s) and
+     * how to partition the data.
+     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+     * non-partitioned table(s). [force] will decide whether to overwrite existing
+     * table(s).
+     * If [partition_spec] is specified. First, the snapshot results will be
+     * written to partitioned table(s) with two additional timestamp columns,
+     * readTime and requestTime, one of which will be the partition key. Secondly,
+     * in the case when any destination table already exists, it will first try to
+     * update existing table's schema as necessary by appending additional
+     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+     * overwritten by the snapshot results (data in different partitions will
+     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+     * error will be returned if the schema update or data appension fails.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.PartitionSpec, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder, com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder> + getPartitionSpecFieldBuilder() { + if (partitionSpecBuilder_ == null) { + partitionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.PartitionSpec, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder, com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder>( + getPartitionSpec(), + getParentForChildren(), + isClean()); + partitionSpec_ = null; + } + return partitionSpecBuilder_; + } + + private boolean separateTablesPerAssetType_ ; + /** + *
+     * If this flag is `TRUE`, the snapshot results will be written to one or
+     * multiple tables, each of which contains results of one asset type. The
+     * [force] and [partition_spec] fields will apply to each of them.
+     * Field [table] will be concatenated with "_" and the asset type names (see
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+     * supported asset types) to construct per-asset-type table names, in which
+     * all non-alphanumeric characters like "." and "/" will be substituted by
+     * "_". Example: if field [table] is "mytable" and snapshot results
+     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+     * tables does not exist, a new table with the concatenated name will be
+     * created.
+     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+     * each table will include RECORD-type columns mapped to the nested fields in
+     * the Asset.resource.data field of that asset type (up to the 15 nested level
+     * BigQuery supports
+     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+     * fields in >15 nested levels will be stored in JSON format string as a child
+     * column of its parent RECORD column.
+     * If error occurs when exporting to any table, the whole export call will
+     * return an error but the export results that already succeed will persist.
+     * Example: if exporting to table_type_A succeeds when exporting to
+     * table_type_B fails during one export call, the results in table_type_A will
+     * persist and there will not be partial results persisting in a table.
+     * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return The separateTablesPerAssetType. + */ + @java.lang.Override + public boolean getSeparateTablesPerAssetType() { + return separateTablesPerAssetType_; + } + /** + *
+     * If this flag is `TRUE`, the snapshot results will be written to one or
+     * multiple tables, each of which contains results of one asset type. The
+     * [force] and [partition_spec] fields will apply to each of them.
+     * Field [table] will be concatenated with "_" and the asset type names (see
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+     * supported asset types) to construct per-asset-type table names, in which
+     * all non-alphanumeric characters like "." and "/" will be substituted by
+     * "_". Example: if field [table] is "mytable" and snapshot results
+     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+     * tables does not exist, a new table with the concatenated name will be
+     * created.
+     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+     * each table will include RECORD-type columns mapped to the nested fields in
+     * the Asset.resource.data field of that asset type (up to the 15 nested level
+     * BigQuery supports
+     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+     * fields in >15 nested levels will be stored in JSON format string as a child
+     * column of its parent RECORD column.
+     * If error occurs when exporting to any table, the whole export call will
+     * return an error but the export results that already succeed will persist.
+     * Example: if exporting to table_type_A succeeds when exporting to
+     * table_type_B fails during one export call, the results in table_type_A will
+     * persist and there will not be partial results persisting in a table.
+     * 
+ * + * bool separate_tables_per_asset_type = 5; + * @param value The separateTablesPerAssetType to set. + * @return This builder for chaining. + */ + public Builder setSeparateTablesPerAssetType(boolean value) { + + separateTablesPerAssetType_ = value; + onChanged(); + return this; + } + /** + *
+     * If this flag is `TRUE`, the snapshot results will be written to one or
+     * multiple tables, each of which contains results of one asset type. The
+     * [force] and [partition_spec] fields will apply to each of them.
+     * Field [table] will be concatenated with "_" and the asset type names (see
+     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+     * supported asset types) to construct per-asset-type table names, in which
+     * all non-alphanumeric characters like "." and "/" will be substituted by
+     * "_". Example: if field [table] is "mytable" and snapshot results
+     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+     * tables does not exist, a new table with the concatenated name will be
+     * created.
+     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+     * each table will include RECORD-type columns mapped to the nested fields in
+     * the Asset.resource.data field of that asset type (up to the 15 nested level
+     * BigQuery supports
+     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+     * fields in >15 nested levels will be stored in JSON format string as a child
+     * column of its parent RECORD column.
+     * If error occurs when exporting to any table, the whole export call will
+     * return an error but the export results that already succeed will persist.
+     * Example: if exporting to table_type_A succeeds when exporting to
+     * table_type_B fails during one export call, the results in table_type_A will
+     * persist and there will not be partial results persisting in a table.
+     * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return This builder for chaining. + */ + public Builder clearSeparateTablesPerAssetType() { + + separateTablesPerAssetType_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.BigQueryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.BigQueryDestination) + private static final com.google.cloud.asset.v1p7beta1.BigQueryDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.BigQueryDestination(); + } + + public static com.google.cloud.asset.v1p7beta1.BigQueryDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java new file mode 100644 index 000000000000..40da134d5f87 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java @@ -0,0 +1,174 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface BigQueryDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.BigQueryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The dataset. + */ + java.lang.String getDataset(); + /** + *
+   * Required. The BigQuery dataset in format
+   * "projects/projectId/datasets/datasetId", to which the snapshot result
+   * should be exported. If this dataset does not exist, the export call returns
+   * an INVALID_ARGUMENT error.
+   * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString + getDatasetBytes(); + + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The table. + */ + java.lang.String getTable(); + /** + *
+   * Required. The BigQuery table to which the snapshot result should be
+   * written. If this table does not exist, a new table with the given name
+   * will be created.
+   * 
+ * + * string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for table. + */ + com.google.protobuf.ByteString + getTableBytes(); + + /** + *
+   * If the destination table already exists and this flag is `TRUE`, the
+   * table will be overwritten by the contents of assets snapshot. If the flag
+   * is `FALSE` or unset and the destination table already exists, the export
+   * call returns an INVALID_ARGUMEMT error.
+   * 
+ * + * bool force = 3; + * @return The force. + */ + boolean getForce(); + + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + * @return Whether the partitionSpec field is set. + */ + boolean hasPartitionSpec(); + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + * @return The partitionSpec. + */ + com.google.cloud.asset.v1p7beta1.PartitionSpec getPartitionSpec(); + /** + *
+   * [partition_spec] determines whether to export to partitioned table(s) and
+   * how to partition the data.
+   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
+   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
+   * non-partitioned table(s). [force] will decide whether to overwrite existing
+   * table(s).
+   * If [partition_spec] is specified. First, the snapshot results will be
+   * written to partitioned table(s) with two additional timestamp columns,
+   * readTime and requestTime, one of which will be the partition key. Secondly,
+   * in the case when any destination table already exists, it will first try to
+   * update existing table's schema as necessary by appending additional
+   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
+   * overwritten by the snapshot results (data in different partitions will
+   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
+   * error will be returned if the schema update or data appension fails.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; + */ + com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder getPartitionSpecOrBuilder(); + + /** + *
+   * If this flag is `TRUE`, the snapshot results will be written to one or
+   * multiple tables, each of which contains results of one asset type. The
+   * [force] and [partition_spec] fields will apply to each of them.
+   * Field [table] will be concatenated with "_" and the asset type names (see
+   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
+   * supported asset types) to construct per-asset-type table names, in which
+   * all non-alphanumeric characters like "." and "/" will be substituted by
+   * "_". Example: if field [table] is "mytable" and snapshot results
+   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
+   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
+   * tables does not exist, a new table with the concatenated name will be
+   * created.
+   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
+   * each table will include RECORD-type columns mapped to the nested fields in
+   * the Asset.resource.data field of that asset type (up to the 15 nested level
+   * BigQuery supports
+   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
+   * fields in >15 nested levels will be stored in JSON format string as a child
+   * column of its parent RECORD column.
+   * If error occurs when exporting to any table, the whole export call will
+   * return an error but the export results that already succeed will persist.
+   * Example: if exporting to table_type_A succeeds when exporting to
+   * table_type_B fails during one export call, the results in table_type_A will
+   * persist and there will not be partial results persisting in a table.
+   * 
+ * + * bool separate_tables_per_asset_type = 5; + * @return The separateTablesPerAssetType. + */ + boolean getSeparateTablesPerAssetType(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java new file mode 100644 index 000000000000..b093c4e6ef27 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java @@ -0,0 +1,201 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * Asset content type.
+ * 
+ * + * Protobuf enum {@code google.cloud.asset.v1p7beta1.ContentType} + */ +public enum ContentType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + CONTENT_TYPE_UNSPECIFIED(0), + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + RESOURCE(1), + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + IAM_POLICY(2), + /** + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + ORG_POLICY(4), + /** + *
+   * The Cloud Access context manager Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + ACCESS_POLICY(5), + /** + *
+   * The related resources.
+   * 
+ * + * RELATIONSHIP = 7; + */ + RELATIONSHIP(7), + UNRECOGNIZED(-1), + ; + + /** + *
+   * Unspecified content type.
+   * 
+ * + * CONTENT_TYPE_UNSPECIFIED = 0; + */ + public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + *
+   * Resource metadata.
+   * 
+ * + * RESOURCE = 1; + */ + public static final int RESOURCE_VALUE = 1; + /** + *
+   * The actual IAM policy set on a resource.
+   * 
+ * + * IAM_POLICY = 2; + */ + public static final int IAM_POLICY_VALUE = 2; + /** + *
+   * The Cloud Organization Policy set on an asset.
+   * 
+ * + * ORG_POLICY = 4; + */ + public static final int ORG_POLICY_VALUE = 4; + /** + *
+   * The Cloud Access context manager Policy set on an asset.
+   * 
+ * + * ACCESS_POLICY = 5; + */ + public static final int ACCESS_POLICY_VALUE = 5; + /** + *
+   * The related resources.
+   * 
+ * + * RELATIONSHIP = 7; + */ + public static final int RELATIONSHIP_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ContentType forNumber(int value) { + switch (value) { + case 0: return CONTENT_TYPE_UNSPECIFIED; + case 1: return RESOURCE; + case 2: return IAM_POLICY; + case 4: return ORG_POLICY; + case 5: return ACCESS_POLICY; + case 7: return RELATIONSHIP; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ContentType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ContentType findValueByNumber(int number) { + return ContentType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ContentType[] VALUES = values(); + + public static ContentType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ContentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p7beta1.ContentType) +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java new file mode 100644 index 000000000000..b09380a20b1f --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java @@ -0,0 +1,2056 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * Export asset request.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsRequest} + */ +public final class ExportAssetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.ExportAssetsRequest) + ExportAssetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExportAssetsRequest.newBuilder() to construct. + private ExportAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExportAssetsRequest() { + parent_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExportAssetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExportAssetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 42: { + com.google.cloud.asset.v1p7beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.asset.v1p7beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + relationshipTypes_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.class, com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_; + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 4; + private int contentType_; + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override public com.google.cloud.asset.v1p7beta1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p7beta1.ContentType result = com.google.cloud.asset.v1p7beta1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1p7beta1.ContentType.UNRECOGNIZED : result; + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_; + } + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (readTime_ != null) { + output.writeMessage(2, getReadTime()); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (contentType_ != com.google.cloud.asset.v1p7beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, contentType_); + } + if (outputConfig_ != null) { + output.writeMessage(5, getOutputConfig()); + } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relationshipTypes_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReadTime()); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (contentType_ != com.google.cloud.asset.v1p7beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, contentType_); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getOutputConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest other = (com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) obj; + + if (!getParent() + .equals(other.getParent())) return false; + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (!getAssetTypesList() + .equals(other.getAssetTypesList())) return false; + if (contentType_ != other.contentType_) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (!getRelationshipTypesList() + .equals(other.getRelationshipTypesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.ExportAssetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Export asset request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.ExportAssetsRequest) + com.google.cloud.asset.v1p7beta1.ExportAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.class, com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + contentType_ = 0; + + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest build() { + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest buildPartial() { + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest result = new com.google.cloud.asset.v1p7beta1.ExportAssetsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.contentType_ = contentType_; + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationshipTypes_ = relationshipTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.ExportAssetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.ExportAssetsRequest other) { + if (other == com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required. The relative name of the root asset. This can only be an
+     * organization number (such as "organizations/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345"),
+     * or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Timestamp to take an asset snapshot. This can only be set to a timestamp
+     * between the current time and the current time minus 35 days (inclusive).
+     * If not specified, the current time will be used. Due to delays in resource
+     * data collection and indexing, there is a volatile window during which
+     * running the same query may get different results.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList + getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString + getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes( + java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * A list of asset types to take a snapshot for. For example:
+     * "compute.googleapis.com/Disk".
+     * Regular expressions are also supported. For example:
+     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+     * with "compute.googleapis.com".
+     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+     * regular expression syntax. If the regular expression does not match any
+     * supported asset type, an INVALID_ARGUMENT error will be returned.
+     * If specified, only matching assets will be returned, otherwise, it will
+     * snapshot all asset types. See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types.
+     * 
+ * + * repeated string asset_types = 3; + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override public int getContentTypeValue() { + return contentType_; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p7beta1.ContentType result = com.google.cloud.asset.v1p7beta1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1p7beta1.ContentType.UNRECOGNIZED : result; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1p7beta1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Asset content type. If not specified, no content but the asset name will be
+     * returned.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1p7beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1p7beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p7beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Required. Output configuration indicating where the results will be output
+     * to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000002; + } + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList + getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString + getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes( + java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, relationshipTypes_); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+     * specified relationships, or give errors if any relationship_types'
+     * supported types are not in [asset_types]. If not specified, it will
+     * snapshot all [asset_types]' supported relationships. An unspecified
+     * [asset_types] field means all supported asset_types. See [Introduction to
+     * Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.ExportAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.ExportAssetsRequest) + private static final com.google.cloud.asset.v1p7beta1.ExportAssetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.ExportAssetsRequest(); + } + + public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportAssetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java new file mode 100644 index 000000000000..068316c46c0b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java @@ -0,0 +1,295 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface ExportAssetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.ExportAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * Required. The relative name of the root asset. This can only be an
+   * organization number (such as "organizations/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345"),
+   * or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Timestamp to take an asset snapshot. This can only be set to a timestamp
+   * between the current time and the current time minus 35 days (inclusive).
+   * If not specified, the current time will be used. Due to delays in resource
+   * data collection and indexing, there is a volatile window during which
+   * running the same query may get different results.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return A list containing the assetTypes. + */ + java.util.List + getAssetTypesList(); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + *
+   * A list of asset types to take a snapshot for. For example:
+   * "compute.googleapis.com/Disk".
+   * Regular expressions are also supported. For example:
+   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
+   * with "compute.googleapis.com".
+   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
+   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
+   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
+   * regular expression syntax. If the regular expression does not match any
+   * supported asset type, an INVALID_ARGUMENT error will be returned.
+   * If specified, only matching assets will be returned, otherwise, it will
+   * snapshot all asset types. See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types.
+   * 
+ * + * repeated string asset_types = 3; + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString + getAssetTypesBytes(int index); + + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + *
+   * Asset content type. If not specified, no content but the asset name will be
+   * returned.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; + * @return The contentType. + */ + com.google.cloud.asset.v1p7beta1.ContentType getContentType(); + + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return The outputConfig. + */ + com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig(); + /** + *
+   * Required. Output configuration indicating where the results will be output
+   * to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return A list containing the relationshipTypes. + */ + java.util.List + getRelationshipTypesList(); + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
+   * specified relationships, or give errors if any relationship_types'
+   * supported types are not in [asset_types]. If not specified, it will
+   * snapshot all [asset_types]' supported relationships. An unspecified
+   * [asset_types] field means all supported asset_types. See [Introduction to
+   * Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString + getRelationshipTypesBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java new file mode 100644 index 000000000000..2249e653b628 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java @@ -0,0 +1,1193 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * The export asset response. This message is returned by the
+ * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+ * method in the returned
+ * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+ * field.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsResponse} + */ +public final class ExportAssetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.ExportAssetsResponse) + ExportAssetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ExportAssetsResponse.newBuilder() to construct. + private ExportAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ExportAssetsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ExportAssetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ExportAssetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.cloud.asset.v1p7beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = input.readMessage(com.google.cloud.asset.v1p7beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.cloud.asset.v1p7beta1.OutputResult.Builder subBuilder = null; + if (outputResult_ != null) { + subBuilder = outputResult_.toBuilder(); + } + outputResult_ = input.readMessage(com.google.cloud.asset.v1p7beta1.OutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputResult_); + outputResult_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.class, com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.Builder.class); + } + + public static final int READ_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp readTime_; + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p7beta1.OutputResult outputResult_; + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + * @return Whether the outputResult field is set. + */ + @java.lang.Override + public boolean hasOutputResult() { + return outputResult_ != null; + } + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + * @return The outputResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputResult getOutputResult() { + return outputResult_ == null ? com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance() : outputResult_; + } + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder getOutputResultOrBuilder() { + return getOutputResult(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (readTime_ != null) { + output.writeMessage(1, getReadTime()); + } + if (outputConfig_ != null) { + output.writeMessage(2, getOutputConfig()); + } + if (outputResult_ != null) { + output.writeMessage(3, getOutputResult()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getReadTime()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getOutputConfig()); + } + if (outputResult_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getOutputResult()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.ExportAssetsResponse other = (com.google.cloud.asset.v1p7beta1.ExportAssetsResponse) obj; + + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime() + .equals(other.getReadTime())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig() + .equals(other.getOutputConfig())) return false; + } + if (hasOutputResult() != other.hasOutputResult()) return false; + if (hasOutputResult()) { + if (!getOutputResult() + .equals(other.getOutputResult())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + if (hasOutputResult()) { + hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getOutputResult().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.ExportAssetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The export asset response. This message is returned by the
+   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
+   * method in the returned
+   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
+   * field.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.ExportAssetsResponse) + com.google.cloud.asset.v1p7beta1.ExportAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.class, com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + if (outputResultBuilder_ == null) { + outputResult_ = null; + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse build() { + com.google.cloud.asset.v1p7beta1.ExportAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse buildPartial() { + com.google.cloud.asset.v1p7beta1.ExportAssetsResponse result = new com.google.cloud.asset.v1p7beta1.ExportAssetsResponse(this); + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + if (outputResultBuilder_ == null) { + result.outputResult_ = outputResult_; + } else { + result.outputResult_ = outputResultBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsResponse) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.ExportAssetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.ExportAssetsResponse other) { + if (other == com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.getDefaultInstance()) return this; + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + if (other.hasOutputResult()) { + mergeOutputResult(other.getOutputResult()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.ExportAssetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + *
+     * Time the snapshot was taken.
+     * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getReadTime(), + getParentForChildren(), + isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> outputConfigBuilder_; + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + * @return The outputConfig. + */ + public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + public Builder setOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1p7beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + public Builder mergeOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1p7beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + public com.google.cloud.asset.v1p7beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null ? + com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; + } + } + /** + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder>( + getOutputConfig(), + getParentForChildren(), + isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + private com.google.cloud.asset.v1p7beta1.OutputResult outputResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputResult, com.google.cloud.asset.v1p7beta1.OutputResult.Builder, com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder> outputResultBuilder_; + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + * @return Whether the outputResult field is set. + */ + public boolean hasOutputResult() { + return outputResultBuilder_ != null || outputResult_ != null; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + * @return The outputResult. + */ + public com.google.cloud.asset.v1p7beta1.OutputResult getOutputResult() { + if (outputResultBuilder_ == null) { + return outputResult_ == null ? com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance() : outputResult_; + } else { + return outputResultBuilder_.getMessage(); + } + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + public Builder setOutputResult(com.google.cloud.asset.v1p7beta1.OutputResult value) { + if (outputResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputResult_ = value; + onChanged(); + } else { + outputResultBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + public Builder setOutputResult( + com.google.cloud.asset.v1p7beta1.OutputResult.Builder builderForValue) { + if (outputResultBuilder_ == null) { + outputResult_ = builderForValue.build(); + onChanged(); + } else { + outputResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + public Builder mergeOutputResult(com.google.cloud.asset.v1p7beta1.OutputResult value) { + if (outputResultBuilder_ == null) { + if (outputResult_ != null) { + outputResult_ = + com.google.cloud.asset.v1p7beta1.OutputResult.newBuilder(outputResult_).mergeFrom(value).buildPartial(); + } else { + outputResult_ = value; + } + onChanged(); + } else { + outputResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + public Builder clearOutputResult() { + if (outputResultBuilder_ == null) { + outputResult_ = null; + onChanged(); + } else { + outputResult_ = null; + outputResultBuilder_ = null; + } + + return this; + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + public com.google.cloud.asset.v1p7beta1.OutputResult.Builder getOutputResultBuilder() { + + onChanged(); + return getOutputResultFieldBuilder().getBuilder(); + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + public com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder getOutputResultOrBuilder() { + if (outputResultBuilder_ != null) { + return outputResultBuilder_.getMessageOrBuilder(); + } else { + return outputResult_ == null ? + com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance() : outputResult_; + } + } + /** + *
+     * Output result indicating where the assets were exported to. For example, a
+     * set of actual Google Cloud Storage object uris where the assets are
+     * exported to. The uris can be different from what [output_config] has
+     * specified, as the service will split the output object into multiple ones
+     * once it exceeds a single Google Cloud Storage object limit.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputResult, com.google.cloud.asset.v1p7beta1.OutputResult.Builder, com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder> + getOutputResultFieldBuilder() { + if (outputResultBuilder_ == null) { + outputResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.OutputResult, com.google.cloud.asset.v1p7beta1.OutputResult.Builder, com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder>( + getOutputResult(), + getParentForChildren(), + isClean()); + outputResult_ = null; + } + return outputResultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.ExportAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.ExportAssetsResponse) + private static final com.google.cloud.asset.v1p7beta1.ExportAssetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.ExportAssetsResponse(); + } + + public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportAssetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java new file mode 100644 index 000000000000..17a006b72eef --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface ExportAssetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.ExportAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + *
+   * Time the snapshot was taken.
+   * 
+ * + * .google.protobuf.Timestamp read_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + * @return The outputConfig. + */ + com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig(); + /** + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; + */ + com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + * @return Whether the outputResult field is set. + */ + boolean hasOutputResult(); + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + * @return The outputResult. + */ + com.google.cloud.asset.v1p7beta1.OutputResult getOutputResult(); + /** + *
+   * Output result indicating where the assets were exported to. For example, a
+   * set of actual Google Cloud Storage object uris where the assets are
+   * exported to. The uris can be different from what [output_config] has
+   * specified, as the service will split the output object into multiple ones
+   * once it exceeds a single Google Cloud Storage object limit.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; + */ + com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder getOutputResultOrBuilder(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java new file mode 100644 index 000000000000..c2432f8da124 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java @@ -0,0 +1,1038 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * A Cloud Storage location.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsDestination} + */ +public final class GcsDestination extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.GcsDestination) + GcsDestinationOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsDestination() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 1; + objectUri_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + objectUriCase_ = 2; + objectUri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.GcsDestination.class, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder.class); + } + + private int objectUriCase_ = 0; + private java.lang.Object objectUri_; + public enum ObjectUriCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + URI(1), + URI_PREFIX(2), + OBJECTURI_NOT_SET(0); + private final int value; + private ObjectUriCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ObjectUriCase valueOf(int value) { + return forNumber(value); + } + + public static ObjectUriCase forNumber(int value) { + switch (value) { + case 1: return URI; + case 2: return URI_PREFIX; + case 0: return OBJECTURI_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ObjectUriCase + getObjectUriCase() { + return ObjectUriCase.forNumber( + objectUriCase_); + } + + public static final int URI_FIELD_NUMBER = 1; + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return objectUriCase_ == 1; + } + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 1) { + objectUri_ = s; + } + return s; + } + } + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 1) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_PREFIX_FIELD_NUMBER = 2; + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return Whether the uriPrefix field is set. + */ + public boolean hasUriPrefix() { + return objectUriCase_ == 2; + } + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The uriPrefix. + */ + public java.lang.String getUriPrefix() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 2) { + objectUri_ = s; + } + return s; + } + } + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The bytes for uriPrefix. + */ + public com.google.protobuf.ByteString + getUriPrefixBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 2) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (objectUriCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); + } + if (objectUriCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (objectUriCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); + } + if (objectUriCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.GcsDestination other = (com.google.cloud.asset.v1p7beta1.GcsDestination) obj; + + if (!getObjectUriCase().equals(other.getObjectUriCase())) return false; + switch (objectUriCase_) { + case 1: + if (!getUri() + .equals(other.getUri())) return false; + break; + case 2: + if (!getUriPrefix() + .equals(other.getUriPrefix())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (objectUriCase_) { + case 1: + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + break; + case 2: + hash = (37 * hash) + URI_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getUriPrefix().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Cloud Storage location.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsDestination} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.GcsDestination) + com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.GcsDestination.class, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + objectUriCase_ = 0; + objectUri_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestination build() { + com.google.cloud.asset.v1p7beta1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestination buildPartial() { + com.google.cloud.asset.v1p7beta1.GcsDestination result = new com.google.cloud.asset.v1p7beta1.GcsDestination(this); + if (objectUriCase_ == 1) { + result.objectUri_ = objectUri_; + } + if (objectUriCase_ == 2) { + result.objectUri_ = objectUri_; + } + result.objectUriCase_ = objectUriCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.GcsDestination) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.GcsDestination)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.GcsDestination other) { + if (other == com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance()) return this; + switch (other.getObjectUriCase()) { + case URI: { + objectUriCase_ = 1; + objectUri_ = other.objectUri_; + onChanged(); + break; + } + case URI_PREFIX: { + objectUriCase_ = 2; + objectUri_ = other.objectUri_; + onChanged(); + break; + } + case OBJECTURI_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int objectUriCase_ = 0; + private java.lang.Object objectUri_; + public ObjectUriCase + getObjectUriCase() { + return ObjectUriCase.forNumber( + objectUriCase_); + } + + public Builder clearObjectUri() { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + return this; + } + + + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return objectUriCase_ == 1; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 1) { + objectUri_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 1) { + ref = objectUri_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 1) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + objectUriCase_ = 1; + objectUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @return This builder for chaining. + */ + public Builder clearUri() { + if (objectUriCase_ == 1) { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1; + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + objectUriCase_ = 1; + objectUri_ = value; + onChanged(); + return this; + } + + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return Whether the uriPrefix field is set. + */ + @java.lang.Override + public boolean hasUriPrefix() { + return objectUriCase_ == 2; + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return The uriPrefix. + */ + @java.lang.Override + public java.lang.String getUriPrefix() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (objectUriCase_ == 2) { + objectUri_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return The bytes for uriPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriPrefixBytes() { + java.lang.Object ref = ""; + if (objectUriCase_ == 2) { + ref = objectUri_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (objectUriCase_ == 2) { + objectUri_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @param value The uriPrefix to set. + * @return This builder for chaining. + */ + public Builder setUriPrefix( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + objectUriCase_ = 2; + objectUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @return This builder for chaining. + */ + public Builder clearUriPrefix() { + if (objectUriCase_ == 2) { + objectUriCase_ = 0; + objectUri_ = null; + onChanged(); + } + return this; + } + /** + *
+     * The uri prefix of all generated Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+     * contains assets for that type. <shard number> starts from 0. Example:
+     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+     * the first shard of output objects containing all
+     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+     * returned if file with the same name "gs://bucket_name/object_name_prefix"
+     * already exists.
+     * 
+ * + * string uri_prefix = 2; + * @param value The bytes for uriPrefix to set. + * @return This builder for chaining. + */ + public Builder setUriPrefixBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + objectUriCase_ = 2; + objectUri_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.GcsDestination) + private static final com.google.cloud.asset.v1p7beta1.GcsDestination DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.GcsDestination(); + } + + public static com.google.cloud.asset.v1p7beta1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..f9f91bc6a862 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java @@ -0,0 +1,105 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface GcsDestinationOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return Whether the uri field is set. + */ + boolean hasUri(); + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The uri. + */ + java.lang.String getUri(); + /** + *
+   * The uri of the Cloud Storage object. It's the same uri that is used by
+   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
+   * Editing Object
+   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+   * for more information.
+   * 
+ * + * string uri = 1; + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return Whether the uriPrefix field is set. + */ + boolean hasUriPrefix(); + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The uriPrefix. + */ + java.lang.String getUriPrefix(); + /** + *
+   * The uri prefix of all generated Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
+   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
+   * contains assets for that type. <shard number> starts from 0. Example:
+   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
+   * the first shard of output objects containing all
+   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
+   * returned if file with the same name "gs://bucket_name/object_name_prefix"
+   * already exists.
+   * 
+ * + * string uri_prefix = 2; + * @return The bytes for uriPrefix. + */ + com.google.protobuf.ByteString + getUriPrefixBytes(); + + public com.google.cloud.asset.v1p7beta1.GcsDestination.ObjectUriCase getObjectUriCase(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java new file mode 100644 index 000000000000..d201500b2c0b --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java @@ -0,0 +1,689 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * A Cloud Storage output result.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsOutputResult} + */ +public final class GcsOutputResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.GcsOutputResult) + GcsOutputResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use GcsOutputResult.newBuilder() to construct. + private GcsOutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GcsOutputResult() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GcsOutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GcsOutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + uris_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + uris_ = uris_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.GcsOutputResult.class, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder.class); + } + + public static final int URIS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList uris_; + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList + getUrisList() { + return uris_; + } + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString + getUrisBytes(int index) { + return uris_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < uris_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.GcsOutputResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.GcsOutputResult other = (com.google.cloud.asset.v1p7beta1.GcsOutputResult) obj; + + if (!getUrisList() + .equals(other.getUrisList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.GcsOutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A Cloud Storage output result.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsOutputResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.GcsOutputResult) + com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.GcsOutputResult.class, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.GcsOutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResult build() { + com.google.cloud.asset.v1p7beta1.GcsOutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResult buildPartial() { + com.google.cloud.asset.v1p7beta1.GcsOutputResult result = new com.google.cloud.asset.v1p7beta1.GcsOutputResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + uris_ = uris_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.uris_ = uris_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.GcsOutputResult) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.GcsOutputResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.GcsOutputResult other) { + if (other == com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance()) return this; + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.GcsOutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.GcsOutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureUrisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList + getUrisList() { + return uris_.getUnmodifiableView(); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString + getUrisBytes(int index) { + return uris_.getByteString(index); + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris( + java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, uris_); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * List of uris of the Cloud Storage objects. Example:
+     * "gs://bucket_name/object_name".
+     * 
+ * + * repeated string uris = 1; + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.GcsOutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.GcsOutputResult) + private static final com.google.cloud.asset.v1p7beta1.GcsOutputResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.GcsOutputResult(); + } + + public static com.google.cloud.asset.v1p7beta1.GcsOutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsOutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsOutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java new file mode 100644 index 000000000000..c163a99c673d --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface GcsOutputResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.GcsOutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return A list containing the uris. + */ + java.util.List + getUrisList(); + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @return The count of uris. + */ + int getUrisCount(); + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + /** + *
+   * List of uris of the Cloud Storage objects. Example:
+   * "gs://bucket_name/object_name".
+   * 
+ * + * repeated string uris = 1; + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString + getUrisBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java new file mode 100644 index 000000000000..74c5a8dd34ab --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java @@ -0,0 +1,1036 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * Output configuration for export assets destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputConfig} + */ +public final class OutputConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.OutputConfig) + OutputConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputConfig() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1p7beta1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1p7beta1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1p7beta1.GcsDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1p7beta1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + case 18: { + com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = ((com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage(com.google.cloud.asset.v1p7beta1.BigQueryDestination.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.OutputConfig.class, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + public enum DestinationCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + BIGQUERY_DESTINATION(2), + DESTINATION_NOT_SET(0); + private final int value; + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: return GCS_DESTINATION; + case 2: return BIGQUERY_DESTINATION; + case 0: return DESTINATION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); + } + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); + } + + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestination getBigqueryDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); + } + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + output.writeMessage(2, (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.OutputConfig other = (com.google.cloud.asset.v1p7beta1.OutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination() + .equals(other.getGcsDestination())) return false; + break; + case 2: + if (!getBigqueryDestination() + .equals(other.getBigqueryDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 2: + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output configuration for export assets destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.OutputConfig) + com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.OutputConfig.class, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfig build() { + com.google.cloud.asset.v1p7beta1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfig buildPartial() { + com.google.cloud.asset.v1p7beta1.OutputConfig result = new com.google.cloud.asset.v1p7beta1.OutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + if (destinationCase_ == 2) { + if (bigqueryDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = bigqueryDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.OutputConfig) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.OutputConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.OutputConfig other) { + if (other == com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance()) return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case BIGQUERY_DESTINATION: { + mergeBigqueryDestination(other.getBigqueryDestination()); + break; + } + case DESTINATION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int destinationCase_ = 0; + private java.lang.Object destination_; + public DestinationCase + getDestinationCase() { + return DestinationCase.forNumber( + destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.GcsDestination, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder, com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.asset.v1p7beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1p7beta1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.asset.v1p7beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 && + destination_ != com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1p7beta1.GcsDestination.newBuilder((com.google.cloud.asset.v1p7beta1.GcsDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } else { + gcsDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 1; + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.asset.v1p7beta1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.GcsDestination, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder, com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.GcsDestination, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder, com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder>( + (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged();; + return gcsDestinationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.BigQueryDestination, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder, com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestination getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return bigqueryDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination(com.google.cloud.asset.v1p7beta1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + public Builder setBigqueryDestination( + com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + public Builder mergeBigqueryDestination(com.google.cloud.asset.v1p7beta1.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2 && + destination_ != com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance()) { + destination_ = com.google.cloud.asset.v1p7beta1.BigQueryDestination.newBuilder((com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_) + .mergeFrom(value).buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + bigqueryDestinationBuilder_.mergeFrom(value); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + } + destinationCase_ = 2; + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + bigqueryDestinationBuilder_.clear(); + } + return this; + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + public com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder getBigqueryDestinationBuilder() { + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { + if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; + } + return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); + } + } + /** + *
+     * Destination on BigQuery. The output table stores the fields in asset
+     * proto as columns in BigQuery.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.BigQueryDestination, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder, com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); + } + bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.BigQueryDestination, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder, com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder>( + (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged();; + return bigqueryDestinationBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.OutputConfig) + private static final com.google.cloud.asset.v1p7beta1.OutputConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.OutputConfig(); + } + + public static com.google.cloud.asset.v1p7beta1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..0e59d14707ee --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface OutputConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + * @return The gcsDestination. + */ + com.google.cloud.asset.v1p7beta1.GcsDestination getGcsDestination(); + /** + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + * @return Whether the bigqueryDestination field is set. + */ + boolean hasBigqueryDestination(); + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + * @return The bigqueryDestination. + */ + com.google.cloud.asset.v1p7beta1.BigQueryDestination getBigqueryDestination(); + /** + *
+   * Destination on BigQuery. The output table stores the fields in asset
+   * proto as columns in BigQuery.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; + */ + com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); + + public com.google.cloud.asset.v1p7beta1.OutputConfig.DestinationCase getDestinationCase(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java new file mode 100644 index 000000000000..12d94870cd68 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java @@ -0,0 +1,761 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * Output result of export assets.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputResult} + */ +public final class OutputResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.OutputResult) + OutputResultOrBuilder { +private static final long serialVersionUID = 0L; + // Use OutputResult.newBuilder() to construct. + private OutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private OutputResult() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OutputResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private OutputResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder subBuilder = null; + if (resultCase_ == 1) { + subBuilder = ((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.cloud.asset.v1p7beta1.GcsOutputResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 1; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.OutputResult.class, com.google.cloud.asset.v1p7beta1.OutputResult.Builder.class); + } + + private int resultCase_ = 0; + private java.lang.Object result_; + public enum ResultCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_RESULT(1), + RESULT_NOT_SET(0); + private final int value; + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: return GCS_RESULT; + case 0: return RESULT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public static final int GCS_RESULT_FIELD_NUMBER = 1; + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + * @return Whether the gcsResult field is set. + */ + @java.lang.Override + public boolean hasGcsResult() { + return resultCase_ == 1; + } + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + * @return The gcsResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResult getGcsResult() { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); + } + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (resultCase_ == 1) { + output.writeMessage(1, (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.OutputResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.OutputResult other = (com.google.cloud.asset.v1p7beta1.OutputResult) obj; + + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 1: + if (!getGcsResult() + .equals(other.getGcsResult())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (resultCase_) { + case 1: + hash = (37 * hash) + GCS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getGcsResult().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.OutputResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Output result of export assets.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.OutputResult) + com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.OutputResult.class, com.google.cloud.asset.v1p7beta1.OutputResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.OutputResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputResult build() { + com.google.cloud.asset.v1p7beta1.OutputResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputResult buildPartial() { + com.google.cloud.asset.v1p7beta1.OutputResult result = new com.google.cloud.asset.v1p7beta1.OutputResult(this); + if (resultCase_ == 1) { + if (gcsResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = gcsResultBuilder_.build(); + } + } + result.resultCase_ = resultCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.OutputResult) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.OutputResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.OutputResult other) { + if (other == com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance()) return this; + switch (other.getResultCase()) { + case GCS_RESULT: { + mergeGcsResult(other.getGcsResult()); + break; + } + case RESULT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.OutputResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.OutputResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int resultCase_ = 0; + private java.lang.Object result_; + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.GcsOutputResult, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder, com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder> gcsResultBuilder_; + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + * @return Whether the gcsResult field is set. + */ + @java.lang.Override + public boolean hasGcsResult() { + return resultCase_ == 1; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + * @return The gcsResult. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResult getGcsResult() { + if (gcsResultBuilder_ == null) { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); + } else { + if (resultCase_ == 1) { + return gcsResultBuilder_.getMessage(); + } + return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); + } + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + public Builder setGcsResult(com.google.cloud.asset.v1p7beta1.GcsOutputResult value) { + if (gcsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + gcsResultBuilder_.setMessage(value); + } + resultCase_ = 1; + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + public Builder setGcsResult( + com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder builderForValue) { + if (gcsResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + gcsResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 1; + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + public Builder mergeGcsResult(com.google.cloud.asset.v1p7beta1.GcsOutputResult value) { + if (gcsResultBuilder_ == null) { + if (resultCase_ == 1 && + result_ != com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance()) { + result_ = com.google.cloud.asset.v1p7beta1.GcsOutputResult.newBuilder((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 1) { + gcsResultBuilder_.mergeFrom(value); + } else { + gcsResultBuilder_.setMessage(value); + } + } + resultCase_ = 1; + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + public Builder clearGcsResult() { + if (gcsResultBuilder_ == null) { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + } + gcsResultBuilder_.clear(); + } + return this; + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + public com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder getGcsResultBuilder() { + return getGcsResultFieldBuilder().getBuilder(); + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { + if ((resultCase_ == 1) && (gcsResultBuilder_ != null)) { + return gcsResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 1) { + return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; + } + return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); + } + } + /** + *
+     * Export result on Cloud Storage.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.GcsOutputResult, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder, com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder> + getGcsResultFieldBuilder() { + if (gcsResultBuilder_ == null) { + if (!(resultCase_ == 1)) { + result_ = com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); + } + gcsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.GcsOutputResult, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder, com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder>( + (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 1; + onChanged();; + return gcsResultBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.OutputResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.OutputResult) + private static final com.google.cloud.asset.v1p7beta1.OutputResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.OutputResult(); + } + + public static com.google.cloud.asset.v1p7beta1.OutputResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.OutputResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java new file mode 100644 index 000000000000..84f878583beb --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface OutputResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.OutputResult) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + * @return Whether the gcsResult field is set. + */ + boolean hasGcsResult(); + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + * @return The gcsResult. + */ + com.google.cloud.asset.v1p7beta1.GcsOutputResult getGcsResult(); + /** + *
+   * Export result on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; + */ + com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder getGcsResultOrBuilder(); + + public com.google.cloud.asset.v1p7beta1.OutputResult.ResultCase getResultCase(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java new file mode 100644 index 000000000000..b2b65109c4cd --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java @@ -0,0 +1,716 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * Specifications of BigQuery partitioned table as export destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.PartitionSpec} + */ +public final class PartitionSpec extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.PartitionSpec) + PartitionSpecOrBuilder { +private static final long serialVersionUID = 0L; + // Use PartitionSpec.newBuilder() to construct. + private PartitionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PartitionSpec() { + partitionKey_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PartitionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PartitionSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int rawValue = input.readEnum(); + + partitionKey_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.PartitionSpec.class, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder.class); + } + + /** + *
+   * This enum is used to determine the partition key column when exporting
+   * assets to BigQuery partitioned table(s). Note that, if the partition key is
+   * a timestamp column, the actual partition is based on its date value
+   * (expressed in UTC. see details in
+   * https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables).
+   * 
+ * + * Protobuf enum {@code google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey} + */ + public enum PartitionKey + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified partition key. If used, it means using non-partitioned table.
+     * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + PARTITION_KEY_UNSPECIFIED(0), + /** + *
+     * The time when the snapshot is taken. If specified as partition key, the
+     * result table(s) is partitoned by the additional timestamp column,
+     * readTime. If [read_time] in ExportAssetsRequest is specified, the
+     * readTime column's value will be the same as it. Otherwise, its value will
+     * be the current time that is used to take the snapshot.
+     * 
+ * + * READ_TIME = 1; + */ + READ_TIME(1), + /** + *
+     * The time when the request is received and started to be processed. If
+     * specified as partition key, the result table(s) is partitoned by the
+     * requestTime column, an additional timestamp column representing when the
+     * request was received.
+     * 
+ * + * REQUEST_TIME = 2; + */ + REQUEST_TIME(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified partition key. If used, it means using non-partitioned table.
+     * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + public static final int PARTITION_KEY_UNSPECIFIED_VALUE = 0; + /** + *
+     * The time when the snapshot is taken. If specified as partition key, the
+     * result table(s) is partitoned by the additional timestamp column,
+     * readTime. If [read_time] in ExportAssetsRequest is specified, the
+     * readTime column's value will be the same as it. Otherwise, its value will
+     * be the current time that is used to take the snapshot.
+     * 
+ * + * READ_TIME = 1; + */ + public static final int READ_TIME_VALUE = 1; + /** + *
+     * The time when the request is received and started to be processed. If
+     * specified as partition key, the result table(s) is partitoned by the
+     * requestTime column, an additional timestamp column representing when the
+     * request was received.
+     * 
+ * + * REQUEST_TIME = 2; + */ + public static final int REQUEST_TIME_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PartitionKey valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PartitionKey forNumber(int value) { + switch (value) { + case 0: return PARTITION_KEY_UNSPECIFIED; + case 1: return READ_TIME; + case 2: return REQUEST_TIME; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PartitionKey> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PartitionKey findValueByNumber(int number) { + return PartitionKey.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.PartitionSpec.getDescriptor().getEnumTypes().get(0); + } + + private static final PartitionKey[] VALUES = values(); + + public static PartitionKey valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PartitionKey(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey) + } + + public static final int PARTITION_KEY_FIELD_NUMBER = 1; + private int partitionKey_; + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override public int getPartitionKeyValue() { + return partitionKey_; + } + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @return The partitionKey. + */ + @java.lang.Override public com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.valueOf(partitionKey_); + return result == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (partitionKey_ != com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { + output.writeEnum(1, partitionKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partitionKey_ != com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, partitionKey_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.PartitionSpec)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.PartitionSpec other = (com.google.cloud.asset.v1p7beta1.PartitionSpec) obj; + + if (partitionKey_ != other.partitionKey_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; + hash = (53 * hash) + partitionKey_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.PartitionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * Specifications of BigQuery partitioned table as export destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.PartitionSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.PartitionSpec) + com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.PartitionSpec.class, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.PartitionSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + partitionKey_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.PartitionSpec getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.PartitionSpec build() { + com.google.cloud.asset.v1p7beta1.PartitionSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.PartitionSpec buildPartial() { + com.google.cloud.asset.v1p7beta1.PartitionSpec result = new com.google.cloud.asset.v1p7beta1.PartitionSpec(this); + result.partitionKey_ = partitionKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.PartitionSpec) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.PartitionSpec)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.PartitionSpec other) { + if (other == com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance()) return this; + if (other.partitionKey_ != 0) { + setPartitionKeyValue(other.getPartitionKeyValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.PartitionSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.PartitionSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int partitionKey_ = 0; + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override public int getPartitionKeyValue() { + return partitionKey_; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @param value The enum numeric value on the wire for partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKeyValue(int value) { + + partitionKey_ = value; + onChanged(); + return this; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @return The partitionKey. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.valueOf(partitionKey_); + return result == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @param value The partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKey(com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey value) { + if (value == null) { + throw new NullPointerException(); + } + + partitionKey_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @return This builder for chaining. + */ + public Builder clearPartitionKey() { + + partitionKey_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.PartitionSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.PartitionSpec) + private static final com.google.cloud.asset.v1p7beta1.PartitionSpec DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.PartitionSpec(); + } + + public static com.google.cloud.asset.v1p7beta1.PartitionSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartitionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PartitionSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.PartitionSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java new file mode 100644 index 000000000000..0de671bc2e18 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java @@ -0,0 +1,28 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/asset_service.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface PartitionSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.PartitionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @return The enum numeric value on the wire for partitionKey. + */ + int getPartitionKeyValue(); + /** + *
+   * The partition key for BigQuery partitioned table.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; + * @return The partitionKey. + */ + com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey getPartitionKey(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java new file mode 100644 index 000000000000..be36b7d7f295 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java @@ -0,0 +1,1123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * An asset identify in Google Cloud which contains its name, type and
+ * ancestors. An asset can be any resource in the Google Cloud [resource
+ * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+ * a resource outside the Google Cloud resource hierarchy (such as Google
+ * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+ * See [Supported asset
+ * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+ * for more information.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAsset} + */ +public final class RelatedAsset extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.RelatedAsset) + RelatedAssetOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedAsset.newBuilder() to construct. + private RelatedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedAsset() { + asset_ = ""; + assetType_ = ""; + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedAsset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelatedAsset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + asset_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ancestors_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.RelatedAsset.class, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder.class); + } + + public static final int ASSET_FIELD_NUMBER = 1; + private volatile java.lang.Object asset_; + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The asset. + */ + @java.lang.Override + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } + } + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for asset. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANCESTORS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList ancestors_; + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_; + } + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + for (int i = 0; i < ancestors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ancestors_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + { + int dataSize = 0; + for (int i = 0; i < ancestors_.size(); i++) { + dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); + } + size += dataSize; + size += 1 * getAncestorsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.RelatedAsset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.RelatedAsset other = (com.google.cloud.asset.v1p7beta1.RelatedAsset) obj; + + if (!getAsset() + .equals(other.getAsset())) return false; + if (!getAssetType() + .equals(other.getAssetType())) return false; + if (!getAncestorsList() + .equals(other.getAncestorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (getAncestorsCount() > 0) { + hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAncestorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.RelatedAsset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * An asset identify in Google Cloud which contains its name, type and
+   * ancestors. An asset can be any resource in the Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * a resource outside the Google Cloud resource hierarchy (such as Google
+   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAsset} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.RelatedAsset) + com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.RelatedAsset.class, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.RelatedAsset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + asset_ = ""; + + assetType_ = ""; + + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAsset getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAsset build() { + com.google.cloud.asset.v1p7beta1.RelatedAsset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAsset buildPartial() { + com.google.cloud.asset.v1p7beta1.RelatedAsset result = new com.google.cloud.asset.v1p7beta1.RelatedAsset(this); + int from_bitField0_ = bitField0_; + result.asset_ = asset_; + result.assetType_ = assetType_; + if (((bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ancestors_ = ancestors_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.RelatedAsset) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.RelatedAsset)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelatedAsset other) { + if (other == com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance()) return this; + if (!other.getAsset().isEmpty()) { + asset_ = other.asset_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.ancestors_.isEmpty()) { + if (ancestors_.isEmpty()) { + ancestors_ = other.ancestors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAncestorsIsMutable(); + ancestors_.addAll(other.ancestors_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.RelatedAsset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.RelatedAsset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object asset_ = ""; + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The asset. + */ + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for asset. + */ + public com.google.protobuf.ByteString + getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @param value The asset to set. + * @return This builder for chaining. + */ + public Builder setAsset( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + asset_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return This builder for chaining. + */ + public Builder clearAsset() { + + asset_ = getDefaultInstance().getAsset(); + onChanged(); + return this; + } + /** + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @param value The bytes for asset to set. + * @return This builder for chaining. + */ + public Builder setAssetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + asset_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString + getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAncestorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); + bitField0_ |= 0x00000001; + } + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList + getAncestorsList() { + return ancestors_.getUnmodifiableView(); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString + getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param index The index to set the value at. + * @param value The ancestors to set. + * @return This builder for chaining. + */ + public Builder setAncestors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.set(index, value); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param value The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param values The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAllAncestors( + java.lang.Iterable values) { + ensureAncestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ancestors_); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @return This builder for chaining. + */ + public Builder clearAncestors() { + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * @param value The bytes of the ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.RelatedAsset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.RelatedAsset) + private static final com.google.cloud.asset.v1p7beta1.RelatedAsset DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.RelatedAsset(); + } + + public static com.google.cloud.asset.v1p7beta1.RelatedAsset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedAsset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedAsset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAsset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java new file mode 100644 index 000000000000..584ef775ccf2 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface RelatedAssetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.RelatedAsset) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The asset. + */ + java.lang.String getAsset(); + /** + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * @return The bytes for asset. + */ + com.google.protobuf.ByteString + getAssetBytes(); + + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString + getAssetTypeBytes(); + + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return A list containing the ancestors. + */ + java.util.List + getAncestorsList(); + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @return The count of ancestors. + */ + int getAncestorsCount(); + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + java.lang.String getAncestors(int index); + /** + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + com.google.protobuf.ByteString + getAncestorsBytes(int index); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java new file mode 100644 index 000000000000..f0bc87151ce5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java @@ -0,0 +1,1108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * The detailed related assets with the `relationship_type`.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAssets} + */ +public final class RelatedAssets extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.RelatedAssets) + RelatedAssetsOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelatedAssets.newBuilder() to construct. + private RelatedAssets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelatedAssets() { + assets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelatedAssets(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelatedAssets( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder subBuilder = null; + if (relationshipAttributes_ != null) { + subBuilder = relationshipAttributes_.toBuilder(); + } + relationshipAttributes_ = input.readMessage(com.google.cloud.asset.v1p7beta1.RelationshipAttributes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relationshipAttributes_); + relationshipAttributes_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assets_.add( + input.readMessage(com.google.cloud.asset.v1p7beta1.RelatedAsset.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.RelatedAssets.class, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder.class); + } + + public static final int RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p7beta1.RelationshipAttributes relationshipAttributes_; + /** + *
+   * The detailed relation attributes.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + * @return Whether the relationshipAttributes field is set. + */ + @java.lang.Override + public boolean hasRelationshipAttributes() { + return relationshipAttributes_ != null; + } + /** + *
+   * The detailed relation attributes.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + * @return The relationshipAttributes. + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getRelationshipAttributes() { + return relationshipAttributes_ == null ? com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; + } + /** + *
+   * The detailed relation attributes.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { + return getRelationshipAttributes(); + } + + public static final int ASSETS_FIELD_NUMBER = 2; + private java.util.List assets_; + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAsset getAssets(int index) { + return assets_.get(index); + } + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder getAssetsOrBuilder( + int index) { + return assets_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relationshipAttributes_ != null) { + output.writeMessage(1, getRelationshipAttributes()); + } + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(2, assets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relationshipAttributes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRelationshipAttributes()); + } + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, assets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.RelatedAssets)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.RelatedAssets other = (com.google.cloud.asset.v1p7beta1.RelatedAssets) obj; + + if (hasRelationshipAttributes() != other.hasRelationshipAttributes()) return false; + if (hasRelationshipAttributes()) { + if (!getRelationshipAttributes() + .equals(other.getRelationshipAttributes())) return false; + } + if (!getAssetsList() + .equals(other.getAssetsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRelationshipAttributes()) { + hash = (37 * hash) + RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipAttributes().hashCode(); + } + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.RelatedAssets prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The detailed related assets with the `relationship_type`.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAssets} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.RelatedAssets) + com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.RelatedAssets.class, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.RelatedAssets.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAssetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = null; + } else { + relationshipAttributes_ = null; + relationshipAttributesBuilder_ = null; + } + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + assetsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAssets getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAssets build() { + com.google.cloud.asset.v1p7beta1.RelatedAssets result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAssets buildPartial() { + com.google.cloud.asset.v1p7beta1.RelatedAssets result = new com.google.cloud.asset.v1p7beta1.RelatedAssets(this); + int from_bitField0_ = bitField0_; + if (relationshipAttributesBuilder_ == null) { + result.relationshipAttributes_ = relationshipAttributes_; + } else { + result.relationshipAttributes_ = relationshipAttributesBuilder_.build(); + } + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.RelatedAssets) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.RelatedAssets)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelatedAssets other) { + if (other == com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance()) return this; + if (other.hasRelationshipAttributes()) { + mergeRelationshipAttributes(other.getRelationshipAttributes()); + } + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssetsFieldBuilder() : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.RelatedAssets parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.RelatedAssets) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.cloud.asset.v1p7beta1.RelationshipAttributes relationshipAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelationshipAttributes, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder, com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder> relationshipAttributesBuilder_; + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + * @return Whether the relationshipAttributes field is set. + */ + public boolean hasRelationshipAttributes() { + return relationshipAttributesBuilder_ != null || relationshipAttributes_ != null; + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + * @return The relationshipAttributes. + */ + public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getRelationshipAttributes() { + if (relationshipAttributesBuilder_ == null) { + return relationshipAttributes_ == null ? com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; + } else { + return relationshipAttributesBuilder_.getMessage(); + } + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder setRelationshipAttributes(com.google.cloud.asset.v1p7beta1.RelationshipAttributes value) { + if (relationshipAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationshipAttributes_ = value; + onChanged(); + } else { + relationshipAttributesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder setRelationshipAttributes( + com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder builderForValue) { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = builderForValue.build(); + onChanged(); + } else { + relationshipAttributesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder mergeRelationshipAttributes(com.google.cloud.asset.v1p7beta1.RelationshipAttributes value) { + if (relationshipAttributesBuilder_ == null) { + if (relationshipAttributes_ != null) { + relationshipAttributes_ = + com.google.cloud.asset.v1p7beta1.RelationshipAttributes.newBuilder(relationshipAttributes_).mergeFrom(value).buildPartial(); + } else { + relationshipAttributes_ = value; + } + onChanged(); + } else { + relationshipAttributesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder clearRelationshipAttributes() { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = null; + onChanged(); + } else { + relationshipAttributes_ = null; + relationshipAttributesBuilder_ = null; + } + + return this; + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + public com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder getRelationshipAttributesBuilder() { + + onChanged(); + return getRelationshipAttributesFieldBuilder().getBuilder(); + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + public com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { + if (relationshipAttributesBuilder_ != null) { + return relationshipAttributesBuilder_.getMessageOrBuilder(); + } else { + return relationshipAttributes_ == null ? + com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; + } + } + /** + *
+     * The detailed relation attributes.
+     * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelationshipAttributes, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder, com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder> + getRelationshipAttributesFieldBuilder() { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelationshipAttributes, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder, com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder>( + getRelationshipAttributes(), + getParentForChildren(), + isClean()); + relationshipAttributes_ = null; + } + return relationshipAttributesBuilder_; + } + + private java.util.List assets_ = + java.util.Collections.emptyList(); + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelatedAsset, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder> assetsBuilder_; + + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1p7beta1.RelatedAsset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1p7beta1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1p7beta1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1p7beta1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder addAssets( + com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder getAssetsBuilder( + int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder getAssetsOrBuilder( + int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder().addBuilder( + com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance()); + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder addAssetsBuilder( + int index) { + return getAssetsFieldBuilder().addBuilder( + index, com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance()); + } + /** + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + public java.util.List + getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelatedAsset, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p7beta1.RelatedAsset, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder>( + assets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + assets_ = null; + } + return assetsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.RelatedAssets) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.RelatedAssets) + private static final com.google.cloud.asset.v1p7beta1.RelatedAssets DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.RelatedAssets(); + } + + public static com.google.cloud.asset.v1p7beta1.RelatedAssets getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedAssets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedAssets(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelatedAssets getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java new file mode 100644 index 000000000000..209d5d21f46a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface RelatedAssetsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.RelatedAssets) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The detailed relation attributes.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + * @return Whether the relationshipAttributes field is set. + */ + boolean hasRelationshipAttributes(); + /** + *
+   * The detailed relation attributes.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + * @return The relationshipAttributes. + */ + com.google.cloud.asset.v1p7beta1.RelationshipAttributes getRelationshipAttributes(); + /** + *
+   * The detailed relation attributes.
+   * 
+ * + * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; + */ + com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder(); + + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + java.util.List + getAssetsList(); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + com.google.cloud.asset.v1p7beta1.RelatedAsset getAssets(int index); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + int getAssetsCount(); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + java.util.List + getAssetsOrBuilderList(); + /** + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; + */ + com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder getAssetsOrBuilder( + int index); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java new file mode 100644 index 000000000000..df7f5082cf40 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java @@ -0,0 +1,1102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * The relationship attributes which include  `type`, `source_resource_type`,
+ * `target_resource_type` and `action`.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.RelationshipAttributes} + */ +public final class RelationshipAttributes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.RelationshipAttributes) + RelationshipAttributesOrBuilder { +private static final long serialVersionUID = 0L; + // Use RelationshipAttributes.newBuilder() to construct. + private RelationshipAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RelationshipAttributes() { + type_ = ""; + sourceResourceType_ = ""; + targetResourceType_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RelationshipAttributes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RelationshipAttributes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + sourceResourceType_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + targetResourceType_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + action_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.RelationshipAttributes.class, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 4; + private volatile java.lang.Object type_; + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_RESOURCE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceResourceType_; + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The sourceResourceType. + */ + @java.lang.Override + public java.lang.String getSourceResourceType() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceResourceType_ = s; + return s; + } + } + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The bytes for sourceResourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceResourceTypeBytes() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_RESOURCE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object targetResourceType_; + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The targetResourceType. + */ + @java.lang.Override + public java.lang.String getTargetResourceType() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResourceType_ = s; + return s; + } + } + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The bytes for targetResourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTargetResourceTypeBytes() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 3; + private volatile java.lang.Object action_; + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } + } + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetResourceType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.RelationshipAttributes)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.RelationshipAttributes other = (com.google.cloud.asset.v1p7beta1.RelationshipAttributes) obj; + + if (!getType() + .equals(other.getType())) return false; + if (!getSourceResourceType() + .equals(other.getSourceResourceType())) return false; + if (!getTargetResourceType() + .equals(other.getTargetResourceType())) return false; + if (!getAction() + .equals(other.getAction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SOURCE_RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSourceResourceType().hashCode(); + hash = (37 * hash) + TARGET_RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTargetResourceType().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.RelationshipAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * The relationship attributes which include  `type`, `source_resource_type`,
+   * `target_resource_type` and `action`.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.RelationshipAttributes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.RelationshipAttributes) + com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.RelationshipAttributes.class, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.RelationshipAttributes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + sourceResourceType_ = ""; + + targetResourceType_ = ""; + + action_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelationshipAttributes build() { + com.google.cloud.asset.v1p7beta1.RelationshipAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelationshipAttributes buildPartial() { + com.google.cloud.asset.v1p7beta1.RelationshipAttributes result = new com.google.cloud.asset.v1p7beta1.RelationshipAttributes(this); + result.type_ = type_; + result.sourceResourceType_ = sourceResourceType_; + result.targetResourceType_ = targetResourceType_; + result.action_ = action_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.RelationshipAttributes) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.RelationshipAttributes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelationshipAttributes other) { + if (other == com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getSourceResourceType().isEmpty()) { + sourceResourceType_ = other.sourceResourceType_; + onChanged(); + } + if (!other.getTargetResourceType().isEmpty()) { + targetResourceType_ = other.targetResourceType_; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.RelationshipAttributes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.RelationshipAttributes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object type_ = ""; + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceResourceType_ = ""; + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @return The sourceResourceType. + */ + public java.lang.String getSourceResourceType() { + java.lang.Object ref = sourceResourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceResourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @return The bytes for sourceResourceType. + */ + public com.google.protobuf.ByteString + getSourceResourceTypeBytes() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @param value The sourceResourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceResourceType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceResourceType_ = value; + onChanged(); + return this; + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @return This builder for chaining. + */ + public Builder clearSourceResourceType() { + + sourceResourceType_ = getDefaultInstance().getSourceResourceType(); + onChanged(); + return this; + } + /** + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * @param value The bytes for sourceResourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceResourceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceResourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetResourceType_ = ""; + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @return The targetResourceType. + */ + public java.lang.String getTargetResourceType() { + java.lang.Object ref = targetResourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @return The bytes for targetResourceType. + */ + public com.google.protobuf.ByteString + getTargetResourceTypeBytes() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + targetResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @param value The targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetResourceType_ = value; + onChanged(); + return this; + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @return This builder for chaining. + */ + public Builder clearTargetResourceType() { + + targetResourceType_ = getDefaultInstance().getTargetResourceType(); + onChanged(); + return this; + } + /** + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * @param value The bytes for targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetResourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @return The bytes for action. + */ + public com.google.protobuf.ByteString + getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value; + onChanged(); + return this; + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = getDefaultInstance().getAction(); + onChanged(); + return this; + } + /** + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + action_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.RelationshipAttributes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.RelationshipAttributes) + private static final com.google.cloud.asset.v1p7beta1.RelationshipAttributes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.RelationshipAttributes(); + } + + public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelationshipAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelationshipAttributes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java new file mode 100644 index 000000000000..1f2a45eb68e5 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface RelationshipAttributesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.RelationshipAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The type. + */ + java.lang.String getType(); + /** + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The sourceResourceType. + */ + java.lang.String getSourceResourceType(); + /** + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * @return The bytes for sourceResourceType. + */ + com.google.protobuf.ByteString + getSourceResourceTypeBytes(); + + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The targetResourceType. + */ + java.lang.String getTargetResourceType(); + /** + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * @return The bytes for targetResourceType. + */ + com.google.protobuf.ByteString + getTargetResourceTypeBytes(); + + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The action. + */ + java.lang.String getAction(); + /** + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * @return The bytes for action. + */ + com.google.protobuf.ByteString + getActionBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java new file mode 100644 index 000000000000..9b784adeaf2a --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java @@ -0,0 +1,1813 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +/** + *
+ * A representation of a Google Cloud resource.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.Resource} + */ +public final class Resource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.Resource) + ResourceOrBuilder { +private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Resource() { + version_ = ""; + discoveryDocumentUri_ = ""; + discoveryName_ = ""; + resourceUrl_ = ""; + parent_ = ""; + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Resource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryDocumentUri_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + discoveryName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUrl_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 50: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (data_ != null) { + subBuilder = data_.toBuilder(); + } + data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(data_); + data_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + location_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.Resource.class, com.google.cloud.asset.v1p7beta1.Resource.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object discoveryDocumentUri_; + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + @java.lang.Override + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } + } + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object discoveryName_; + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + @java.lang.Override + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } + } + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object resourceUrl_; + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + @java.lang.Override + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } + } + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 5; + private volatile java.lang.Object parent_; + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 6; + private com.google.protobuf.Struct data_; + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return data_ != null; + } + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.Struct getData() { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + return getData(); + } + + public static final int LOCATION_FIELD_NUMBER = 8; + private volatile java.lang.Object location_; + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); + } + if (data_ != null) { + output.writeMessage(6, getData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, location_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); + } + if (data_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getData()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, location_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1p7beta1.Resource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p7beta1.Resource other = (com.google.cloud.asset.v1p7beta1.Resource) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getDiscoveryDocumentUri() + .equals(other.getDiscoveryDocumentUri())) return false; + if (!getDiscoveryName() + .equals(other.getDiscoveryName())) return false; + if (!getResourceUrl() + .equals(other.getResourceUrl())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData() + .equals(other.getData())) return false; + } + if (!getLocation() + .equals(other.getLocation())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); + hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveryName().hashCode(); + hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; + hash = (53 * hash) + getResourceUrl().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.Resource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * A representation of a Google Cloud resource.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p7beta1.Resource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.Resource) + com.google.cloud.asset.v1p7beta1.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p7beta1.Resource.class, com.google.cloud.asset.v1p7beta1.Resource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p7beta1.Resource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + discoveryDocumentUri_ = ""; + + discoveryName_ = ""; + + resourceUrl_ = ""; + + parent_ = ""; + + if (dataBuilder_ == null) { + data_ = null; + } else { + data_ = null; + dataBuilder_ = null; + } + location_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Resource getDefaultInstanceForType() { + return com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Resource build() { + com.google.cloud.asset.v1p7beta1.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Resource buildPartial() { + com.google.cloud.asset.v1p7beta1.Resource result = new com.google.cloud.asset.v1p7beta1.Resource(this); + result.version_ = version_; + result.discoveryDocumentUri_ = discoveryDocumentUri_; + result.discoveryName_ = discoveryName_; + result.resourceUrl_ = resourceUrl_; + result.parent_ = parent_; + if (dataBuilder_ == null) { + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + result.location_ = location_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1p7beta1.Resource) { + return mergeFrom((com.google.cloud.asset.v1p7beta1.Resource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.Resource other) { + if (other == com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getDiscoveryDocumentUri().isEmpty()) { + discoveryDocumentUri_ = other.discoveryDocumentUri_; + onChanged(); + } + if (!other.getDiscoveryName().isEmpty()) { + discoveryName_ = other.discoveryName_; + onChanged(); + } + if (!other.getResourceUrl().isEmpty()) { + resourceUrl_ = other.resourceUrl_; + onChanged(); + } + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasData()) { + mergeData(other.getData()); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1p7beta1.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1p7beta1.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * The API version. Example: `v1`
+     * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryDocumentUri_ = ""; + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + public java.lang.String getDiscoveryDocumentUri() { + java.lang.Object ref = discoveryDocumentUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryDocumentUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + public com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes() { + java.lang.Object ref = discoveryDocumentUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryDocumentUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @return This builder for chaining. + */ + public Builder clearDiscoveryDocumentUri() { + + discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); + onChanged(); + return this; + } + /** + *
+     * The URL of the discovery document containing the resource's JSON schema.
+     * Example:
+     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_document_uri = 2; + * @param value The bytes for discoveryDocumentUri to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryDocumentUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryDocumentUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object discoveryName_ = ""; + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + public java.lang.String getDiscoveryName() { + java.lang.Object ref = discoveryName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + discoveryName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + public com.google.protobuf.ByteString + getDiscoveryNameBytes() { + java.lang.Object ref = discoveryName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + discoveryName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @param value The discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + discoveryName_ = value; + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @return This builder for chaining. + */ + public Builder clearDiscoveryName() { + + discoveryName_ = getDefaultInstance().getDiscoveryName(); + onChanged(); + return this; + } + /** + *
+     * The JSON schema name listed in the discovery document. Example:
+     * `Project`
+     * This value is unspecified for resources that do not have an API based on a
+     * discovery document, such as Cloud Bigtable.
+     * 
+ * + * string discovery_name = 3; + * @param value The bytes for discoveryName to set. + * @return This builder for chaining. + */ + public Builder setDiscoveryNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + discoveryName_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceUrl_ = ""; + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + public java.lang.String getResourceUrl() { + java.lang.Object ref = resourceUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + public com.google.protobuf.ByteString + getResourceUrlBytes() { + java.lang.Object ref = resourceUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resourceUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUrl_ = value; + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @return This builder for chaining. + */ + public Builder clearResourceUrl() { + + resourceUrl_ = getDefaultInstance().getResourceUrl(); + onChanged(); + return this; + } + /** + *
+     * The REST URL for accessing the resource. An HTTP `GET` request using this
+     * URL returns the resource itself. Example:
+     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+     * This value is unspecified for resources without a REST API.
+     * 
+ * + * string resource_url = 4; + * @param value The bytes for resourceUrl to set. + * @return This builder for chaining. + */ + public Builder setResourceUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString + getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * The full name of the immediate parent of this resource. See
+     * [Resource
+     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * For Google Cloud assets, this value is the parent resource defined in the
+     * [Cloud IAM policy
+     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+     * Example:
+     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+     * For third-party assets, this field may be set differently.
+     * 
+ * + * string parent = 5; + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Struct data_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + public boolean hasData() { + return dataBuilder_ != null || data_ != null; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + public com.google.protobuf.Struct getData() { + if (dataBuilder_ == null) { + return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder setData( + com.google.protobuf.Struct.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder mergeData(com.google.protobuf.Struct value) { + if (dataBuilder_ == null) { + if (data_ != null) { + data_ = + com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + dataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = null; + onChanged(); + } else { + data_ = null; + dataBuilder_ = null; + } + + return this; + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.Struct.Builder getDataBuilder() { + + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + public com.google.protobuf.StructOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : data_; + } + } + /** + *
+     * The content of the resource, in which some sensitive fields are removed
+     * and may not be present.
+     * 
+ * + * .google.protobuf.Struct data = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getData(), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + + private java.lang.Object location_ = ""; + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @return The bytes for location. + */ + public com.google.protobuf.ByteString + getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + *
+     * The location of the resource in Google Cloud, such as its zone and region.
+     * For more information, see https://cloud.google.com/about/locations/.
+     * 
+ * + * string location = 8; + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.Resource) + private static final com.google.cloud.asset.v1p7beta1.Resource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.Resource(); + } + + public static com.google.cloud.asset.v1p7beta1.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p7beta1.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java new file mode 100644 index 000000000000..18800a75a5f3 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java @@ -0,0 +1,199 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1p7beta1/assets.proto + +package com.google.cloud.asset.v1p7beta1; + +public interface ResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * The API version. Example: `v1`
+   * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The discoveryDocumentUri. + */ + java.lang.String getDiscoveryDocumentUri(); + /** + *
+   * The URL of the discovery document containing the resource's JSON schema.
+   * Example:
+   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_document_uri = 2; + * @return The bytes for discoveryDocumentUri. + */ + com.google.protobuf.ByteString + getDiscoveryDocumentUriBytes(); + + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The discoveryName. + */ + java.lang.String getDiscoveryName(); + /** + *
+   * The JSON schema name listed in the discovery document. Example:
+   * `Project`
+   * This value is unspecified for resources that do not have an API based on a
+   * discovery document, such as Cloud Bigtable.
+   * 
+ * + * string discovery_name = 3; + * @return The bytes for discoveryName. + */ + com.google.protobuf.ByteString + getDiscoveryNameBytes(); + + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The resourceUrl. + */ + java.lang.String getResourceUrl(); + /** + *
+   * The REST URL for accessing the resource. An HTTP `GET` request using this
+   * URL returns the resource itself. Example:
+   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
+   * This value is unspecified for resources without a REST API.
+   * 
+ * + * string resource_url = 4; + * @return The bytes for resourceUrl. + */ + com.google.protobuf.ByteString + getResourceUrlBytes(); + + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The parent. + */ + java.lang.String getParent(); + /** + *
+   * The full name of the immediate parent of this resource. See
+   * [Resource
+   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * For Google Cloud assets, this value is the parent resource defined in the
+   * [Cloud IAM policy
+   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
+   * Example:
+   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
+   * For third-party assets, this field may be set differently.
+   * 
+ * + * string parent = 5; + * @return The bytes for parent. + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return Whether the data field is set. + */ + boolean hasData(); + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + * @return The data. + */ + com.google.protobuf.Struct getData(); + /** + *
+   * The content of the resource, in which some sensitive fields are removed
+   * and may not be present.
+   * 
+ * + * .google.protobuf.Struct data = 6; + */ + com.google.protobuf.StructOrBuilder getDataOrBuilder(); + + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The location. + */ + java.lang.String getLocation(); + /** + *
+   * The location of the resource in Google Cloud, such as its zone and region.
+   * For more information, see https://cloud.google.com/about/locations/.
+   * 
+ * + * string location = 8; + * @return The bytes for location. + */ + com.google.protobuf.ByteString + getLocationBytes(); +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto new file mode 100644 index 000000000000..18fcff6c4009 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto @@ -0,0 +1,313 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p7beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/asset/v1p7beta1/assets.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1P7Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p7beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p7beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p7beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in + // the JSON format; for BigQuery table destinations, the output table stores + // the fields in asset proto 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. + rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p7beta1/{parent=*/*}:exportAssets" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1p7beta1.ExportAssetsResponse" + metadata_type: "google.cloud.asset.v1p7beta1.ExportAssetsRequest" + }; + } +} + +// Export asset request. +message ExportAssetsRequest { + // Required. The relative name of the root asset. This can only be an + // organization number (such as "organizations/123"), a project ID (such as + // "projects/my-project-id"), or a project number (such as "projects/12345"), + // or a folder number (such as "folders/123"). + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; + + // Timestamp to take an asset snapshot. This can only be set to a timestamp + // between the current time and the current time minus 35 days (inclusive). + // If not specified, the current time will be used. Due to delays in resource + // data collection and indexing, there is a volatile window during which + // running the same query may get different results. + google.protobuf.Timestamp read_time = 2; + + // A list of asset types to take a snapshot for. For example: + // "compute.googleapis.com/Disk". + // + // Regular expressions are also supported. For example: + // + // * "compute.googleapis.com.*" snapshots resources whose asset type starts + // with "compute.googleapis.com". + // * ".*Instance" snapshots resources whose asset type ends with "Instance". + // * ".*Instance.*" snapshots resources whose asset type contains "Instance". + // + // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + // regular expression syntax. If the regular expression does not match any + // supported asset type, an INVALID_ARGUMENT error will be returned. + // + // If specified, only matching assets will be returned, otherwise, it will + // snapshot all asset types. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name will be + // returned. + ContentType content_type = 4; + + // Required. Output configuration indicating where the results will be output + // to. + OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; + + // A list of relationship types to export, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]' + // specified relationships, or give errors if any relationship_types' + // supported types are not in [asset_types]. If not specified, it will + // snapshot all [asset_types]' supported relationships. An unspecified + // [asset_types] field means all supported asset_types. See [Introduction to + // Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + // supported asset types and relationship types. + repeated string relationship_types = 6; +} + +// The export asset response. This message is returned by the +// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] +// method in the returned +// [google.longrunning.Operation.response][google.longrunning.Operation.response] +// field. +message ExportAssetsResponse { + // Time the snapshot was taken. + google.protobuf.Timestamp read_time = 1; + + // Output configuration indicating where the results were output to. + OutputConfig output_config = 2; + + // Output result indicating where the assets were exported to. For example, a + // set of actual Google Cloud Storage object uris where the assets are + // exported to. The uris can be different from what [output_config] has + // specified, as the service will split the output object into multiple ones + // once it exceeds a single Google Cloud Storage object limit. + OutputResult output_result = 3; +} + +// Output configuration for export assets destination. +message OutputConfig { + // Asset export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + + // Destination on BigQuery. The output table stores the fields in asset + // proto as columns in BigQuery. + BigQueryDestination bigquery_destination = 2; + } +} + +// Output result of export assets. +message OutputResult { + // Asset export result. + oneof result { + // Export result on Cloud Storage. + GcsOutputResult gcs_result = 1; + } +} + +// A Cloud Storage output result. +message GcsOutputResult { + // List of uris of the Cloud Storage objects. Example: + // "gs://bucket_name/object_name". + repeated string uris = 1; +} + +// A Cloud Storage location. +message GcsDestination { + // Required. + oneof object_uri { + // The uri of the Cloud Storage object. It's the same uri that is used by + // gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + string uri = 1; + + // The uri prefix of all generated Cloud Storage objects. Example: + // "gs://bucket_name/object_name_prefix". Each object uri is in format: + // "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only + // contains assets for that type. starts from 0. Example: + // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is + // the first shard of output objects containing all + // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be + // returned if file with the same name "gs://bucket_name/object_name_prefix" + // already exists. + string uri_prefix = 2; + } +} + +// A BigQuery destination for exporting assets to. +message BigQueryDestination { + // Required. The BigQuery dataset in format + // "projects/projectId/datasets/datasetId", to which the snapshot result + // should be exported. If this dataset does not exist, the export call returns + // an INVALID_ARGUMENT error. + string dataset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery table to which the snapshot result should be + // written. If this table does not exist, a new table with the given name + // will be created. + string table = 2 [(google.api.field_behavior) = REQUIRED]; + + // If the destination table already exists and this flag is `TRUE`, the + // table will be overwritten by the contents of assets snapshot. If the flag + // is `FALSE` or unset and the destination table already exists, the export + // call returns an INVALID_ARGUMEMT error. + bool force = 3; + + // [partition_spec] determines whether to export to partitioned table(s) and + // how to partition the data. + // + // If [partition_spec] is unset or [partition_spec.partition_key] is unset or + // `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to + // non-partitioned table(s). [force] will decide whether to overwrite existing + // table(s). + // + // If [partition_spec] is specified. First, the snapshot results will be + // written to partitioned table(s) with two additional timestamp columns, + // readTime and requestTime, one of which will be the partition key. Secondly, + // in the case when any destination table already exists, it will first try to + // update existing table's schema as necessary by appending additional + // columns. Then, if [force] is `TRUE`, the corresponding partition will be + // overwritten by the snapshot results (data in different partitions will + // remain intact); if [force] is unset or `FALSE`, it will append the data. An + // error will be returned if the schema update or data appension fails. + PartitionSpec partition_spec = 4; + + // If this flag is `TRUE`, the snapshot results will be written to one or + // multiple tables, each of which contains results of one asset type. The + // [force] and [partition_spec] fields will apply to each of them. + // + // Field [table] will be concatenated with "_" and the asset type names (see + // https://cloud.google.com/asset-inventory/docs/supported-asset-types for + // supported asset types) to construct per-asset-type table names, in which + // all non-alphanumeric characters like "." and "/" will be substituted by + // "_". Example: if field [table] is "mytable" and snapshot results + // contain "storage.googleapis.com/Bucket" assets, the corresponding table + // name will be "mytable_storage_googleapis_com_Bucket". If any of these + // tables does not exist, a new table with the concatenated name will be + // created. + // + // When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of + // each table will include RECORD-type columns mapped to the nested fields in + // the Asset.resource.data field of that asset type (up to the 15 nested level + // BigQuery supports + // (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The + // fields in >15 nested levels will be stored in JSON format string as a child + // column of its parent RECORD column. + // + // If error occurs when exporting to any table, the whole export call will + // return an error but the export results that already succeed will persist. + // Example: if exporting to table_type_A succeeds when exporting to + // table_type_B fails during one export call, the results in table_type_A will + // persist and there will not be partial results persisting in a table. + bool separate_tables_per_asset_type = 5; +} + +// Specifications of BigQuery partitioned table as export destination. +message PartitionSpec { + // This enum is used to determine the partition key column when exporting + // assets to BigQuery partitioned table(s). Note that, if the partition key is + // a timestamp column, the actual partition is based on its date value + // (expressed in UTC. see details in + // https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables). + enum PartitionKey { + // Unspecified partition key. If used, it means using non-partitioned table. + PARTITION_KEY_UNSPECIFIED = 0; + + // The time when the snapshot is taken. If specified as partition key, the + // result table(s) is partitoned by the additional timestamp column, + // readTime. If [read_time] in ExportAssetsRequest is specified, the + // readTime column's value will be the same as it. Otherwise, its value will + // be the current time that is used to take the snapshot. + READ_TIME = 1; + + // The time when the request is received and started to be processed. If + // specified as partition key, the result table(s) is partitoned by the + // requestTime column, an additional timestamp column representing when the + // request was received. + REQUEST_TIME = 2; + } + + // The partition key for BigQuery partitioned table. + PartitionKey partition_key = 1; +} + +// Asset content type. +enum ContentType { + // Unspecified content type. + CONTENT_TYPE_UNSPECIFIED = 0; + + // Resource metadata. + RESOURCE = 1; + + // The actual IAM policy set on a resource. + IAM_POLICY = 2; + + // The Cloud Organization Policy set on an asset. + ORG_POLICY = 4; + + // The Cloud Access context manager Policy set on an asset. + ACCESS_POLICY = 5; + + // The related resources. + RELATIONSHIP = 7; +} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto new file mode 100644 index 000000000000..26ac6b2053e6 --- /dev/null +++ b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto @@ -0,0 +1,233 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.asset.v1p7beta1; + +import "google/api/resource.proto"; +import "google/cloud/orgpolicy/v1/orgpolicy.proto"; +import "google/cloud/osconfig/v1/inventory.proto"; +import "google/iam/v1/policy.proto"; +import "google/identity/accesscontextmanager/v1/access_level.proto"; +import "google/identity/accesscontextmanager/v1/access_policy.proto"; +import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.V1P7Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p7beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p7beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p7beta1"; + +// The Cloud Asset API. + +// An asset in Google Cloud. An asset can be any resource in the Google Cloud +// [resource +// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), +// a resource outside the Google Cloud resource hierarchy (such as Google +// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). +// See [Supported asset +// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) +// for more information. +message Asset { + option (google.api.resource) = { + type: "cloudasset.googleapis.com/Asset" + pattern: "*" + }; + + // The last update timestamp of an asset. update_time is updated when + // create/update/delete operation is performed. + google.protobuf.Timestamp update_time = 11; + + // The full name of the asset. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + // + // See [Resource + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string name = 1; + + // The type of the asset. Example: `compute.googleapis.com/Disk` + // + // See [Supported asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + string asset_type = 2; + + // A representation of the resource. + Resource resource = 3; + + // A representation of the Cloud IAM policy set on a Google Cloud resource. + // There can be a maximum of one Cloud IAM policy set on any given resource. + // In addition, Cloud IAM policies inherit their granted access scope from any + // policies set on parent resources in the resource hierarchy. Therefore, the + // effectively policy is the union of both the policy set on this resource + // and each policy set on all of the resource's ancestry resource levels in + // the hierarchy. See + // [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for + // more information. + google.iam.v1.Policy iam_policy = 4; + + // A representation of an [organization + // policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). + // There can be more than one organization policy with different constraints + // set on a given resource. + repeated google.cloud.orgpolicy.v1.Policy org_policy = 6; + + // A representation of an [access + // policy](https://cloud.google.com/access-context-manager/docs/overview#access-policies). + oneof access_context_policy { + // Please also refer to the [access policy user + // guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). + google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; + + // Please also refer to the [access level user + // guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). + google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; + + // Please also refer to the [service perimeter user + // guide](https://cloud.google.com/vpc-service-controls/docs/overview). + google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = + 9; + } + + // The related assets of the asset of one relationship type. + // One asset only represents one type of relationship. + RelatedAssets related_assets = 13; + + // The ancestry path of an asset in Google Cloud [resource + // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path starts + // with the closest ancestor in the hierarchy and ends at root. If the asset + // is a project, folder, or organization, the ancestry path starts from the + // asset itself. + // + // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + repeated string ancestors = 10; +} + +// A representation of a Google Cloud resource. +message Resource { + // The API version. Example: `v1` + string version = 1; + + // The URL of the discovery document containing the resource's JSON schema. + // Example: + // `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` + // + // This value is unspecified for resources that do not have an API based on a + // discovery document, such as Cloud Bigtable. + string discovery_document_uri = 2; + + // The JSON schema name listed in the discovery document. Example: + // `Project` + // + // This value is unspecified for resources that do not have an API based on a + // discovery document, such as Cloud Bigtable. + string discovery_name = 3; + + // The REST URL for accessing the resource. An HTTP `GET` request using this + // URL returns the resource itself. Example: + // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` + // + // This value is unspecified for resources without a REST API. + string resource_url = 4; + + // The full name of the immediate parent of this resource. See + // [Resource + // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + // + // For Google Cloud assets, this value is the parent resource defined in the + // [Cloud IAM policy + // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). + // Example: + // `//cloudresourcemanager.googleapis.com/projects/my_project_123` + // + // For third-party assets, this field may be set differently. + string parent = 5; + + // The content of the resource, in which some sensitive fields are removed + // and may not be present. + google.protobuf.Struct data = 6; + + // The location of the resource in Google Cloud, such as its zone and region. + // For more information, see https://cloud.google.com/about/locations/. + string location = 8; +} + +// The detailed related assets with the `relationship_type`. +message RelatedAssets { + // The detailed relation attributes. + RelationshipAttributes relationship_attributes = 1; + + // The peer resources of the relationship. + repeated RelatedAsset assets = 2; +} + +// The relationship attributes which include `type`, `source_resource_type`, +// `target_resource_type` and `action`. +message RelationshipAttributes { + // The unique identifier of the relationship type. Example: + // `INSTANCE_TO_INSTANCEGROUP` + string type = 4; + + // The source asset type. Example: `compute.googleapis.com/Instance` + string source_resource_type = 1; + + // The target asset type. Example: `compute.googleapis.com/Disk` + string target_resource_type = 2; + + // The detail of the relationship, e.g. `contains`, `attaches` + string action = 3; +} + +// An asset identify in Google Cloud which contains its name, type and +// ancestors. An asset can be any resource in the Google Cloud [resource +// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), +// a resource outside the Google Cloud resource hierarchy (such as Google +// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). +// See [Supported asset +// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) +// for more information. +message RelatedAsset { + // The full name of the asset. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + // + // See [Resource + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string asset = 1 [(google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Asset" + }]; + + // The type of the asset. Example: `compute.googleapis.com/Disk` + // + // See [Supported asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + string asset_type = 2; + + // The ancestors of an asset in Google Cloud [resource + // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path starts + // with the closest ancestor in the hierarchy and ends at root. + // + // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + repeated string ancestors = 3; +} From 8f530970c35d593c1dd1f32eacfd26e65a452d90 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 20 Sep 2022 14:41:07 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- java-asset/README.md | 61 +- .../v1/stub/AssetServiceStubSettings.java | 20 +- java-asset/renovate.json | 74 + .../samples/install-without-bom/pom.xml | 84 + java-asset/samples/pom.xml | 56 + java-asset/samples/snapshot/pom.xml | 83 + java-asset/samples/snippets/pom.xml | 47 + .../cloud/asset/v1/AssetServiceClient.java | 3059 ----- .../cloud/asset/v1/AssetServiceSettings.java | 468 - .../google/cloud/asset/v1/gapic_metadata.json | 78 - .../google/cloud/asset/v1/package-info.java | 48 - .../cloud/asset/v1/stub/AssetServiceStub.java | 208 - .../v1/stub/AssetServiceStubSettings.java | 1293 --- .../stub/GrpcAssetServiceCallableFactory.java | 113 - .../asset/v1/stub/GrpcAssetServiceStub.java | 870 -- .../HttpJsonAssetServiceCallableFactory.java | 105 - .../v1/stub/HttpJsonAssetServiceStub.java | 1359 --- .../v1/AssetServiceClientHttpJsonTest.java | 1769 --- .../asset/v1/AssetServiceClientTest.java | 1551 --- .../cloud/asset/v1/MockAssetService.java | 59 - .../cloud/asset/v1/MockAssetServiceImpl.java | 482 - .../cloud/asset/v1/AssetServiceGrpc.java | 2129 ---- .../AnalyzeIamPolicyLongrunningMetadata.java | 667 -- ...IamPolicyLongrunningMetadataOrBuilder.java | 36 - .../AnalyzeIamPolicyLongrunningRequest.java | 1165 -- ...eIamPolicyLongrunningRequestOrBuilder.java | 110 - .../AnalyzeIamPolicyLongrunningResponse.java | 431 - ...IamPolicyLongrunningResponseOrBuilder.java | 9 - .../asset/v1/AnalyzeIamPolicyRequest.java | 1249 --- .../v1/AnalyzeIamPolicyRequestOrBuilder.java | 131 - .../asset/v1/AnalyzeIamPolicyResponse.java | 3072 ----- .../v1/AnalyzeIamPolicyResponseOrBuilder.java | 104 - .../cloud/asset/v1/AnalyzeMoveRequest.java | 1092 -- .../asset/v1/AnalyzeMoveRequestOrBuilder.java | 84 - .../cloud/asset/v1/AnalyzeMoveResponse.java | 895 -- .../v1/AnalyzeMoveResponseOrBuilder.java | 58 - .../java/com/google/cloud/asset/v1/Asset.java | 4158 ------- .../google/cloud/asset/v1/AssetOrBuilder.java | 490 - .../com/google/cloud/asset/v1/AssetProto.java | 502 - .../cloud/asset/v1/AssetServiceProto.java | 1149 -- .../cloud/asset/v1/AttachedResource.java | 1114 -- .../asset/v1/AttachedResourceOrBuilder.java | 91 - .../v1/BatchGetAssetsHistoryRequest.java | 1780 --- ...BatchGetAssetsHistoryRequestOrBuilder.java | 256 - .../v1/BatchGetAssetsHistoryResponse.java | 872 -- ...atchGetAssetsHistoryResponseOrBuilder.java | 53 - .../BatchGetEffectiveIamPoliciesRequest.java | 945 -- ...tEffectiveIamPoliciesRequestOrBuilder.java | 100 - .../BatchGetEffectiveIamPoliciesResponse.java | 3530 ------ ...EffectiveIamPoliciesResponseOrBuilder.java | 78 - .../cloud/asset/v1/BigQueryDestination.java | 1494 --- .../v1/BigQueryDestinationOrBuilder.java | 182 - .../cloud/asset/v1/ConditionEvaluation.java | 719 -- .../v1/ConditionEvaluationOrBuilder.java | 28 - .../google/cloud/asset/v1/ContentType.java | 218 - .../cloud/asset/v1/CreateFeedRequest.java | 1068 -- .../asset/v1/CreateFeedRequestOrBuilder.java | 95 - .../asset/v1/CreateSavedQueryRequest.java | 1079 -- .../v1/CreateSavedQueryRequestOrBuilder.java | 99 - .../cloud/asset/v1/DeleteFeedRequest.java | 608 - .../asset/v1/DeleteFeedRequestOrBuilder.java | 35 - .../asset/v1/DeleteSavedQueryRequest.java | 623 -- .../v1/DeleteSavedQueryRequestOrBuilder.java | 37 - .../cloud/asset/v1/ExportAssetsRequest.java | 2121 ---- .../v1/ExportAssetsRequestOrBuilder.java | 315 - .../cloud/asset/v1/ExportAssetsResponse.java | 1193 -- .../v1/ExportAssetsResponseOrBuilder.java | 102 - .../java/com/google/cloud/asset/v1/Feed.java | 2446 ---- .../com/google/cloud/asset/v1/FeedName.java | 368 - .../google/cloud/asset/v1/FeedOrBuilder.java | 374 - .../cloud/asset/v1/FeedOutputConfig.java | 761 -- .../asset/v1/FeedOutputConfigOrBuilder.java | 38 - .../com/google/cloud/asset/v1/FolderName.java | 168 - .../google/cloud/asset/v1/GcsDestination.java | 1065 -- .../asset/v1/GcsDestinationOrBuilder.java | 114 - .../cloud/asset/v1/GcsOutputResult.java | 689 -- .../asset/v1/GcsOutputResultOrBuilder.java | 54 - .../google/cloud/asset/v1/GetFeedRequest.java | 616 -- .../asset/v1/GetFeedRequestOrBuilder.java | 35 - .../cloud/asset/v1/GetSavedQueryRequest.java | 616 -- .../v1/GetSavedQueryRequestOrBuilder.java | 35 - .../v1/IamPolicyAnalysisOutputConfig.java | 3147 ------ ...amPolicyAnalysisOutputConfigOrBuilder.java | 65 - .../asset/v1/IamPolicyAnalysisQuery.java | 6302 ----------- .../v1/IamPolicyAnalysisQueryOrBuilder.java | 180 - .../asset/v1/IamPolicyAnalysisResult.java | 9843 ----------------- .../v1/IamPolicyAnalysisResultOrBuilder.java | 168 - .../asset/v1/IamPolicyAnalysisState.java | 756 -- .../v1/IamPolicyAnalysisStateOrBuilder.java | 58 - .../cloud/asset/v1/IamPolicySearchResult.java | 3817 ------- .../v1/IamPolicySearchResultOrBuilder.java | 288 - .../cloud/asset/v1/ListAssetsRequest.java | 2144 ---- .../asset/v1/ListAssetsRequestOrBuilder.java | 322 - .../cloud/asset/v1/ListAssetsResponse.java | 1288 --- .../asset/v1/ListAssetsResponseOrBuilder.java | 104 - .../cloud/asset/v1/ListFeedsRequest.java | 609 - .../asset/v1/ListFeedsRequestOrBuilder.java | 33 - .../cloud/asset/v1/ListFeedsResponse.java | 864 -- .../asset/v1/ListFeedsResponseOrBuilder.java | 53 - .../asset/v1/ListSavedQueriesRequest.java | 1089 -- .../v1/ListSavedQueriesRequestOrBuilder.java | 102 - .../asset/v1/ListSavedQueriesResponse.java | 1045 -- .../v1/ListSavedQueriesResponseOrBuilder.java | 75 - .../google/cloud/asset/v1/MoveAnalysis.java | 1197 -- .../cloud/asset/v1/MoveAnalysisOrBuilder.java | 87 - .../cloud/asset/v1/MoveAnalysisResult.java | 1381 --- .../asset/v1/MoveAnalysisResultOrBuilder.java | 112 - .../com/google/cloud/asset/v1/MoveImpact.java | 595 - .../cloud/asset/v1/MoveImpactOrBuilder.java | 29 - .../cloud/asset/v1/OrganizationName.java | 168 - .../google/cloud/asset/v1/OutputConfig.java | 1036 -- .../cloud/asset/v1/OutputConfigOrBuilder.java | 68 - .../google/cloud/asset/v1/OutputResult.java | 761 -- .../cloud/asset/v1/OutputResultOrBuilder.java | 38 - .../google/cloud/asset/v1/PartitionSpec.java | 716 -- .../asset/v1/PartitionSpecOrBuilder.java | 28 - .../google/cloud/asset/v1/ProjectName.java | 168 - .../cloud/asset/v1/PubsubDestination.java | 602 - .../asset/v1/PubsubDestinationOrBuilder.java | 31 - .../asset/v1/QueryAssetsOutputConfig.java | 1741 --- .../v1/QueryAssetsOutputConfigOrBuilder.java | 36 - .../cloud/asset/v1/QueryAssetsRequest.java | 2706 ----- .../asset/v1/QueryAssetsRequestOrBuilder.java | 306 - .../cloud/asset/v1/QueryAssetsResponse.java | 1562 --- .../v1/QueryAssetsResponseOrBuilder.java | 129 - .../google/cloud/asset/v1/QueryResult.java | 1361 --- .../cloud/asset/v1/QueryResultOrBuilder.java | 110 - .../google/cloud/asset/v1/RelatedAsset.java | 1296 --- .../cloud/asset/v1/RelatedAssetOrBuilder.java | 142 - .../google/cloud/asset/v1/RelatedAssets.java | 1114 -- .../asset/v1/RelatedAssetsOrBuilder.java | 80 - .../cloud/asset/v1/RelatedResource.java | 768 -- .../asset/v1/RelatedResourceOrBuilder.java | 51 - .../cloud/asset/v1/RelatedResources.java | 872 -- .../asset/v1/RelatedResourcesOrBuilder.java | 53 - .../asset/v1/RelationshipAttributes.java | 1108 -- .../v1/RelationshipAttributesOrBuilder.java | 91 - .../com/google/cloud/asset/v1/Resource.java | 1813 --- .../cloud/asset/v1/ResourceOrBuilder.java | 199 - .../cloud/asset/v1/ResourceSearchResult.java | 7406 ------------- .../v1/ResourceSearchResultOrBuilder.java | 1209 -- .../com/google/cloud/asset/v1/SavedQuery.java | 3055 ----- .../google/cloud/asset/v1/SavedQueryName.java | 378 - .../cloud/asset/v1/SavedQueryOrBuilder.java | 246 - .../asset/v1/SearchAllIamPoliciesRequest.java | 2025 ---- .../SearchAllIamPoliciesRequestOrBuilder.java | 316 - .../v1/SearchAllIamPoliciesResponse.java | 1075 -- ...SearchAllIamPoliciesResponseOrBuilder.java | 82 - .../asset/v1/SearchAllResourcesRequest.java | 2658 ----- .../SearchAllResourcesRequestOrBuilder.java | 444 - .../asset/v1/SearchAllResourcesResponse.java | 1075 -- .../SearchAllResourcesResponseOrBuilder.java | 82 - .../cloud/asset/v1/TableFieldSchema.java | 1512 --- .../asset/v1/TableFieldSchemaOrBuilder.java | 152 - .../google/cloud/asset/v1/TableSchema.java | 872 -- .../cloud/asset/v1/TableSchemaOrBuilder.java | 53 - .../google/cloud/asset/v1/TemporalAsset.java | 1535 --- .../asset/v1/TemporalAssetOrBuilder.java | 122 - .../com/google/cloud/asset/v1/TimeWindow.java | 913 -- .../cloud/asset/v1/TimeWindowOrBuilder.java | 66 - .../cloud/asset/v1/UpdateFeedRequest.java | 973 -- .../asset/v1/UpdateFeedRequestOrBuilder.java | 81 - .../asset/v1/UpdateSavedQueryRequest.java | 961 -- .../v1/UpdateSavedQueryRequestOrBuilder.java | 78 - .../cloud/asset/v1/VersionedResource.java | 969 -- .../asset/v1/VersionedResourceOrBuilder.java | 91 - .../google/cloud/asset/v1/asset_service.proto | 2072 ---- .../proto/google/cloud/asset/v1/assets.proto | 919 -- .../AsyncAnalyzeIamPolicy.java | 53 - .../SyncAnalyzeIamPolicy.java | 49 - .../AsyncAnalyzeIamPolicyLongrunning.java | 53 - .../AsyncAnalyzeIamPolicyLongrunningLRO.java | 55 - .../SyncAnalyzeIamPolicyLongrunning.java | 50 - .../analyzemove/AsyncAnalyzeMove.java | 50 - .../analyzemove/SyncAnalyzeMove.java | 46 - .../AsyncBatchGetAssetsHistory.java | 57 - .../SyncBatchGetAssetsHistory.java | 53 - .../AsyncBatchGetEffectiveIamPolicies.java | 52 - .../SyncBatchGetEffectiveIamPolicies.java | 49 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../createfeed/AsyncCreateFeed.java | 50 - .../createfeed/SyncCreateFeed.java | 47 - .../createfeed/SyncCreateFeedString.java | 41 - .../AsyncCreateSavedQuery.java | 52 - .../SyncCreateSavedQuery.java | 48 - ...eSavedQueryFoldernameSavedqueryString.java | 44 - ...QueryOrganizationnameSavedqueryString.java | 44 - ...SavedQueryProjectnameSavedqueryString.java | 44 - ...reateSavedQueryStringSavedqueryString.java | 44 - .../deletefeed/AsyncDeleteFeed.java | 49 - .../deletefeed/SyncDeleteFeed.java | 46 - .../deletefeed/SyncDeleteFeedFeedname.java | 42 - .../deletefeed/SyncDeleteFeedString.java | 42 - .../AsyncDeleteSavedQuery.java | 50 - .../SyncDeleteSavedQuery.java | 47 - .../SyncDeleteSavedQuerySavedqueryname.java | 42 - .../SyncDeleteSavedQueryString.java | 42 - .../exportassets/AsyncExportAssets.java | 58 - .../exportassets/AsyncExportAssetsLRO.java | 59 - .../exportassets/SyncExportAssets.java | 55 - .../getfeed/AsyncGetFeed.java | 49 - .../getfeed/SyncGetFeed.java | 46 - .../getfeed/SyncGetFeedFeedname.java | 42 - .../getfeed/SyncGetFeedString.java | 42 - .../getsavedquery/AsyncGetSavedQuery.java | 50 - .../getsavedquery/SyncGetSavedQuery.java | 47 - .../SyncGetSavedQuerySavedqueryname.java | 42 - .../SyncGetSavedQueryString.java | 42 - .../listassets/AsyncListAssets.java | 60 - .../listassets/AsyncListAssetsPaged.java | 68 - .../listassets/SyncListAssets.java | 57 - .../SyncListAssetsResourcename.java | 45 - .../listassets/SyncListAssetsString.java | 44 - .../listfeeds/AsyncListFeeds.java | 47 - .../listfeeds/SyncListFeeds.java | 43 - .../listfeeds/SyncListFeedsString.java | 41 - .../AsyncListSavedQueries.java | 55 - .../AsyncListSavedQueriesPaged.java | 63 - .../SyncListSavedQueries.java | 51 - .../SyncListSavedQueriesFoldername.java | 44 - .../SyncListSavedQueriesOrganizationname.java | 44 - .../SyncListSavedQueriesProjectname.java | 44 - .../SyncListSavedQueriesString.java | 44 - .../queryassets/AsyncQueryAssets.java | 56 - .../queryassets/SyncQueryAssets.java | 52 - .../AsyncSearchAllIamPolicies.java | 57 - .../AsyncSearchAllIamPoliciesPaged.java | 65 - .../SyncSearchAllIamPolicies.java | 54 - .../SyncSearchAllIamPoliciesStringString.java | 45 - .../AsyncSearchAllResources.java | 59 - .../AsyncSearchAllResourcesPaged.java | 67 - .../SyncSearchAllResources.java | 56 - ...rchAllResourcesStringStringListstring.java | 48 - .../updatefeed/AsyncUpdateFeed.java | 50 - .../updatefeed/SyncUpdateFeed.java | 47 - .../updatefeed/SyncUpdateFeedFeed.java | 41 - .../AsyncUpdateSavedQuery.java | 51 - .../SyncUpdateSavedQuery.java | 47 - ...ncUpdateSavedQuerySavedqueryFieldmask.java | 43 - .../SyncBatchGetAssetsHistory.java | 48 - .../SyncBatchGetAssetsHistory.java | 49 - .../asset/v1p1beta1/AssetServiceClient.java | 735 -- .../asset/v1p1beta1/AssetServiceSettings.java | 229 - .../cloud/asset/v1p1beta1/gapic_metadata.json | 24 - .../cloud/asset/v1p1beta1/package-info.java | 46 - .../v1p1beta1/stub/AssetServiceStub.java | 63 - .../stub/AssetServiceStubSettings.java | 518 - .../stub/GrpcAssetServiceCallableFactory.java | 115 - .../v1p1beta1/stub/GrpcAssetServiceStub.java | 235 - .../HttpJsonAssetServiceCallableFactory.java | 105 - .../stub/HttpJsonAssetServiceStub.java | 292 - .../AssetServiceClientHttpJsonTest.java | 186 - .../v1p1beta1/AssetServiceClientTest.java | 181 - .../asset/v1p1beta1/MockAssetService.java | 59 - .../asset/v1p1beta1/MockAssetServiceImpl.java | 104 - .../asset/v1p1beta1/AssetServiceGrpc.java | 429 - .../cloud/asset/v1p1beta1/AssetProto.java | 129 - .../asset/v1p1beta1/AssetServiceProto.java | 132 - .../v1p1beta1/IamPolicySearchResult.java | 2204 ---- .../IamPolicySearchResultOrBuilder.java | 127 - .../cloud/asset/v1p1beta1/Permissions.java | 676 -- .../asset/v1p1beta1/PermissionsOrBuilder.java | 50 - .../SearchAllIamPoliciesRequest.java | 1096 -- .../SearchAllIamPoliciesRequestOrBuilder.java | 104 - .../SearchAllIamPoliciesResponse.java | 1075 -- ...SearchAllIamPoliciesResponseOrBuilder.java | 82 - .../v1p1beta1/SearchAllResourcesRequest.java | 1522 --- .../SearchAllResourcesRequestOrBuilder.java | 169 - .../v1p1beta1/SearchAllResourcesResponse.java | 1052 -- .../SearchAllResourcesResponseOrBuilder.java | 77 - .../v1p1beta1/StandardResourceMetadata.java | 2389 ---- .../StandardResourceMetadataOrBuilder.java | 313 - .../cloud/asset/v1p1beta1/asset_service.proto | 149 - .../google/cloud/asset/v1p1beta1/assets.proto | 113 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../AsyncSearchAllIamPolicies.java | 54 - .../AsyncSearchAllIamPoliciesPaged.java | 62 - .../SyncSearchAllIamPolicies.java | 51 - .../SyncSearchAllIamPoliciesStringString.java | 45 - .../AsyncSearchAllResources.java | 57 - .../AsyncSearchAllResourcesPaged.java | 65 - .../SyncSearchAllResources.java | 54 - ...rchAllResourcesStringStringListstring.java | 48 - .../SyncSearchAllResources.java | 45 - .../SyncSearchAllResources.java | 46 - .../asset/v1p2beta1/AssetServiceClient.java | 677 -- .../asset/v1p2beta1/AssetServiceSettings.java | 244 - .../cloud/asset/v1p2beta1/gapic_metadata.json | 33 - .../cloud/asset/v1p2beta1/package-info.java | 41 - .../v1p2beta1/stub/AssetServiceStub.java | 64 - .../stub/AssetServiceStubSettings.java | 431 - .../stub/GrpcAssetServiceCallableFactory.java | 115 - .../v1p2beta1/stub/GrpcAssetServiceStub.java | 276 - .../HttpJsonAssetServiceCallableFactory.java | 105 - .../stub/HttpJsonAssetServiceStub.java | 391 - .../AssetServiceClientHttpJsonTest.java | 403 - .../v1p2beta1/AssetServiceClientTest.java | 351 - .../asset/v1p2beta1/MockAssetService.java | 59 - .../asset/v1p2beta1/MockAssetServiceImpl.java | 162 - .../asset/v1p2beta1/AssetServiceGrpc.java | 651 -- .../google/cloud/asset/v1p2beta1/Asset.java | 1574 --- .../cloud/asset/v1p2beta1/AssetOrBuilder.java | 171 - .../cloud/asset/v1p2beta1/AssetProto.java | 108 - .../asset/v1p2beta1/AssetServiceProto.java | 245 - .../cloud/asset/v1p2beta1/ContentType.java | 150 - .../asset/v1p2beta1/CreateFeedRequest.java | 1080 -- .../v1p2beta1/CreateFeedRequestOrBuilder.java | 98 - .../asset/v1p2beta1/DeleteFeedRequest.java | 608 - .../v1p2beta1/DeleteFeedRequestOrBuilder.java | 35 - .../google/cloud/asset/v1p2beta1/Feed.java | 1677 --- .../cloud/asset/v1p2beta1/FeedName.java | 368 - .../cloud/asset/v1p2beta1/FeedOrBuilder.java | 224 - .../asset/v1p2beta1/FeedOutputConfig.java | 761 -- .../v1p2beta1/FeedOutputConfigOrBuilder.java | 38 - .../cloud/asset/v1p2beta1/GcsDestination.java | 750 -- .../v1p2beta1/GcsDestinationOrBuilder.java | 52 - .../cloud/asset/v1p2beta1/GetFeedRequest.java | 616 -- .../v1p2beta1/GetFeedRequestOrBuilder.java | 35 - .../asset/v1p2beta1/ListFeedsRequest.java | 609 - .../v1p2beta1/ListFeedsRequestOrBuilder.java | 33 - .../asset/v1p2beta1/ListFeedsResponse.java | 864 -- .../v1p2beta1/ListFeedsResponseOrBuilder.java | 53 - .../cloud/asset/v1p2beta1/OutputConfig.java | 761 -- .../v1p2beta1/OutputConfigOrBuilder.java | 38 - .../asset/v1p2beta1/PubsubDestination.java | 602 - .../v1p2beta1/PubsubDestinationOrBuilder.java | 31 - .../cloud/asset/v1p2beta1/Resource.java | 1633 --- .../asset/v1p2beta1/ResourceOrBuilder.java | 175 - .../cloud/asset/v1p2beta1/TemporalAsset.java | 984 -- .../v1p2beta1/TemporalAssetOrBuilder.java | 73 - .../cloud/asset/v1p2beta1/TimeWindow.java | 913 -- .../asset/v1p2beta1/TimeWindowOrBuilder.java | 66 - .../asset/v1p2beta1/UpdateFeedRequest.java | 973 -- .../v1p2beta1/UpdateFeedRequestOrBuilder.java | 81 - .../cloud/asset/v1p2beta1/asset_service.proto | 259 - .../google/cloud/asset/v1p2beta1/assets.proto | 124 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../createfeed/AsyncCreateFeed.java | 50 - .../createfeed/SyncCreateFeed.java | 47 - .../createfeed/SyncCreateFeedString.java | 41 - .../deletefeed/AsyncDeleteFeed.java | 49 - .../deletefeed/SyncDeleteFeed.java | 46 - .../deletefeed/SyncDeleteFeedFeedname.java | 42 - .../deletefeed/SyncDeleteFeedString.java | 42 - .../getfeed/AsyncGetFeed.java | 49 - .../getfeed/SyncGetFeed.java | 46 - .../getfeed/SyncGetFeedFeedname.java | 42 - .../getfeed/SyncGetFeedString.java | 42 - .../listfeeds/AsyncListFeeds.java | 47 - .../listfeeds/SyncListFeeds.java | 43 - .../listfeeds/SyncListFeedsString.java | 41 - .../updatefeed/AsyncUpdateFeed.java | 50 - .../updatefeed/SyncUpdateFeed.java | 47 - .../updatefeed/SyncUpdateFeedFeed.java | 41 - .../createfeed/SyncCreateFeed.java | 45 - .../createfeed/SyncCreateFeed.java | 46 - .../asset/v1p5beta1/AssetServiceClient.java | 400 - .../asset/v1p5beta1/AssetServiceSettings.java | 208 - .../cloud/asset/v1p5beta1/gapic_metadata.json | 21 - .../cloud/asset/v1p5beta1/package-info.java | 51 - .../v1p5beta1/stub/AssetServiceStub.java | 48 - .../stub/AssetServiceStubSettings.java | 393 - .../stub/GrpcAssetServiceCallableFactory.java | 115 - .../v1p5beta1/stub/GrpcAssetServiceStub.java | 173 - .../HttpJsonAssetServiceCallableFactory.java | 105 - .../stub/HttpJsonAssetServiceStub.java | 209 - .../AssetServiceClientHttpJsonTest.java | 145 - .../v1p5beta1/AssetServiceClientTest.java | 147 - .../asset/v1p5beta1/MockAssetService.java | 59 - .../asset/v1p5beta1/MockAssetServiceImpl.java | 81 - .../asset/v1p5beta1/AssetServiceGrpc.java | 307 - .../google/cloud/asset/v1p5beta1/Asset.java | 2774 ----- .../cloud/asset/v1p5beta1/AssetOrBuilder.java | 272 - .../cloud/asset/v1p5beta1/AssetProto.java | 107 - .../asset/v1p5beta1/AssetServiceProto.java | 104 - .../cloud/asset/v1p5beta1/ContentType.java | 184 - .../asset/v1p5beta1/ListAssetsRequest.java | 1594 --- .../v1p5beta1/ListAssetsRequestOrBuilder.java | 187 - .../asset/v1p5beta1/ListAssetsResponse.java | 1281 --- .../ListAssetsResponseOrBuilder.java | 102 - .../cloud/asset/v1p5beta1/Resource.java | 1633 --- .../asset/v1p5beta1/ResourceOrBuilder.java | 175 - .../cloud/asset/v1p5beta1/asset_service.proto | 112 - .../google/cloud/asset/v1p5beta1/assets.proto | 124 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 43 - .../create/SyncCreateSetEndpoint.java | 41 - .../listassets/AsyncListAssets.java | 58 - .../listassets/AsyncListAssetsPaged.java | 66 - .../listassets/SyncListAssets.java | 55 - .../listassets/SyncListAssets.java | 45 - .../listassets/SyncListAssets.java | 46 - .../asset/v1p7beta1/AssetServiceClient.java | 329 - .../asset/v1p7beta1/AssetServiceSettings.java | 199 - .../cloud/asset/v1p7beta1/gapic_metadata.json | 21 - .../cloud/asset/v1p7beta1/package-info.java | 49 - .../v1p7beta1/stub/AssetServiceStub.java | 54 - .../stub/AssetServiceStubSettings.java | 331 - .../stub/GrpcAssetServiceCallableFactory.java | 115 - .../v1p7beta1/stub/GrpcAssetServiceStub.java | 178 - .../v1p7beta1/AssetServiceClientTest.java | 153 - .../asset/v1p7beta1/MockAssetService.java | 59 - .../asset/v1p7beta1/MockAssetServiceImpl.java | 82 - .../asset/v1p7beta1/AssetServiceGrpc.java | 343 - .../google/cloud/asset/v1p7beta1/Asset.java | 3616 ------ .../cloud/asset/v1p7beta1/AssetOrBuilder.java | 417 - .../cloud/asset/v1p7beta1/AssetProto.java | 160 - .../asset/v1p7beta1/AssetServiceProto.java | 203 - .../asset/v1p7beta1/BigQueryDestination.java | 1466 --- .../BigQueryDestinationOrBuilder.java | 174 - .../cloud/asset/v1p7beta1/ContentType.java | 201 - .../asset/v1p7beta1/ExportAssetsRequest.java | 2056 ---- .../ExportAssetsRequestOrBuilder.java | 295 - .../asset/v1p7beta1/ExportAssetsResponse.java | 1193 -- .../ExportAssetsResponseOrBuilder.java | 102 - .../cloud/asset/v1p7beta1/GcsDestination.java | 1038 -- .../v1p7beta1/GcsDestinationOrBuilder.java | 105 - .../asset/v1p7beta1/GcsOutputResult.java | 689 -- .../v1p7beta1/GcsOutputResultOrBuilder.java | 54 - .../cloud/asset/v1p7beta1/OutputConfig.java | 1036 -- .../v1p7beta1/OutputConfigOrBuilder.java | 68 - .../cloud/asset/v1p7beta1/OutputResult.java | 761 -- .../v1p7beta1/OutputResultOrBuilder.java | 38 - .../cloud/asset/v1p7beta1/PartitionSpec.java | 716 -- .../v1p7beta1/PartitionSpecOrBuilder.java | 28 - .../cloud/asset/v1p7beta1/RelatedAsset.java | 1123 -- .../v1p7beta1/RelatedAssetOrBuilder.java | 120 - .../cloud/asset/v1p7beta1/RelatedAssets.java | 1108 -- .../v1p7beta1/RelatedAssetsOrBuilder.java | 80 - .../v1p7beta1/RelationshipAttributes.java | 1102 -- .../RelationshipAttributesOrBuilder.java | 91 - .../cloud/asset/v1p7beta1/Resource.java | 1813 --- .../asset/v1p7beta1/ResourceOrBuilder.java | 199 - .../cloud/asset/v1p7beta1/asset_service.proto | 313 - .../google/cloud/asset/v1p7beta1/assets.proto | 233 - 441 files changed, 358 insertions(+), 216591 deletions(-) create mode 100644 java-asset/renovate.json create mode 100644 java-asset/samples/install-without-bom/pom.xml create mode 100644 java-asset/samples/pom.xml create mode 100644 java-asset/samples/snapshot/pom.xml create mode 100644 java-asset/samples/snippets/pom.xml delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java delete mode 100644 owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java delete mode 100644 owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto delete mode 100644 owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java delete mode 100644 owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java delete mode 100644 owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java delete mode 100644 owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto delete mode 100644 owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto diff --git a/java-asset/README.md b/java-asset/README.md index a7970db87431..1fd0c9c1caa1 100644 --- a/java-asset/README.md +++ b/java-asset/README.md @@ -11,59 +11,28 @@ Java idiomatic client for [Cloud Asset Inventory][product-docs]. ## Quickstart -If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: -```xml - - - - com.google.cloud - libraries-bom - 26.1.1 - pom - import - - - - - - - com.google.cloud - google-cloud-asset - - - -``` - -If you are using Maven without BOM, add this to your dependencies: +If you are using Maven, add this to your pom.xml file: ```xml com.google.cloud google-cloud-asset - 3.5.0 + 3.6.0 - ``` -If you are using Gradle 5.x or later, add this to your dependencies: - -```Groovy -implementation platform('com.google.cloud:libraries-bom:26.1.1') - -implementation 'com.google.cloud:google-cloud-asset' -``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-asset:3.5.0' +implementation 'com.google.cloud:google-cloud-asset:3.6.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "3.5.0" +libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "3.6.0" ``` ## Authentication @@ -101,28 +70,6 @@ use this Cloud Asset Inventory Client Library. -## Samples - -Samples are in the [`samples/`](https://github.com/googleapis/java-asset/tree/main/samples) directory. - -| Sample | Source Code | Try it | -| --------------------------- | --------------------------------- | ------ | -| Analyze Iam Policy Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyExample.java) | -| Analyze Iam Policy Longrunning Bigquery Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningBigqueryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningBigqueryExample.java) | -| Analyze Iam Policy Longrunning Gcs Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningGcsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/AnalyzeIamPolicyLongrunningGcsExample.java) | -| Batch Get Assets History Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) | -| Create Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) | -| Delete Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) | -| Export Assets Bigquery Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) | -| Export Assets Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) | -| Get Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) | -| List Assets Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ListAssetsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ListAssetsExample.java) | -| List Feeds Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) | -| Search All Iam Policies Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) | -| Search All Resources Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) | -| Update Feed Example | [source code](https://github.com/googleapis/java-asset/blob/main/samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) | - - ## Troubleshooting diff --git a/java-asset/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/java-asset/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java index d469596b9268..c0a4ba15d1ef 100644 --- a/java-asset/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ b/java-asset/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -1050,28 +1050,28 @@ private static Builder initDefaults(Builder builder) { builder .createSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .getSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .listSavedQueriesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .updateSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder .deleteSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); builder .batchGetEffectiveIamPoliciesSettings() diff --git a/java-asset/renovate.json b/java-asset/renovate.json new file mode 100644 index 000000000000..b69db9d19fe6 --- /dev/null +++ b/java-asset/renovate.json @@ -0,0 +1,74 @@ +{ + "extends": [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" + ], + "packageRules": [ + { + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" + }, + { + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null + }, + { + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-asset", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis", + "^com.google.cloud:google-cloud-conformance-tests" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "dependencyDashboard": true +} diff --git a/java-asset/samples/install-without-bom/pom.xml b/java-asset/samples/install-without-bom/pom.xml new file mode 100644 index 000000000000..5bdc7a82c2f8 --- /dev/null +++ b/java-asset/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + -install-without-bom + jar + Google Cloud Asset Inventory Install Without Bom + https://github.com/googleapis/java-asset + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-asset + 3.6.0 + + + + + junit + junit + 4.13.2 + test + + + com.google.truth + truth + 1.1.3 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/java-asset/samples/pom.xml b/java-asset/samples/pom.xml new file mode 100644 index 000000000000..0d93aa4e48a4 --- /dev/null +++ b/java-asset/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud--samples + 0.0.1-SNAPSHOT + pom + Google Cloud Asset Inventory Samples Parent + https://github.com/googleapis/java-asset + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + + true + + + + + diff --git a/java-asset/samples/snapshot/pom.xml b/java-asset/samples/snapshot/pom.xml new file mode 100644 index 000000000000..38568ea4bd87 --- /dev/null +++ b/java-asset/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + -snapshot + jar + Google Cloud Asset Inventory Snapshot Samples + https://github.com/googleapis/java-asset + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-asset + 3.6.0 + + + + + junit + junit + 4.13.2 + test + + + com.google.truth + truth + 1.1.3 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/java-asset/samples/snippets/pom.xml b/java-asset/samples/snippets/pom.xml new file mode 100644 index 000000000000..dc5e255cb3cd --- /dev/null +++ b/java-asset/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + -snippets + jar + Google Cloud Asset Inventory Snippets + https://github.com/googleapis/java-asset + + + + com.google.cloud.samples + shared-configuration + 1.2.0 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-asset + 3.6.0 + + + + junit + junit + 4.13.2 + test + + + com.google.truth + truth + 1.1.3 + test + + + diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java deleted file mode 100644 index 8ce05d3ed7e7..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java +++ /dev/null @@ -1,3059 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.api.resourcenames.ResourceName; -import com.google.cloud.asset.v1.stub.AssetServiceStub; -import com.google.cloud.asset.v1.stub.AssetServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Asset service definition. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   BatchGetAssetsHistoryRequest request =
- *       BatchGetAssetsHistoryRequest.newBuilder()
- *           .setParent(FolderName.of("[FOLDER]").toString())
- *           .addAllAssetNames(new ArrayList())
- *           .setContentType(ContentType.forNumber(0))
- *           .setReadTimeWindow(TimeWindow.newBuilder().build())
- *           .addAllRelationshipTypes(new ArrayList())
- *           .build();
- *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
- * }
- * }
- * - *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of AssetServiceSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class AssetServiceClient implements BackgroundResource { - private final AssetServiceSettings settings; - private final AssetServiceStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of AssetServiceClient with default settings. */ - public static final AssetServiceClient create() throws IOException { - return create(AssetServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { - return new AssetServiceClient(settings); - } - - /** - * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(AssetServiceSettings). - */ - public static final AssetServiceClient create(AssetServiceStub stub) { - return new AssetServiceClient(stub); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected AssetServiceClient(AssetServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected AssetServiceClient(AssetServiceStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final AssetServiceSettings getSettings() { - return settings; - } - - public AssetServiceStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ExportAssetsRequest request =
-   *       ExportAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture exportAssetsAsync( - ExportAssetsRequest request) { - return exportAssetsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ExportAssetsRequest request =
-   *       ExportAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   OperationFuture future =
-   *       assetServiceClient.exportAssetsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   ExportAssetsResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - exportAssetsOperationCallable() { - return stub.exportAssetsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ExportAssetsRequest request =
-   *       ExportAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.exportAssetsCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable exportAssetsCallable() { - return stub.exportAssetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ResourceName parent = FolderName.of("[FOLDER]");
-   *   for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of the organization, folder, or project the assets belong to. - * Format: "organizations/[organization-number]" (such as "organizations/123"), - * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" - * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAssetsPagedResponse listAssets(ResourceName parent) { - ListAssetsRequest request = - ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); - return listAssets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
-   *   for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of the organization, folder, or project the assets belong to. - * Format: "organizations/[organization-number]" (such as "organizations/123"), - * "projects/[project-id]" (such as "projects/my-project-id"), "projects/[project-number]" - * (such as "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAssetsPagedResponse listAssets(String parent) { - ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); - return listAssets(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { - return listAssetsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Asset element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listAssetsPagedCallable() { - return stub.listAssetsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   while (true) {
-   *     ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request);
-   *     for (Asset element : response.getAssetsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listAssetsCallable() { - return stub.listAssetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   BatchGetAssetsHistoryRequest request =
-   *       BatchGetAssetsHistoryRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .addAllAssetNames(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setReadTimeWindow(TimeWindow.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( - BatchGetAssetsHistoryRequest request) { - return batchGetAssetsHistoryCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   BatchGetAssetsHistoryRequest request =
-   *       BatchGetAssetsHistoryRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .addAllAssetNames(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setReadTimeWindow(TimeWindow.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request);
-   *   // Do something.
-   *   BatchGetAssetsHistoryResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - batchGetAssetsHistoryCallable() { - return stub.batchGetAssetsHistoryCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a feed in a parent project/folder/organization to listen to its asset updates. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "parent-995424086";
-   *   Feed response = assetServiceClient.createFeed(parent);
-   * }
-   * }
- * - * @param parent Required. The name of the project/folder/organization where this feed should be - * created in. It can only be an organization number (such as "organizations/123"), a folder - * number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a - * project number (such as "projects/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed createFeed(String parent) { - CreateFeedRequest request = CreateFeedRequest.newBuilder().setParent(parent).build(); - return createFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a feed in a parent project/folder/organization to listen to its asset updates. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   CreateFeedRequest request =
-   *       CreateFeedRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setFeedId("feedId-1278410919")
-   *           .setFeed(Feed.newBuilder().build())
-   *           .build();
-   *   Feed response = assetServiceClient.createFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed createFeed(CreateFeedRequest request) { - return createFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a feed in a parent project/folder/organization to listen to its asset updates. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   CreateFeedRequest request =
-   *       CreateFeedRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setFeedId("feedId-1278410919")
-   *           .setFeed(Feed.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request);
-   *   // Do something.
-   *   Feed response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createFeedCallable() { - return stub.createFeedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   Feed response = assetServiceClient.getFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the Feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed getFeed(FeedName name) { - GetFeedRequest request = - GetFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
-   *   Feed response = assetServiceClient.getFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the Feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed getFeed(String name) { - GetFeedRequest request = GetFeedRequest.newBuilder().setName(name).build(); - return getFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   GetFeedRequest request =
-   *       GetFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   Feed response = assetServiceClient.getFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed getFeed(GetFeedRequest request) { - return getFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   GetFeedRequest request =
-   *       GetFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request);
-   *   // Do something.
-   *   Feed response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getFeedCallable() { - return stub.getFeedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all asset feeds in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "parent-995424086";
-   *   ListFeedsResponse response = assetServiceClient.listFeeds(parent);
-   * }
-   * }
- * - * @param parent Required. The parent project/folder/organization whose feeds are to be listed. It - * can only be using project/folder/organization number (such as "folders/12345")", or a - * project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListFeedsResponse listFeeds(String parent) { - ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent(parent).build(); - return listFeeds(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all asset feeds in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListFeedsRequest request =
-   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
-   *   ListFeedsResponse response = assetServiceClient.listFeeds(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListFeedsResponse listFeeds(ListFeedsRequest request) { - return listFeedsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all asset feeds in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListFeedsRequest request =
-   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
-   *   ApiFuture future =
-   *       assetServiceClient.listFeedsCallable().futureCall(request);
-   *   // Do something.
-   *   ListFeedsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable listFeedsCallable() { - return stub.listFeedsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an asset feed configuration. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   Feed feed = Feed.newBuilder().build();
-   *   Feed response = assetServiceClient.updateFeed(feed);
-   * }
-   * }
- * - * @param feed Required. The new values of feed details. It must match an existing feed and the - * field `name` must be in the format of: projects/project_number/feeds/feed_id or - * folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed updateFeed(Feed feed) { - UpdateFeedRequest request = UpdateFeedRequest.newBuilder().setFeed(feed).build(); - return updateFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an asset feed configuration. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   UpdateFeedRequest request =
-   *       UpdateFeedRequest.newBuilder()
-   *           .setFeed(Feed.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Feed response = assetServiceClient.updateFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed updateFeed(UpdateFeedRequest request) { - return updateFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an asset feed configuration. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   UpdateFeedRequest request =
-   *       UpdateFeedRequest.newBuilder()
-   *           .setFeed(Feed.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request);
-   *   // Do something.
-   *   Feed response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateFeedCallable() { - return stub.updateFeedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   assetServiceClient.deleteFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(FeedName name) { - DeleteFeedRequest request = - DeleteFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
-   *   assetServiceClient.deleteFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(String name) { - DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); - deleteFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   DeleteFeedRequest request =
-   *       DeleteFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   assetServiceClient.deleteFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(DeleteFeedRequest request) { - deleteFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   DeleteFeedRequest request =
-   *       DeleteFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteFeedCallable() { - return stub.deleteFeedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String scope = "scope109264468";
-   *   String query = "query107944136";
-   *   List assetTypes = new ArrayList<>();
-   *   for (ResourceSearchResult element :
-   *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param scope Required. A scope can be a project, a folder, or an organization. The search is - * limited to the resources within the `scope`. The caller must be granted the - * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - * permission on the desired scope. - *

The allowed values are: - *

    - *
  • projects/{PROJECT_ID} (e.g., "projects/foo-bar") - *
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - *
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - *
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - *
- * - * @param query Optional. The query statement. See [how to construct a - * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) - * for more information. If not specified or empty, it will search all the resources within - * the specified `scope`. - *

Examples: - *

    - *
  • `name:Important` to find Cloud resources whose name contains "Important" as a word. - *
  • `name=Important` to find the Cloud resource whose name is exactly "Important". - *
  • `displayName:Impor*` to find Cloud resources whose display name contains "Impor" - * as a prefix of any word in the field. - *
  • `location:us-west*` to find Cloud resources whose location contains both "us" and - * "west" as prefixes. - *
  • `labels:prod` to find Cloud resources whose labels contain "prod" as a key or value. - *
  • `labels.env:prod` to find Cloud resources that have a label "env" and its value is - * "prod". - *
  • `labels.env:*` to find Cloud resources that have a label "env". - *
  • `kmsKey:key` to find Cloud resources encrypted with a customer-managed encryption key - * whose name contains the word "key". - *
  • `relationships:instance-group-1` to find Cloud resources that have relationships with - * "instance-group-1" in the related resource name. - *
  • `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that have - * relationships of type "INSTANCE_TO_INSTANCEGROUP". - *
  • `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find compute instances - * that have relationships with "instance-group-1" in the compute instance group - * resource name, for relationship type "INSTANCE_TO_INSTANCEGROUP". - *
  • `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a word. - *
  • `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain "ACTIVE" as a - * word. - *
  • `createTime<1609459200` to find Cloud resources that were created before - * "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 - * UTC" in seconds. - *
  • `updateTime>1609459200` to find Cloud resources that were updated after - * "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 - * UTC" in seconds. - *
  • `Important` to find Cloud resources that contain "Important" as a word in any of the - * searchable fields. - *
  • `Impor*` to find Cloud resources that contain "Impor" as a prefix of any word in - * any of the searchable fields. - *
  • `Important location:(us-west1 OR global)` to find Cloud resources that contain - * "Important" as a word in any of the searchable fields and are also located in the - * "us-west1" region or the "global" location. - *
- * - * @param assetTypes Optional. A list of asset types that this request searches for. If empty, it - * will search all the [searchable asset - * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). - *

Regular expressions are also supported. For example: - *

    - *
  • "compute.googleapis.com.*" snapshots resources whose asset type starts with - * "compute.googleapis.com". - *
  • ".*Instance" snapshots resources whose asset type ends with "Instance". - *
  • ".*Instance.*" snapshots resources whose asset type contains "Instance". - *
- *

See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular - * expression syntax. If the regular expression does not match any supported asset type, an - * INVALID_ARGUMENT error will be returned. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllResourcesPagedResponse searchAllResources( - String scope, String query, List assetTypes) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope(scope) - .setQuery(query) - .addAllAssetTypes(assetTypes) - .build(); - return searchAllResources(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllResourcesRequest request =
-   *       SearchAllResourcesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   for (ResourceSearchResult element :
-   *       assetServiceClient.searchAllResources(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllResourcesPagedResponse searchAllResources( - SearchAllResourcesRequest request) { - return searchAllResourcesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllResourcesRequest request =
-   *       SearchAllResourcesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.searchAllResourcesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (ResourceSearchResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllResourcesPagedCallable() { - return stub.searchAllResourcesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllResourcesRequest request =
-   *       SearchAllResourcesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .setReadMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   while (true) {
-   *     SearchAllResourcesResponse response =
-   *         assetServiceClient.searchAllResourcesCallable().call(request);
-   *     for (ResourceSearchResult element : response.getResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllResourcesCallable() { - return stub.searchAllResourcesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String scope = "scope109264468";
-   *   String query = "query107944136";
-   *   for (IamPolicySearchResult element :
-   *       assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param scope Required. A scope can be a project, a folder, or an organization. The search is - * limited to the IAM policies within the `scope`. The caller must be granted the - * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - * permission on the desired scope. - *

The allowed values are: - *

    - *
  • projects/{PROJECT_ID} (e.g., "projects/foo-bar") - *
  • projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - *
  • folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - *
  • organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - *
- * - * @param query Optional. The query statement. See [how to construct a - * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) - * for more information. If not specified or empty, it will search all the IAM policies within - * the specified `scope`. Note that the query string is compared against each Cloud IAM policy - * binding, including its principals, roles, and Cloud IAM conditions. The returned Cloud IAM - * policies will only contain the bindings that match your query. To learn more about the IAM - * policy structure, see the [IAM policy - * documentation](https://cloud.google.com/iam/help/allow-policies/structure). - *

Examples: - *

    - *
  • `policy:amy{@literal @}gmail.com` to find IAM policy bindings that specify user - * "amy{@literal @}gmail.com". - *
  • `policy:roles/compute.admin` to find IAM policy bindings that specify the Compute - * Admin role. - *
  • `policy:comp*` to find IAM policy bindings that contain "comp" as a prefix of any - * word in the binding. - *
  • `policy.role.permissions:storage.buckets.update` to find IAM policy bindings that - * specify a role containing "storage.buckets.update" permission. Note that if callers - * don't have `iam.roles.get` access to a role's included permissions, policy bindings - * that specify this role will be dropped from the search results. - *
  • `policy.role.permissions:upd*` to find IAM policy bindings that specify a role - * containing "upd" as a prefix of any word in the role permission. Note that if callers - * don't have `iam.roles.get` access to a role's included permissions, policy bindings - * that specify this role will be dropped from the search results. - *
  • `resource:organizations/123456` to find IAM policy bindings that are set on - * "organizations/123456". - *
  • `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to find IAM - * policy bindings that are set on the project named "myproject". - *
  • `Important` to find IAM policy bindings that contain "Important" as a word in any of - * the searchable fields (except for the included permissions). - *
  • `resource:(instance1 OR instance2) policy:amy` to find IAM policy bindings that are - * set on resources "instance1" or "instance2" and also specify user "amy". - *
  • `roles:roles/compute.admin` to find IAM policy bindings that specify the Compute - * Admin role. - *
  • `memberTypes:user` to find IAM policy bindings that contain the principal type - * "user". - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder().setScope(scope).setQuery(query).build(); - return searchAllIamPolicies(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllIamPoliciesRequest request =
-   *       SearchAllIamPoliciesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   for (IamPolicySearchResult element :
-   *       assetServiceClient.searchAllIamPolicies(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( - SearchAllIamPoliciesRequest request) { - return searchAllIamPoliciesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllIamPoliciesRequest request =
-   *       SearchAllIamPoliciesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (IamPolicySearchResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllIamPoliciesPagedCallable() { - return stub.searchAllIamPoliciesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllIamPoliciesRequest request =
-   *       SearchAllIamPoliciesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   while (true) {
-   *     SearchAllIamPoliciesResponse response =
-   *         assetServiceClient.searchAllIamPoliciesCallable().call(request);
-   *     for (IamPolicySearchResult element : response.getResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllIamPoliciesCallable() { - return stub.searchAllIamPoliciesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Analyzes IAM policies to answer which identities have what accesses on which resources. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   AnalyzeIamPolicyRequest request =
-   *       AnalyzeIamPolicyRequest.newBuilder()
-   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
-   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
-   *           .setExecutionTimeout(Duration.newBuilder().build())
-   *           .build();
-   *   AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest request) { - return analyzeIamPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Analyzes IAM policies to answer which identities have what accesses on which resources. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   AnalyzeIamPolicyRequest request =
-   *       AnalyzeIamPolicyRequest.newBuilder()
-   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
-   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
-   *           .setExecutionTimeout(Duration.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.analyzeIamPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   AnalyzeIamPolicyResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - analyzeIamPolicyCallable() { - return stub.analyzeIamPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   AnalyzeIamPolicyLongrunningRequest request =
-   *       AnalyzeIamPolicyLongrunningRequest.newBuilder()
-   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
-   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
-   *           .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build())
-   *           .build();
-   *   AnalyzeIamPolicyLongrunningResponse response =
-   *       assetServiceClient.analyzeIamPolicyLongrunningAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture< - AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest request) { - return analyzeIamPolicyLongrunningOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   AnalyzeIamPolicyLongrunningRequest request =
-   *       AnalyzeIamPolicyLongrunningRequest.newBuilder()
-   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
-   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
-   *           .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build())
-   *           .build();
-   *   OperationFuture
-   *       future =
-   *           assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request);
-   *   // Do something.
-   *   AnalyzeIamPolicyLongrunningResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationCallable() { - return stub.analyzeIamPolicyLongrunningOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   AnalyzeIamPolicyLongrunningRequest request =
-   *       AnalyzeIamPolicyLongrunningRequest.newBuilder()
-   *           .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build())
-   *           .setSavedAnalysisQuery("savedAnalysisQuery376058885")
-   *           .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.analyzeIamPolicyLongrunningCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - analyzeIamPolicyLongrunningCallable() { - return stub.analyzeIamPolicyLongrunningCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   AnalyzeMoveRequest request =
-   *       AnalyzeMoveRequest.newBuilder()
-   *           .setResource("resource-341064690")
-   *           .setDestinationParent("destinationParent-1733659048")
-   *           .build();
-   *   AnalyzeMoveResponse response = assetServiceClient.analyzeMove(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final AnalyzeMoveResponse analyzeMove(AnalyzeMoveRequest request) { - return analyzeMoveCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   AnalyzeMoveRequest request =
-   *       AnalyzeMoveRequest.newBuilder()
-   *           .setResource("resource-341064690")
-   *           .setDestinationParent("destinationParent-1733659048")
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.analyzeMoveCallable().futureCall(request);
-   *   // Do something.
-   *   AnalyzeMoveResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable analyzeMoveCallable() { - return stub.analyzeMoveCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Issue a job that queries assets using a SQL statement compatible with [BigQuery Standard - * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   QueryAssetsRequest request =
-   *       QueryAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setTimeout(Duration.newBuilder().build())
-   *           .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build())
-   *           .build();
-   *   QueryAssetsResponse response = assetServiceClient.queryAssets(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final QueryAssetsResponse queryAssets(QueryAssetsRequest request) { - return queryAssetsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Issue a job that queries assets using a SQL statement compatible with [BigQuery Standard - * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   QueryAssetsRequest request =
-   *       QueryAssetsRequest.newBuilder()
-   *           .setParent(FolderName.of("[FOLDER]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setTimeout(Duration.newBuilder().build())
-   *           .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.queryAssetsCallable().futureCall(request);
-   *   // Do something.
-   *   QueryAssetsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable queryAssetsCallable() { - return stub.queryAssetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a saved query in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
-   *   String savedQueryId = "savedQueryId378086268";
-   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
-   * }
-   * }
- * - * @param parent Required. The name of the project/folder/organization where this saved_query - * should be created in. It can only be an organization number (such as "organizations/123"), - * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", - * or a project number (such as "projects/12345"). - * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will - * be generated based on the parent and saved_query_id. - * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the - * specified parent. It will become the final component of the saved query's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Notice that this field is required in the saved query creation, and the `name` field of - * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery createSavedQuery( - FolderName parent, SavedQuery savedQuery, String savedQueryId) { - CreateSavedQueryRequest request = - CreateSavedQueryRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSavedQuery(savedQuery) - .setSavedQueryId(savedQueryId) - .build(); - return createSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a saved query in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
-   *   String savedQueryId = "savedQueryId378086268";
-   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
-   * }
-   * }
- * - * @param parent Required. The name of the project/folder/organization where this saved_query - * should be created in. It can only be an organization number (such as "organizations/123"), - * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", - * or a project number (such as "projects/12345"). - * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will - * be generated based on the parent and saved_query_id. - * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the - * specified parent. It will become the final component of the saved query's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Notice that this field is required in the saved query creation, and the `name` field of - * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery createSavedQuery( - OrganizationName parent, SavedQuery savedQuery, String savedQueryId) { - CreateSavedQueryRequest request = - CreateSavedQueryRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSavedQuery(savedQuery) - .setSavedQueryId(savedQueryId) - .build(); - return createSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a saved query in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
-   *   String savedQueryId = "savedQueryId378086268";
-   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
-   * }
-   * }
- * - * @param parent Required. The name of the project/folder/organization where this saved_query - * should be created in. It can only be an organization number (such as "organizations/123"), - * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", - * or a project number (such as "projects/12345"). - * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will - * be generated based on the parent and saved_query_id. - * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the - * specified parent. It will become the final component of the saved query's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Notice that this field is required in the saved query creation, and the `name` field of - * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery createSavedQuery( - ProjectName parent, SavedQuery savedQuery, String savedQueryId) { - CreateSavedQueryRequest request = - CreateSavedQueryRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setSavedQuery(savedQuery) - .setSavedQueryId(savedQueryId) - .build(); - return createSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a saved query in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
-   *   String savedQueryId = "savedQueryId378086268";
-   *   SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId);
-   * }
-   * }
- * - * @param parent Required. The name of the project/folder/organization where this saved_query - * should be created in. It can only be an organization number (such as "organizations/123"), - * a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id")", - * or a project number (such as "projects/12345"). - * @param savedQuery Required. The saved_query details. The `name` field must be empty as it will - * be generated based on the parent and saved_query_id. - * @param savedQueryId Required. The ID to use for the saved query, which must be unique in the - * specified parent. It will become the final component of the saved query's resource name. - *

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. - *

Notice that this field is required in the saved query creation, and the `name` field of - * the `saved_query` will be ignored. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery createSavedQuery( - String parent, SavedQuery savedQuery, String savedQueryId) { - CreateSavedQueryRequest request = - CreateSavedQueryRequest.newBuilder() - .setParent(parent) - .setSavedQuery(savedQuery) - .setSavedQueryId(savedQueryId) - .build(); - return createSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a saved query in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   CreateSavedQueryRequest request =
-   *       CreateSavedQueryRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setSavedQuery(SavedQuery.newBuilder().build())
-   *           .setSavedQueryId("savedQueryId378086268")
-   *           .build();
-   *   SavedQuery response = assetServiceClient.createSavedQuery(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery createSavedQuery(CreateSavedQueryRequest request) { - return createSavedQueryCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a saved query in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   CreateSavedQueryRequest request =
-   *       CreateSavedQueryRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setSavedQuery(SavedQuery.newBuilder().build())
-   *           .setSavedQueryId("savedQueryId378086268")
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.createSavedQueryCallable().futureCall(request);
-   *   // Do something.
-   *   SavedQuery response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createSavedQueryCallable() { - return stub.createSavedQueryCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]");
-   *   SavedQuery response = assetServiceClient.getSavedQuery(name);
-   * }
-   * }
- * - * @param name Required. The name of the saved query and it must be in the format of: - *
    - *
  • projects/project_number/savedQueries/saved_query_id - *
  • folders/folder_number/savedQueries/saved_query_id - *
  • organizations/organization_number/savedQueries/saved_query_id - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery getSavedQuery(SavedQueryName name) { - GetSavedQueryRequest request = - GetSavedQueryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString();
-   *   SavedQuery response = assetServiceClient.getSavedQuery(name);
-   * }
-   * }
- * - * @param name Required. The name of the saved query and it must be in the format of: - *
    - *
  • projects/project_number/savedQueries/saved_query_id - *
  • folders/folder_number/savedQueries/saved_query_id - *
  • organizations/organization_number/savedQueries/saved_query_id - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery getSavedQuery(String name) { - GetSavedQueryRequest request = GetSavedQueryRequest.newBuilder().setName(name).build(); - return getSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   GetSavedQueryRequest request =
-   *       GetSavedQueryRequest.newBuilder()
-   *           .setName(
-   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
-   *           .build();
-   *   SavedQuery response = assetServiceClient.getSavedQuery(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery getSavedQuery(GetSavedQueryRequest request) { - return getSavedQueryCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   GetSavedQueryRequest request =
-   *       GetSavedQueryRequest.newBuilder()
-   *           .setName(
-   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.getSavedQueryCallable().futureCall(request);
-   *   // Do something.
-   *   SavedQuery response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getSavedQueryCallable() { - return stub.getSavedQueryCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all saved queries in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FolderName parent = FolderName.of("[FOLDER]");
-   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent project/folder/organization whose savedQueries are to be - * listed. It can only be using project/folder/organization number (such as "folders/12345")", - * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSavedQueriesPagedResponse listSavedQueries(FolderName parent) { - ListSavedQueriesRequest request = - ListSavedQueriesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSavedQueries(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all saved queries in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
-   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent project/folder/organization whose savedQueries are to be - * listed. It can only be using project/folder/organization number (such as "folders/12345")", - * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSavedQueriesPagedResponse listSavedQueries(OrganizationName parent) { - ListSavedQueriesRequest request = - ListSavedQueriesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSavedQueries(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all saved queries in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent project/folder/organization whose savedQueries are to be - * listed. It can only be using project/folder/organization number (such as "folders/12345")", - * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSavedQueriesPagedResponse listSavedQueries(ProjectName parent) { - ListSavedQueriesRequest request = - ListSavedQueriesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listSavedQueries(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all saved queries in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The parent project/folder/organization whose savedQueries are to be - * listed. It can only be using project/folder/organization number (such as "folders/12345")", - * or a project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSavedQueriesPagedResponse listSavedQueries(String parent) { - ListSavedQueriesRequest request = - ListSavedQueriesRequest.newBuilder().setParent(parent).build(); - return listSavedQueries(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all saved queries in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListSavedQueriesRequest request =
-   *       ListSavedQueriesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (SavedQuery element : assetServiceClient.listSavedQueries(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListSavedQueriesPagedResponse listSavedQueries(ListSavedQueriesRequest request) { - return listSavedQueriesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all saved queries in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListSavedQueriesRequest request =
-   *       ListSavedQueriesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.listSavedQueriesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (SavedQuery element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listSavedQueriesPagedCallable() { - return stub.listSavedQueriesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all saved queries in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListSavedQueriesRequest request =
-   *       ListSavedQueriesRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setFilter("filter-1274492040")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListSavedQueriesResponse response =
-   *         assetServiceClient.listSavedQueriesCallable().call(request);
-   *     for (SavedQuery element : response.getSavedQueriesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listSavedQueriesCallable() { - return stub.listSavedQueriesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SavedQuery savedQuery = SavedQuery.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   SavedQuery response = assetServiceClient.updateSavedQuery(savedQuery, updateMask);
-   * }
-   * }
- * - * @param savedQuery Required. The saved query to update. - *

The saved query's `name` field is used to identify the one to update, which has format - * as below: - *

    - *
  • projects/project_number/savedQueries/saved_query_id - *
  • folders/folder_number/savedQueries/saved_query_id - *
  • organizations/organization_number/savedQueries/saved_query_id - *
- * - * @param updateMask Required. The list of fields to update. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery updateSavedQuery(SavedQuery savedQuery, FieldMask updateMask) { - UpdateSavedQueryRequest request = - UpdateSavedQueryRequest.newBuilder() - .setSavedQuery(savedQuery) - .setUpdateMask(updateMask) - .build(); - return updateSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   UpdateSavedQueryRequest request =
-   *       UpdateSavedQueryRequest.newBuilder()
-   *           .setSavedQuery(SavedQuery.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   SavedQuery response = assetServiceClient.updateSavedQuery(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SavedQuery updateSavedQuery(UpdateSavedQueryRequest request) { - return updateSavedQueryCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   UpdateSavedQueryRequest request =
-   *       UpdateSavedQueryRequest.newBuilder()
-   *           .setSavedQuery(SavedQuery.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.updateSavedQueryCallable().futureCall(request);
-   *   // Do something.
-   *   SavedQuery response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateSavedQueryCallable() { - return stub.updateSavedQueryCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]");
-   *   assetServiceClient.deleteSavedQuery(name);
-   * }
-   * }
- * - * @param name Required. The name of the saved query to delete. It must be in the format of: - *
    - *
  • projects/project_number/savedQueries/saved_query_id - *
  • folders/folder_number/savedQueries/saved_query_id - *
  • organizations/organization_number/savedQueries/saved_query_id - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteSavedQuery(SavedQueryName name) { - DeleteSavedQueryRequest request = - DeleteSavedQueryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString();
-   *   assetServiceClient.deleteSavedQuery(name);
-   * }
-   * }
- * - * @param name Required. The name of the saved query to delete. It must be in the format of: - *
    - *
  • projects/project_number/savedQueries/saved_query_id - *
  • folders/folder_number/savedQueries/saved_query_id - *
  • organizations/organization_number/savedQueries/saved_query_id - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteSavedQuery(String name) { - DeleteSavedQueryRequest request = DeleteSavedQueryRequest.newBuilder().setName(name).build(); - deleteSavedQuery(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   DeleteSavedQueryRequest request =
-   *       DeleteSavedQueryRequest.newBuilder()
-   *           .setName(
-   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
-   *           .build();
-   *   assetServiceClient.deleteSavedQuery(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteSavedQuery(DeleteSavedQueryRequest request) { - deleteSavedQueryCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a saved query. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   DeleteSavedQueryRequest request =
-   *       DeleteSavedQueryRequest.newBuilder()
-   *           .setName(
-   *               SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.deleteSavedQueryCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteSavedQueryCallable() { - return stub.deleteSavedQueryCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets effective IAM policies for a batch of resources. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   BatchGetEffectiveIamPoliciesRequest request =
-   *       BatchGetEffectiveIamPoliciesRequest.newBuilder()
-   *           .setScope(FolderName.of("[FOLDER]").toString())
-   *           .addAllNames(new ArrayList())
-   *           .build();
-   *   BatchGetEffectiveIamPoliciesResponse response =
-   *       assetServiceClient.batchGetEffectiveIamPolicies(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final BatchGetEffectiveIamPoliciesResponse batchGetEffectiveIamPolicies( - BatchGetEffectiveIamPoliciesRequest request) { - return batchGetEffectiveIamPoliciesCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets effective IAM policies for a batch of resources. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   BatchGetEffectiveIamPoliciesRequest request =
-   *       BatchGetEffectiveIamPoliciesRequest.newBuilder()
-   *           .setScope(FolderName.of("[FOLDER]").toString())
-   *           .addAllNames(new ArrayList())
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.batchGetEffectiveIamPoliciesCallable().futureCall(request);
-   *   // Do something.
-   *   BatchGetEffectiveIamPoliciesResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesCallable() { - return stub.batchGetEffectiveIamPoliciesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListAssetsPagedResponse - extends AbstractPagedListResponse< - ListAssetsRequest, - ListAssetsResponse, - Asset, - ListAssetsPage, - ListAssetsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListAssetsPagedResponse(ListAssetsPage page) { - super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListAssetsPage - extends AbstractPage { - - private ListAssetsPage( - PageContext context, - ListAssetsResponse response) { - super(context, response); - } - - private static ListAssetsPage createEmptyPage() { - return new ListAssetsPage(null, null); - } - - @Override - protected ListAssetsPage createPage( - PageContext context, - ListAssetsResponse response) { - return new ListAssetsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListAssetsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListAssetsRequest, - ListAssetsResponse, - Asset, - ListAssetsPage, - ListAssetsFixedSizeCollection> { - - private ListAssetsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListAssetsFixedSizeCollection createEmptyCollection() { - return new ListAssetsFixedSizeCollection(null, 0); - } - - @Override - protected ListAssetsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListAssetsFixedSizeCollection(pages, collectionSize); - } - } - - public static class SearchAllResourcesPagedResponse - extends AbstractPagedListResponse< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - ResourceSearchResult, - SearchAllResourcesPage, - SearchAllResourcesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - SearchAllResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new SearchAllResourcesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private SearchAllResourcesPagedResponse(SearchAllResourcesPage page) { - super(page, SearchAllResourcesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class SearchAllResourcesPage - extends AbstractPage< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - ResourceSearchResult, - SearchAllResourcesPage> { - - private SearchAllResourcesPage( - PageContext - context, - SearchAllResourcesResponse response) { - super(context, response); - } - - private static SearchAllResourcesPage createEmptyPage() { - return new SearchAllResourcesPage(null, null); - } - - @Override - protected SearchAllResourcesPage createPage( - PageContext - context, - SearchAllResourcesResponse response) { - return new SearchAllResourcesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class SearchAllResourcesFixedSizeCollection - extends AbstractFixedSizeCollection< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - ResourceSearchResult, - SearchAllResourcesPage, - SearchAllResourcesFixedSizeCollection> { - - private SearchAllResourcesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static SearchAllResourcesFixedSizeCollection createEmptyCollection() { - return new SearchAllResourcesFixedSizeCollection(null, 0); - } - - @Override - protected SearchAllResourcesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new SearchAllResourcesFixedSizeCollection(pages, collectionSize); - } - } - - public static class SearchAllIamPoliciesPagedResponse - extends AbstractPagedListResponse< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult, - SearchAllIamPoliciesPage, - SearchAllIamPoliciesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - SearchAllIamPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new SearchAllIamPoliciesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private SearchAllIamPoliciesPagedResponse(SearchAllIamPoliciesPage page) { - super(page, SearchAllIamPoliciesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class SearchAllIamPoliciesPage - extends AbstractPage< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult, - SearchAllIamPoliciesPage> { - - private SearchAllIamPoliciesPage( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - SearchAllIamPoliciesResponse response) { - super(context, response); - } - - private static SearchAllIamPoliciesPage createEmptyPage() { - return new SearchAllIamPoliciesPage(null, null); - } - - @Override - protected SearchAllIamPoliciesPage createPage( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - SearchAllIamPoliciesResponse response) { - return new SearchAllIamPoliciesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class SearchAllIamPoliciesFixedSizeCollection - extends AbstractFixedSizeCollection< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult, - SearchAllIamPoliciesPage, - SearchAllIamPoliciesFixedSizeCollection> { - - private SearchAllIamPoliciesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static SearchAllIamPoliciesFixedSizeCollection createEmptyCollection() { - return new SearchAllIamPoliciesFixedSizeCollection(null, 0); - } - - @Override - protected SearchAllIamPoliciesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new SearchAllIamPoliciesFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListSavedQueriesPagedResponse - extends AbstractPagedListResponse< - ListSavedQueriesRequest, - ListSavedQueriesResponse, - SavedQuery, - ListSavedQueriesPage, - ListSavedQueriesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListSavedQueriesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListSavedQueriesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListSavedQueriesPagedResponse(ListSavedQueriesPage page) { - super(page, ListSavedQueriesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListSavedQueriesPage - extends AbstractPage< - ListSavedQueriesRequest, ListSavedQueriesResponse, SavedQuery, ListSavedQueriesPage> { - - private ListSavedQueriesPage( - PageContext context, - ListSavedQueriesResponse response) { - super(context, response); - } - - private static ListSavedQueriesPage createEmptyPage() { - return new ListSavedQueriesPage(null, null); - } - - @Override - protected ListSavedQueriesPage createPage( - PageContext context, - ListSavedQueriesResponse response) { - return new ListSavedQueriesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListSavedQueriesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListSavedQueriesRequest, - ListSavedQueriesResponse, - SavedQuery, - ListSavedQueriesPage, - ListSavedQueriesFixedSizeCollection> { - - private ListSavedQueriesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListSavedQueriesFixedSizeCollection createEmptyCollection() { - return new ListSavedQueriesFixedSizeCollection(null, 0); - } - - @Override - protected ListSavedQueriesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListSavedQueriesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java deleted file mode 100644 index 40c2557ae991..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1.stub.AssetServiceStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchGetAssetsHistory to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .batchGetAssetsHistorySettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder
- *             .batchGetAssetsHistorySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class AssetServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to exportAssets. */ - public UnaryCallSettings exportAssetsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).exportAssetsSettings(); - } - - /** Returns the object with the settings used for calls to exportAssets. */ - public OperationCallSettings - exportAssetsOperationSettings() { - return ((AssetServiceStubSettings) getStubSettings()).exportAssetsOperationSettings(); - } - - /** Returns the object with the settings used for calls to listAssets. */ - public PagedCallSettings - listAssetsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).listAssetsSettings(); - } - - /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings - batchGetAssetsHistorySettings() { - return ((AssetServiceStubSettings) getStubSettings()).batchGetAssetsHistorySettings(); - } - - /** Returns the object with the settings used for calls to createFeed. */ - public UnaryCallSettings createFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).createFeedSettings(); - } - - /** Returns the object with the settings used for calls to getFeed. */ - public UnaryCallSettings getFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).getFeedSettings(); - } - - /** Returns the object with the settings used for calls to listFeeds. */ - public UnaryCallSettings listFeedsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).listFeedsSettings(); - } - - /** Returns the object with the settings used for calls to updateFeed. */ - public UnaryCallSettings updateFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).updateFeedSettings(); - } - - /** Returns the object with the settings used for calls to deleteFeed. */ - public UnaryCallSettings deleteFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).deleteFeedSettings(); - } - - /** Returns the object with the settings used for calls to searchAllResources. */ - public PagedCallSettings< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).searchAllResourcesSettings(); - } - - /** Returns the object with the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).searchAllIamPoliciesSettings(); - } - - /** Returns the object with the settings used for calls to analyzeIamPolicy. */ - public UnaryCallSettings - analyzeIamPolicySettings() { - return ((AssetServiceStubSettings) getStubSettings()).analyzeIamPolicySettings(); - } - - /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ - public UnaryCallSettings - analyzeIamPolicyLongrunningSettings() { - return ((AssetServiceStubSettings) getStubSettings()).analyzeIamPolicyLongrunningSettings(); - } - - /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ - public OperationCallSettings< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationSettings() { - return ((AssetServiceStubSettings) getStubSettings()) - .analyzeIamPolicyLongrunningOperationSettings(); - } - - /** Returns the object with the settings used for calls to analyzeMove. */ - public UnaryCallSettings analyzeMoveSettings() { - return ((AssetServiceStubSettings) getStubSettings()).analyzeMoveSettings(); - } - - /** Returns the object with the settings used for calls to queryAssets. */ - public UnaryCallSettings queryAssetsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).queryAssetsSettings(); - } - - /** Returns the object with the settings used for calls to createSavedQuery. */ - public UnaryCallSettings createSavedQuerySettings() { - return ((AssetServiceStubSettings) getStubSettings()).createSavedQuerySettings(); - } - - /** Returns the object with the settings used for calls to getSavedQuery. */ - public UnaryCallSettings getSavedQuerySettings() { - return ((AssetServiceStubSettings) getStubSettings()).getSavedQuerySettings(); - } - - /** Returns the object with the settings used for calls to listSavedQueries. */ - public PagedCallSettings< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> - listSavedQueriesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).listSavedQueriesSettings(); - } - - /** Returns the object with the settings used for calls to updateSavedQuery. */ - public UnaryCallSettings updateSavedQuerySettings() { - return ((AssetServiceStubSettings) getStubSettings()).updateSavedQuerySettings(); - } - - /** Returns the object with the settings used for calls to deleteSavedQuery. */ - public UnaryCallSettings deleteSavedQuerySettings() { - return ((AssetServiceStubSettings) getStubSettings()).deleteSavedQuerySettings(); - } - - /** Returns the object with the settings used for calls to batchGetEffectiveIamPolicies. */ - public UnaryCallSettings< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).batchGetEffectiveIamPoliciesSettings(); - } - - public static final AssetServiceSettings create(AssetServiceStubSettings stub) - throws IOException { - return new AssetServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AssetServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AssetServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AssetServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AssetServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AssetServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(AssetServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(AssetServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AssetServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(AssetServiceStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); - } - - public AssetServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AssetServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - public UnaryCallSettings.Builder exportAssetsSettings() { - return getStubSettingsBuilder().exportAssetsSettings(); - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - public OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings() { - return getStubSettingsBuilder().exportAssetsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to listAssets. */ - public PagedCallSettings.Builder - listAssetsSettings() { - return getStubSettingsBuilder().listAssetsSettings(); - } - - /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings.Builder - batchGetAssetsHistorySettings() { - return getStubSettingsBuilder().batchGetAssetsHistorySettings(); - } - - /** Returns the builder for the settings used for calls to createFeed. */ - public UnaryCallSettings.Builder createFeedSettings() { - return getStubSettingsBuilder().createFeedSettings(); - } - - /** Returns the builder for the settings used for calls to getFeed. */ - public UnaryCallSettings.Builder getFeedSettings() { - return getStubSettingsBuilder().getFeedSettings(); - } - - /** Returns the builder for the settings used for calls to listFeeds. */ - public UnaryCallSettings.Builder listFeedsSettings() { - return getStubSettingsBuilder().listFeedsSettings(); - } - - /** Returns the builder for the settings used for calls to updateFeed. */ - public UnaryCallSettings.Builder updateFeedSettings() { - return getStubSettingsBuilder().updateFeedSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFeed. */ - public UnaryCallSettings.Builder deleteFeedSettings() { - return getStubSettingsBuilder().deleteFeedSettings(); - } - - /** Returns the builder for the settings used for calls to searchAllResources. */ - public PagedCallSettings.Builder< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return getStubSettingsBuilder().searchAllResourcesSettings(); - } - - /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings.Builder< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return getStubSettingsBuilder().searchAllIamPoliciesSettings(); - } - - /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ - public UnaryCallSettings.Builder - analyzeIamPolicySettings() { - return getStubSettingsBuilder().analyzeIamPolicySettings(); - } - - /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ - public UnaryCallSettings.Builder - analyzeIamPolicyLongrunningSettings() { - return getStubSettingsBuilder().analyzeIamPolicyLongrunningSettings(); - } - - /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ - public OperationCallSettings.Builder< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationSettings() { - return getStubSettingsBuilder().analyzeIamPolicyLongrunningOperationSettings(); - } - - /** Returns the builder for the settings used for calls to analyzeMove. */ - public UnaryCallSettings.Builder - analyzeMoveSettings() { - return getStubSettingsBuilder().analyzeMoveSettings(); - } - - /** Returns the builder for the settings used for calls to queryAssets. */ - public UnaryCallSettings.Builder - queryAssetsSettings() { - return getStubSettingsBuilder().queryAssetsSettings(); - } - - /** Returns the builder for the settings used for calls to createSavedQuery. */ - public UnaryCallSettings.Builder - createSavedQuerySettings() { - return getStubSettingsBuilder().createSavedQuerySettings(); - } - - /** Returns the builder for the settings used for calls to getSavedQuery. */ - public UnaryCallSettings.Builder getSavedQuerySettings() { - return getStubSettingsBuilder().getSavedQuerySettings(); - } - - /** Returns the builder for the settings used for calls to listSavedQueries. */ - public PagedCallSettings.Builder< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> - listSavedQueriesSettings() { - return getStubSettingsBuilder().listSavedQueriesSettings(); - } - - /** Returns the builder for the settings used for calls to updateSavedQuery. */ - public UnaryCallSettings.Builder - updateSavedQuerySettings() { - return getStubSettingsBuilder().updateSavedQuerySettings(); - } - - /** Returns the builder for the settings used for calls to deleteSavedQuery. */ - public UnaryCallSettings.Builder deleteSavedQuerySettings() { - return getStubSettingsBuilder().deleteSavedQuerySettings(); - } - - /** Returns the builder for the settings used for calls to batchGetEffectiveIamPolicies. */ - public UnaryCallSettings.Builder< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesSettings() { - return getStubSettingsBuilder().batchGetEffectiveIamPoliciesSettings(); - } - - @Override - public AssetServiceSettings build() throws IOException { - return new AssetServiceSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json deleted file mode 100644 index b3f61cf6ee32..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.asset.v1", - "libraryPackage": "com.google.cloud.asset.v1", - "services": { - "AssetService": { - "clients": { - "grpc": { - "libraryClient": "AssetServiceClient", - "rpcs": { - "AnalyzeIamPolicy": { - "methods": ["analyzeIamPolicy", "analyzeIamPolicyCallable"] - }, - "AnalyzeIamPolicyLongrunning": { - "methods": ["analyzeIamPolicyLongrunningAsync", "analyzeIamPolicyLongrunningOperationCallable", "analyzeIamPolicyLongrunningCallable"] - }, - "AnalyzeMove": { - "methods": ["analyzeMove", "analyzeMoveCallable"] - }, - "BatchGetAssetsHistory": { - "methods": ["batchGetAssetsHistory", "batchGetAssetsHistoryCallable"] - }, - "BatchGetEffectiveIamPolicies": { - "methods": ["batchGetEffectiveIamPolicies", "batchGetEffectiveIamPoliciesCallable"] - }, - "CreateFeed": { - "methods": ["createFeed", "createFeed", "createFeedCallable"] - }, - "CreateSavedQuery": { - "methods": ["createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQuery", "createSavedQueryCallable"] - }, - "DeleteFeed": { - "methods": ["deleteFeed", "deleteFeed", "deleteFeed", "deleteFeedCallable"] - }, - "DeleteSavedQuery": { - "methods": ["deleteSavedQuery", "deleteSavedQuery", "deleteSavedQuery", "deleteSavedQueryCallable"] - }, - "ExportAssets": { - "methods": ["exportAssetsAsync", "exportAssetsOperationCallable", "exportAssetsCallable"] - }, - "GetFeed": { - "methods": ["getFeed", "getFeed", "getFeed", "getFeedCallable"] - }, - "GetSavedQuery": { - "methods": ["getSavedQuery", "getSavedQuery", "getSavedQuery", "getSavedQueryCallable"] - }, - "ListAssets": { - "methods": ["listAssets", "listAssets", "listAssets", "listAssetsPagedCallable", "listAssetsCallable"] - }, - "ListFeeds": { - "methods": ["listFeeds", "listFeeds", "listFeedsCallable"] - }, - "ListSavedQueries": { - "methods": ["listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueriesPagedCallable", "listSavedQueriesCallable"] - }, - "QueryAssets": { - "methods": ["queryAssets", "queryAssetsCallable"] - }, - "SearchAllIamPolicies": { - "methods": ["searchAllIamPolicies", "searchAllIamPolicies", "searchAllIamPoliciesPagedCallable", "searchAllIamPoliciesCallable"] - }, - "SearchAllResources": { - "methods": ["searchAllResources", "searchAllResources", "searchAllResourcesPagedCallable", "searchAllResourcesCallable"] - }, - "UpdateFeed": { - "methods": ["updateFeed", "updateFeed", "updateFeedCallable"] - }, - "UpdateSavedQuery": { - "methods": ["updateSavedQuery", "updateSavedQuery", "updateSavedQueryCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java deleted file mode 100644 index 7ac072c15639..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 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. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= AssetServiceClient ======================= - * - *

Service Description: Asset service definition. - * - *

Sample for AssetServiceClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   BatchGetAssetsHistoryRequest request =
- *       BatchGetAssetsHistoryRequest.newBuilder()
- *           .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString())
- *           .addAllAssetNames(new ArrayList())
- *           .setContentType(ContentType.forNumber(0))
- *           .setReadTimeWindow(TimeWindow.newBuilder().build())
- *           .addAllRelationshipTypes(new ArrayList())
- *           .build();
- *   BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.asset.v1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java deleted file mode 100644 index a8d06aa074ba..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2022 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.v1.stub; - -import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; -import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; -import com.google.cloud.asset.v1.AnalyzeMoveRequest; -import com.google.cloud.asset.v1.AnalyzeMoveResponse; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; -import com.google.cloud.asset.v1.CreateFeedRequest; -import com.google.cloud.asset.v1.CreateSavedQueryRequest; -import com.google.cloud.asset.v1.DeleteFeedRequest; -import com.google.cloud.asset.v1.DeleteSavedQueryRequest; -import com.google.cloud.asset.v1.ExportAssetsRequest; -import com.google.cloud.asset.v1.ExportAssetsResponse; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.GetFeedRequest; -import com.google.cloud.asset.v1.GetSavedQueryRequest; -import com.google.cloud.asset.v1.ListAssetsRequest; -import com.google.cloud.asset.v1.ListAssetsResponse; -import com.google.cloud.asset.v1.ListFeedsRequest; -import com.google.cloud.asset.v1.ListFeedsResponse; -import com.google.cloud.asset.v1.ListSavedQueriesRequest; -import com.google.cloud.asset.v1.ListSavedQueriesResponse; -import com.google.cloud.asset.v1.QueryAssetsRequest; -import com.google.cloud.asset.v1.QueryAssetsResponse; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1.SearchAllResourcesResponse; -import com.google.cloud.asset.v1.UpdateFeedRequest; -import com.google.cloud.asset.v1.UpdateSavedQueryRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class AssetServiceStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public OperationCallable - exportAssetsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportAssetsOperationCallable()"); - } - - public UnaryCallable exportAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: exportAssetsCallable()"); - } - - public UnaryCallable listAssetsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); - } - - public UnaryCallable listAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); - } - - public UnaryCallable - batchGetAssetsHistoryCallable() { - throw new UnsupportedOperationException("Not implemented: batchGetAssetsHistoryCallable()"); - } - - public UnaryCallable createFeedCallable() { - throw new UnsupportedOperationException("Not implemented: createFeedCallable()"); - } - - public UnaryCallable getFeedCallable() { - throw new UnsupportedOperationException("Not implemented: getFeedCallable()"); - } - - public UnaryCallable listFeedsCallable() { - throw new UnsupportedOperationException("Not implemented: listFeedsCallable()"); - } - - public UnaryCallable updateFeedCallable() { - throw new UnsupportedOperationException("Not implemented: updateFeedCallable()"); - } - - public UnaryCallable deleteFeedCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFeedCallable()"); - } - - public UnaryCallable - searchAllResourcesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllResourcesPagedCallable()"); - } - - public UnaryCallable - searchAllResourcesCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllResourcesCallable()"); - } - - public UnaryCallable - searchAllIamPoliciesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesPagedCallable()"); - } - - public UnaryCallable - searchAllIamPoliciesCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesCallable()"); - } - - public UnaryCallable - analyzeIamPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: analyzeIamPolicyCallable()"); - } - - public OperationCallable< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: analyzeIamPolicyLongrunningOperationCallable()"); - } - - public UnaryCallable - analyzeIamPolicyLongrunningCallable() { - throw new UnsupportedOperationException( - "Not implemented: analyzeIamPolicyLongrunningCallable()"); - } - - public UnaryCallable analyzeMoveCallable() { - throw new UnsupportedOperationException("Not implemented: analyzeMoveCallable()"); - } - - public UnaryCallable queryAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: queryAssetsCallable()"); - } - - public UnaryCallable createSavedQueryCallable() { - throw new UnsupportedOperationException("Not implemented: createSavedQueryCallable()"); - } - - public UnaryCallable getSavedQueryCallable() { - throw new UnsupportedOperationException("Not implemented: getSavedQueryCallable()"); - } - - public UnaryCallable - listSavedQueriesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listSavedQueriesPagedCallable()"); - } - - public UnaryCallable - listSavedQueriesCallable() { - throw new UnsupportedOperationException("Not implemented: listSavedQueriesCallable()"); - } - - public UnaryCallable updateSavedQueryCallable() { - throw new UnsupportedOperationException("Not implemented: updateSavedQueryCallable()"); - } - - public UnaryCallable deleteSavedQueryCallable() { - throw new UnsupportedOperationException("Not implemented: deleteSavedQueryCallable()"); - } - - public UnaryCallable - batchGetEffectiveIamPoliciesCallable() { - throw new UnsupportedOperationException( - "Not implemented: batchGetEffectiveIamPoliciesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java deleted file mode 100644 index c0a4ba15d1ef..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ /dev/null @@ -1,1293 +0,0 @@ -/* - * Copyright 2022 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.v1.stub; - -import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; -import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; -import com.google.cloud.asset.v1.AnalyzeMoveRequest; -import com.google.cloud.asset.v1.AnalyzeMoveResponse; -import com.google.cloud.asset.v1.Asset; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; -import com.google.cloud.asset.v1.CreateFeedRequest; -import com.google.cloud.asset.v1.CreateSavedQueryRequest; -import com.google.cloud.asset.v1.DeleteFeedRequest; -import com.google.cloud.asset.v1.DeleteSavedQueryRequest; -import com.google.cloud.asset.v1.ExportAssetsRequest; -import com.google.cloud.asset.v1.ExportAssetsResponse; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.GetFeedRequest; -import com.google.cloud.asset.v1.GetSavedQueryRequest; -import com.google.cloud.asset.v1.IamPolicySearchResult; -import com.google.cloud.asset.v1.ListAssetsRequest; -import com.google.cloud.asset.v1.ListAssetsResponse; -import com.google.cloud.asset.v1.ListFeedsRequest; -import com.google.cloud.asset.v1.ListFeedsResponse; -import com.google.cloud.asset.v1.ListSavedQueriesRequest; -import com.google.cloud.asset.v1.ListSavedQueriesResponse; -import com.google.cloud.asset.v1.QueryAssetsRequest; -import com.google.cloud.asset.v1.QueryAssetsResponse; -import com.google.cloud.asset.v1.ResourceSearchResult; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1.SearchAllResourcesResponse; -import com.google.cloud.asset.v1.UpdateFeedRequest; -import com.google.cloud.asset.v1.UpdateSavedQueryRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of batchGetAssetsHistory to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
- *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .batchGetAssetsHistorySettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder
- *             .batchGetAssetsHistorySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class AssetServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings exportAssetsSettings; - private final OperationCallSettings< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings; - private final PagedCallSettings - listAssetsSettings; - private final UnaryCallSettings - batchGetAssetsHistorySettings; - private final UnaryCallSettings createFeedSettings; - private final UnaryCallSettings getFeedSettings; - private final UnaryCallSettings listFeedsSettings; - private final UnaryCallSettings updateFeedSettings; - private final UnaryCallSettings deleteFeedSettings; - private final PagedCallSettings< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings; - private final PagedCallSettings< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings; - private final UnaryCallSettings - analyzeIamPolicySettings; - private final UnaryCallSettings - analyzeIamPolicyLongrunningSettings; - private final OperationCallSettings< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationSettings; - private final UnaryCallSettings analyzeMoveSettings; - private final UnaryCallSettings queryAssetsSettings; - private final UnaryCallSettings createSavedQuerySettings; - private final UnaryCallSettings getSavedQuerySettings; - private final PagedCallSettings< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> - listSavedQueriesSettings; - private final UnaryCallSettings updateSavedQuerySettings; - private final UnaryCallSettings deleteSavedQuerySettings; - private final UnaryCallSettings< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesSettings; - - private static final PagedListDescriptor - LIST_ASSETS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { - return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { - return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListAssetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListAssetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListAssetsResponse payload) { - return payload.getAssetsList() == null - ? ImmutableList.of() - : payload.getAssetsList(); - } - }; - - private static final PagedListDescriptor< - SearchAllResourcesRequest, SearchAllResourcesResponse, ResourceSearchResult> - SEARCH_ALL_RESOURCES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchAllResourcesRequest, SearchAllResourcesResponse, ResourceSearchResult>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public SearchAllResourcesRequest injectToken( - SearchAllResourcesRequest payload, String token) { - return SearchAllResourcesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public SearchAllResourcesRequest injectPageSize( - SearchAllResourcesRequest payload, int pageSize) { - return SearchAllResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(SearchAllResourcesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(SearchAllResourcesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - SearchAllResourcesResponse payload) { - return payload.getResultsList() == null - ? ImmutableList.of() - : payload.getResultsList(); - } - }; - - private static final PagedListDescriptor< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public SearchAllIamPoliciesRequest injectToken( - SearchAllIamPoliciesRequest payload, String token) { - return SearchAllIamPoliciesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public SearchAllIamPoliciesRequest injectPageSize( - SearchAllIamPoliciesRequest payload, int pageSize) { - return SearchAllIamPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(SearchAllIamPoliciesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(SearchAllIamPoliciesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - SearchAllIamPoliciesResponse payload) { - return payload.getResultsList() == null - ? ImmutableList.of() - : payload.getResultsList(); - } - }; - - private static final PagedListDescriptor< - ListSavedQueriesRequest, ListSavedQueriesResponse, SavedQuery> - LIST_SAVED_QUERIES_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListSavedQueriesRequest injectToken( - ListSavedQueriesRequest payload, String token) { - return ListSavedQueriesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListSavedQueriesRequest injectPageSize( - ListSavedQueriesRequest payload, int pageSize) { - return ListSavedQueriesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListSavedQueriesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListSavedQueriesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListSavedQueriesResponse payload) { - return payload.getSavedQueriesList() == null - ? ImmutableList.of() - : payload.getSavedQueriesList(); - } - }; - - private static final PagedListResponseFactory< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> - LIST_ASSETS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListAssetsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); - return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - SEARCH_ALL_RESOURCES_PAGE_STR_FACT = - new PagedListResponseFactory< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - SearchAllResourcesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - SearchAllResourcesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - SearchAllResourcesRequest, SearchAllResourcesResponse, ResourceSearchResult> - pageContext = - PageContext.create( - callable, SEARCH_ALL_RESOURCES_PAGE_STR_DESC, request, context); - return SearchAllResourcesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT = - new PagedListResponseFactory< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - SearchAllIamPoliciesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult> - pageContext = - PageContext.create( - callable, SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC, request, context); - return SearchAllIamPoliciesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> - LIST_SAVED_QUERIES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListSavedQueriesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_SAVED_QUERIES_PAGE_STR_DESC, request, context); - return ListSavedQueriesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to exportAssets. */ - public UnaryCallSettings exportAssetsSettings() { - return exportAssetsSettings; - } - - /** Returns the object with the settings used for calls to exportAssets. */ - public OperationCallSettings - exportAssetsOperationSettings() { - return exportAssetsOperationSettings; - } - - /** Returns the object with the settings used for calls to listAssets. */ - public PagedCallSettings - listAssetsSettings() { - return listAssetsSettings; - } - - /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings - batchGetAssetsHistorySettings() { - return batchGetAssetsHistorySettings; - } - - /** Returns the object with the settings used for calls to createFeed. */ - public UnaryCallSettings createFeedSettings() { - return createFeedSettings; - } - - /** Returns the object with the settings used for calls to getFeed. */ - public UnaryCallSettings getFeedSettings() { - return getFeedSettings; - } - - /** Returns the object with the settings used for calls to listFeeds. */ - public UnaryCallSettings listFeedsSettings() { - return listFeedsSettings; - } - - /** Returns the object with the settings used for calls to updateFeed. */ - public UnaryCallSettings updateFeedSettings() { - return updateFeedSettings; - } - - /** Returns the object with the settings used for calls to deleteFeed. */ - public UnaryCallSettings deleteFeedSettings() { - return deleteFeedSettings; - } - - /** Returns the object with the settings used for calls to searchAllResources. */ - public PagedCallSettings< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return searchAllResourcesSettings; - } - - /** Returns the object with the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return searchAllIamPoliciesSettings; - } - - /** Returns the object with the settings used for calls to analyzeIamPolicy. */ - public UnaryCallSettings - analyzeIamPolicySettings() { - return analyzeIamPolicySettings; - } - - /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ - public UnaryCallSettings - analyzeIamPolicyLongrunningSettings() { - return analyzeIamPolicyLongrunningSettings; - } - - /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ - public OperationCallSettings< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationSettings() { - return analyzeIamPolicyLongrunningOperationSettings; - } - - /** Returns the object with the settings used for calls to analyzeMove. */ - public UnaryCallSettings analyzeMoveSettings() { - return analyzeMoveSettings; - } - - /** Returns the object with the settings used for calls to queryAssets. */ - public UnaryCallSettings queryAssetsSettings() { - return queryAssetsSettings; - } - - /** Returns the object with the settings used for calls to createSavedQuery. */ - public UnaryCallSettings createSavedQuerySettings() { - return createSavedQuerySettings; - } - - /** Returns the object with the settings used for calls to getSavedQuery. */ - public UnaryCallSettings getSavedQuerySettings() { - return getSavedQuerySettings; - } - - /** Returns the object with the settings used for calls to listSavedQueries. */ - public PagedCallSettings< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> - listSavedQueriesSettings() { - return listSavedQueriesSettings; - } - - /** Returns the object with the settings used for calls to updateSavedQuery. */ - public UnaryCallSettings updateSavedQuerySettings() { - return updateSavedQuerySettings; - } - - /** Returns the object with the settings used for calls to deleteSavedQuery. */ - public UnaryCallSettings deleteSavedQuerySettings() { - return deleteSavedQuerySettings; - } - - /** Returns the object with the settings used for calls to batchGetEffectiveIamPolicies. */ - public UnaryCallSettings< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesSettings() { - return batchGetEffectiveIamPoliciesSettings; - } - - public AssetServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAssetServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonAssetServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "cloudasset.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "cloudasset.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - exportAssetsSettings = settingsBuilder.exportAssetsSettings().build(); - exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build(); - listAssetsSettings = settingsBuilder.listAssetsSettings().build(); - batchGetAssetsHistorySettings = settingsBuilder.batchGetAssetsHistorySettings().build(); - createFeedSettings = settingsBuilder.createFeedSettings().build(); - getFeedSettings = settingsBuilder.getFeedSettings().build(); - listFeedsSettings = settingsBuilder.listFeedsSettings().build(); - updateFeedSettings = settingsBuilder.updateFeedSettings().build(); - deleteFeedSettings = settingsBuilder.deleteFeedSettings().build(); - searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build(); - searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build(); - analyzeIamPolicySettings = settingsBuilder.analyzeIamPolicySettings().build(); - analyzeIamPolicyLongrunningSettings = - settingsBuilder.analyzeIamPolicyLongrunningSettings().build(); - analyzeIamPolicyLongrunningOperationSettings = - settingsBuilder.analyzeIamPolicyLongrunningOperationSettings().build(); - analyzeMoveSettings = settingsBuilder.analyzeMoveSettings().build(); - queryAssetsSettings = settingsBuilder.queryAssetsSettings().build(); - createSavedQuerySettings = settingsBuilder.createSavedQuerySettings().build(); - getSavedQuerySettings = settingsBuilder.getSavedQuerySettings().build(); - listSavedQueriesSettings = settingsBuilder.listSavedQueriesSettings().build(); - updateSavedQuerySettings = settingsBuilder.updateSavedQuerySettings().build(); - deleteSavedQuerySettings = settingsBuilder.deleteSavedQuerySettings().build(); - batchGetEffectiveIamPoliciesSettings = - settingsBuilder.batchGetEffectiveIamPoliciesSettings().build(); - } - - /** Builder for AssetServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder exportAssetsSettings; - private final OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings; - private final PagedCallSettings.Builder< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> - listAssetsSettings; - private final UnaryCallSettings.Builder< - BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> - batchGetAssetsHistorySettings; - private final UnaryCallSettings.Builder createFeedSettings; - private final UnaryCallSettings.Builder getFeedSettings; - private final UnaryCallSettings.Builder listFeedsSettings; - private final UnaryCallSettings.Builder updateFeedSettings; - private final UnaryCallSettings.Builder deleteFeedSettings; - private final PagedCallSettings.Builder< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings; - private final PagedCallSettings.Builder< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings; - private final UnaryCallSettings.Builder - analyzeIamPolicySettings; - private final UnaryCallSettings.Builder - analyzeIamPolicyLongrunningSettings; - private final OperationCallSettings.Builder< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationSettings; - private final UnaryCallSettings.Builder - analyzeMoveSettings; - private final UnaryCallSettings.Builder - queryAssetsSettings; - private final UnaryCallSettings.Builder - createSavedQuerySettings; - private final UnaryCallSettings.Builder getSavedQuerySettings; - private final PagedCallSettings.Builder< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> - listSavedQueriesSettings; - private final UnaryCallSettings.Builder - updateSavedQuerySettings; - private final UnaryCallSettings.Builder - deleteSavedQuerySettings; - private final UnaryCallSettings.Builder< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_4_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_6_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("no_retry_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(30000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(30000L)) - .setTotalTimeout(Duration.ofMillis(30000L)) - .build(); - definitions.put("retry_policy_2_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("retry_policy_3_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(200000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(200000L)) - .setTotalTimeout(Duration.ofMillis(200000L)) - .build(); - definitions.put("retry_policy_4_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("retry_policy_6_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - exportAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - exportAssetsOperationSettings = OperationCallSettings.newBuilder(); - listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); - batchGetAssetsHistorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listFeedsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - searchAllResourcesSettings = PagedCallSettings.newBuilder(SEARCH_ALL_RESOURCES_PAGE_STR_FACT); - searchAllIamPoliciesSettings = - PagedCallSettings.newBuilder(SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT); - analyzeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - analyzeIamPolicyLongrunningSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - analyzeIamPolicyLongrunningOperationSettings = OperationCallSettings.newBuilder(); - analyzeMoveSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - queryAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listSavedQueriesSettings = PagedCallSettings.newBuilder(LIST_SAVED_QUERIES_PAGE_STR_FACT); - updateSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteSavedQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchGetEffectiveIamPoliciesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - exportAssetsSettings, - listAssetsSettings, - batchGetAssetsHistorySettings, - createFeedSettings, - getFeedSettings, - listFeedsSettings, - updateFeedSettings, - deleteFeedSettings, - searchAllResourcesSettings, - searchAllIamPoliciesSettings, - analyzeIamPolicySettings, - analyzeIamPolicyLongrunningSettings, - analyzeMoveSettings, - queryAssetsSettings, - createSavedQuerySettings, - getSavedQuerySettings, - listSavedQueriesSettings, - updateSavedQuerySettings, - deleteSavedQuerySettings, - batchGetEffectiveIamPoliciesSettings); - initDefaults(this); - } - - protected Builder(AssetServiceStubSettings settings) { - super(settings); - - exportAssetsSettings = settings.exportAssetsSettings.toBuilder(); - exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder(); - listAssetsSettings = settings.listAssetsSettings.toBuilder(); - batchGetAssetsHistorySettings = settings.batchGetAssetsHistorySettings.toBuilder(); - createFeedSettings = settings.createFeedSettings.toBuilder(); - getFeedSettings = settings.getFeedSettings.toBuilder(); - listFeedsSettings = settings.listFeedsSettings.toBuilder(); - updateFeedSettings = settings.updateFeedSettings.toBuilder(); - deleteFeedSettings = settings.deleteFeedSettings.toBuilder(); - searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder(); - searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder(); - analyzeIamPolicySettings = settings.analyzeIamPolicySettings.toBuilder(); - analyzeIamPolicyLongrunningSettings = - settings.analyzeIamPolicyLongrunningSettings.toBuilder(); - analyzeIamPolicyLongrunningOperationSettings = - settings.analyzeIamPolicyLongrunningOperationSettings.toBuilder(); - analyzeMoveSettings = settings.analyzeMoveSettings.toBuilder(); - queryAssetsSettings = settings.queryAssetsSettings.toBuilder(); - createSavedQuerySettings = settings.createSavedQuerySettings.toBuilder(); - getSavedQuerySettings = settings.getSavedQuerySettings.toBuilder(); - listSavedQueriesSettings = settings.listSavedQueriesSettings.toBuilder(); - updateSavedQuerySettings = settings.updateSavedQuerySettings.toBuilder(); - deleteSavedQuerySettings = settings.deleteSavedQuerySettings.toBuilder(); - batchGetEffectiveIamPoliciesSettings = - settings.batchGetEffectiveIamPoliciesSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - exportAssetsSettings, - listAssetsSettings, - batchGetAssetsHistorySettings, - createFeedSettings, - getFeedSettings, - listFeedsSettings, - updateFeedSettings, - deleteFeedSettings, - searchAllResourcesSettings, - searchAllIamPoliciesSettings, - analyzeIamPolicySettings, - analyzeIamPolicyLongrunningSettings, - analyzeMoveSettings, - queryAssetsSettings, - createSavedQuerySettings, - getSavedQuerySettings, - listSavedQueriesSettings, - updateSavedQuerySettings, - deleteSavedQuerySettings, - batchGetEffectiveIamPoliciesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .exportAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .listAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .batchGetAssetsHistorySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .createFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .getFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listFeedsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .updateFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .deleteFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .searchAllResourcesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .searchAllIamPoliciesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .analyzeIamPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .analyzeIamPolicyLongrunningSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .analyzeMoveSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .queryAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); - - builder - .createSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .getSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listSavedQueriesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .updateSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .deleteSavedQuerySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .batchGetEffectiveIamPoliciesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - - builder - .exportAssetsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(ExportAssetsResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ExportAssetsRequest.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - builder - .analyzeIamPolicyLongrunningOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create( - AnalyzeIamPolicyLongrunningResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create( - AnalyzeIamPolicyLongrunningMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - public UnaryCallSettings.Builder exportAssetsSettings() { - return exportAssetsSettings; - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings() { - return exportAssetsOperationSettings; - } - - /** Returns the builder for the settings used for calls to listAssets. */ - public PagedCallSettings.Builder - listAssetsSettings() { - return listAssetsSettings; - } - - /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ - public UnaryCallSettings.Builder - batchGetAssetsHistorySettings() { - return batchGetAssetsHistorySettings; - } - - /** Returns the builder for the settings used for calls to createFeed. */ - public UnaryCallSettings.Builder createFeedSettings() { - return createFeedSettings; - } - - /** Returns the builder for the settings used for calls to getFeed. */ - public UnaryCallSettings.Builder getFeedSettings() { - return getFeedSettings; - } - - /** Returns the builder for the settings used for calls to listFeeds. */ - public UnaryCallSettings.Builder listFeedsSettings() { - return listFeedsSettings; - } - - /** Returns the builder for the settings used for calls to updateFeed. */ - public UnaryCallSettings.Builder updateFeedSettings() { - return updateFeedSettings; - } - - /** Returns the builder for the settings used for calls to deleteFeed. */ - public UnaryCallSettings.Builder deleteFeedSettings() { - return deleteFeedSettings; - } - - /** Returns the builder for the settings used for calls to searchAllResources. */ - public PagedCallSettings.Builder< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return searchAllResourcesSettings; - } - - /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings.Builder< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return searchAllIamPoliciesSettings; - } - - /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ - public UnaryCallSettings.Builder - analyzeIamPolicySettings() { - return analyzeIamPolicySettings; - } - - /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ - public UnaryCallSettings.Builder - analyzeIamPolicyLongrunningSettings() { - return analyzeIamPolicyLongrunningSettings; - } - - /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationSettings() { - return analyzeIamPolicyLongrunningOperationSettings; - } - - /** Returns the builder for the settings used for calls to analyzeMove. */ - public UnaryCallSettings.Builder - analyzeMoveSettings() { - return analyzeMoveSettings; - } - - /** Returns the builder for the settings used for calls to queryAssets. */ - public UnaryCallSettings.Builder - queryAssetsSettings() { - return queryAssetsSettings; - } - - /** Returns the builder for the settings used for calls to createSavedQuery. */ - public UnaryCallSettings.Builder - createSavedQuerySettings() { - return createSavedQuerySettings; - } - - /** Returns the builder for the settings used for calls to getSavedQuery. */ - public UnaryCallSettings.Builder getSavedQuerySettings() { - return getSavedQuerySettings; - } - - /** Returns the builder for the settings used for calls to listSavedQueries. */ - public PagedCallSettings.Builder< - ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse> - listSavedQueriesSettings() { - return listSavedQueriesSettings; - } - - /** Returns the builder for the settings used for calls to updateSavedQuery. */ - public UnaryCallSettings.Builder - updateSavedQuerySettings() { - return updateSavedQuerySettings; - } - - /** Returns the builder for the settings used for calls to deleteSavedQuery. */ - public UnaryCallSettings.Builder deleteSavedQuerySettings() { - return deleteSavedQuerySettings; - } - - /** Returns the builder for the settings used for calls to batchGetEffectiveIamPolicies. */ - public UnaryCallSettings.Builder< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesSettings() { - return batchGetEffectiveIamPoliciesSettings; - } - - @Override - public AssetServiceStubSettings build() throws IOException { - return new AssetServiceStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java deleted file mode 100644 index bdd77c3c5e1f..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 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.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java deleted file mode 100644 index 808791245058..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java +++ /dev/null @@ -1,870 +0,0 @@ -/* - * Copyright 2022 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.v1.stub; - -import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; -import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; -import com.google.cloud.asset.v1.AnalyzeMoveRequest; -import com.google.cloud.asset.v1.AnalyzeMoveResponse; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; -import com.google.cloud.asset.v1.CreateFeedRequest; -import com.google.cloud.asset.v1.CreateSavedQueryRequest; -import com.google.cloud.asset.v1.DeleteFeedRequest; -import com.google.cloud.asset.v1.DeleteSavedQueryRequest; -import com.google.cloud.asset.v1.ExportAssetsRequest; -import com.google.cloud.asset.v1.ExportAssetsResponse; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.GetFeedRequest; -import com.google.cloud.asset.v1.GetSavedQueryRequest; -import com.google.cloud.asset.v1.ListAssetsRequest; -import com.google.cloud.asset.v1.ListAssetsResponse; -import com.google.cloud.asset.v1.ListFeedsRequest; -import com.google.cloud.asset.v1.ListFeedsResponse; -import com.google.cloud.asset.v1.ListSavedQueriesRequest; -import com.google.cloud.asset.v1.ListSavedQueriesResponse; -import com.google.cloud.asset.v1.QueryAssetsRequest; -import com.google.cloud.asset.v1.QueryAssetsResponse; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1.SearchAllResourcesResponse; -import com.google.cloud.asset.v1.UpdateFeedRequest; -import com.google.cloud.asset.v1.UpdateSavedQueryRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcAssetServiceStub extends AssetServiceStub { - private static final MethodDescriptor - exportAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/ExportAssets") - .setRequestMarshaller(ProtoUtils.marshaller(ExportAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/ListAssets") - .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - batchGetAssetsHistoryMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetAssetsHistory") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchGetAssetsHistoryRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchGetAssetsHistoryResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor createFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/CreateFeed") - .setRequestMarshaller(ProtoUtils.marshaller(CreateFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/GetFeed") - .setRequestMarshaller(ProtoUtils.marshaller(GetFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listFeedsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/ListFeeds") - .setRequestMarshaller(ProtoUtils.marshaller(ListFeedsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListFeedsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updateFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateFeed") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - searchAllResourcesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllResources") - .setRequestMarshaller( - ProtoUtils.marshaller(SearchAllResourcesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SearchAllResourcesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - searchAllIamPoliciesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllIamPolicies") - .setRequestMarshaller( - ProtoUtils.marshaller(SearchAllIamPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SearchAllIamPoliciesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - analyzeIamPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(AnalyzeIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(AnalyzeIamPolicyResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - analyzeIamPolicyLongrunningMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicyLongrunning") - .setRequestMarshaller( - ProtoUtils.marshaller(AnalyzeIamPolicyLongrunningRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - analyzeMoveMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeMove") - .setRequestMarshaller(ProtoUtils.marshaller(AnalyzeMoveRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(AnalyzeMoveResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - queryAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/QueryAssets") - .setRequestMarshaller(ProtoUtils.marshaller(QueryAssetsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(QueryAssetsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createSavedQueryMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/CreateSavedQuery") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getSavedQueryMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/GetSavedQuery") - .setRequestMarshaller( - ProtoUtils.marshaller(GetSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listSavedQueriesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/ListSavedQueries") - .setRequestMarshaller( - ProtoUtils.marshaller(ListSavedQueriesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListSavedQueriesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateSavedQueryMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateSavedQuery") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteSavedQueryMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteSavedQuery") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesMethodDescriptor = - MethodDescriptor - . - newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetEffectiveIamPolicies") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable exportAssetsCallable; - private final OperationCallable - exportAssetsOperationCallable; - private final UnaryCallable listAssetsCallable; - private final UnaryCallable listAssetsPagedCallable; - private final UnaryCallable - batchGetAssetsHistoryCallable; - private final UnaryCallable createFeedCallable; - private final UnaryCallable getFeedCallable; - private final UnaryCallable listFeedsCallable; - private final UnaryCallable updateFeedCallable; - private final UnaryCallable deleteFeedCallable; - private final UnaryCallable - searchAllResourcesCallable; - private final UnaryCallable - searchAllResourcesPagedCallable; - private final UnaryCallable - searchAllIamPoliciesCallable; - private final UnaryCallable - searchAllIamPoliciesPagedCallable; - private final UnaryCallable - analyzeIamPolicyCallable; - private final UnaryCallable - analyzeIamPolicyLongrunningCallable; - private final OperationCallable< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationCallable; - private final UnaryCallable analyzeMoveCallable; - private final UnaryCallable queryAssetsCallable; - private final UnaryCallable createSavedQueryCallable; - private final UnaryCallable getSavedQueryCallable; - private final UnaryCallable - listSavedQueriesCallable; - private final UnaryCallable - listSavedQueriesPagedCallable; - private final UnaryCallable updateSavedQueryCallable; - private final UnaryCallable deleteSavedQueryCallable; - private final UnaryCallable< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { - return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAssetServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAssetServiceStub( - AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings exportAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportAssetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings listAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listAssetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings - batchGetAssetsHistoryTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(batchGetAssetsHistoryMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings createFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listFeedsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listFeedsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("feed.name", String.valueOf(request.getFeed().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - searchAllResourcesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(searchAllResourcesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("scope", String.valueOf(request.getScope())); - return params.build(); - }) - .build(); - GrpcCallSettings - searchAllIamPoliciesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("scope", String.valueOf(request.getScope())); - return params.build(); - }) - .build(); - GrpcCallSettings - analyzeIamPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(analyzeIamPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "analysis_query.scope", - String.valueOf(request.getAnalysisQuery().getScope())); - return params.build(); - }) - .build(); - GrpcCallSettings - analyzeIamPolicyLongrunningTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(analyzeIamPolicyLongrunningMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "analysis_query.scope", - String.valueOf(request.getAnalysisQuery().getScope())); - return params.build(); - }) - .build(); - GrpcCallSettings analyzeMoveTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(analyzeMoveMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("resource", String.valueOf(request.getResource())); - return params.build(); - }) - .build(); - GrpcCallSettings queryAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(queryAssetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings createSavedQueryTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createSavedQueryMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getSavedQueryTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getSavedQueryMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listSavedQueriesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listSavedQueriesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateSavedQueryTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateSavedQueryMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("saved_query.name", String.valueOf(request.getSavedQuery().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteSavedQueryTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteSavedQueryMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - batchGetEffectiveIamPoliciesTransportSettings = - GrpcCallSettings - . - newBuilder() - .setMethodDescriptor(batchGetEffectiveIamPoliciesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("scope", String.valueOf(request.getScope())); - return params.build(); - }) - .build(); - - this.exportAssetsCallable = - callableFactory.createUnaryCallable( - exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); - this.exportAssetsOperationCallable = - callableFactory.createOperationCallable( - exportAssetsTransportSettings, - settings.exportAssetsOperationSettings(), - clientContext, - operationsStub); - this.listAssetsCallable = - callableFactory.createUnaryCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listAssetsPagedCallable = - callableFactory.createPagedCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.batchGetAssetsHistoryCallable = - callableFactory.createUnaryCallable( - batchGetAssetsHistoryTransportSettings, - settings.batchGetAssetsHistorySettings(), - clientContext); - this.createFeedCallable = - callableFactory.createUnaryCallable( - createFeedTransportSettings, settings.createFeedSettings(), clientContext); - this.getFeedCallable = - callableFactory.createUnaryCallable( - getFeedTransportSettings, settings.getFeedSettings(), clientContext); - this.listFeedsCallable = - callableFactory.createUnaryCallable( - listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); - this.updateFeedCallable = - callableFactory.createUnaryCallable( - updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); - this.deleteFeedCallable = - callableFactory.createUnaryCallable( - deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); - this.searchAllResourcesCallable = - callableFactory.createUnaryCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllResourcesPagedCallable = - callableFactory.createPagedCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllIamPoliciesCallable = - callableFactory.createUnaryCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - this.searchAllIamPoliciesPagedCallable = - callableFactory.createPagedCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - this.analyzeIamPolicyCallable = - callableFactory.createUnaryCallable( - analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); - this.analyzeIamPolicyLongrunningCallable = - callableFactory.createUnaryCallable( - analyzeIamPolicyLongrunningTransportSettings, - settings.analyzeIamPolicyLongrunningSettings(), - clientContext); - this.analyzeIamPolicyLongrunningOperationCallable = - callableFactory.createOperationCallable( - analyzeIamPolicyLongrunningTransportSettings, - settings.analyzeIamPolicyLongrunningOperationSettings(), - clientContext, - operationsStub); - this.analyzeMoveCallable = - callableFactory.createUnaryCallable( - analyzeMoveTransportSettings, settings.analyzeMoveSettings(), clientContext); - this.queryAssetsCallable = - callableFactory.createUnaryCallable( - queryAssetsTransportSettings, settings.queryAssetsSettings(), clientContext); - this.createSavedQueryCallable = - callableFactory.createUnaryCallable( - createSavedQueryTransportSettings, settings.createSavedQuerySettings(), clientContext); - this.getSavedQueryCallable = - callableFactory.createUnaryCallable( - getSavedQueryTransportSettings, settings.getSavedQuerySettings(), clientContext); - this.listSavedQueriesCallable = - callableFactory.createUnaryCallable( - listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); - this.listSavedQueriesPagedCallable = - callableFactory.createPagedCallable( - listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); - this.updateSavedQueryCallable = - callableFactory.createUnaryCallable( - updateSavedQueryTransportSettings, settings.updateSavedQuerySettings(), clientContext); - this.deleteSavedQueryCallable = - callableFactory.createUnaryCallable( - deleteSavedQueryTransportSettings, settings.deleteSavedQuerySettings(), clientContext); - this.batchGetEffectiveIamPoliciesCallable = - callableFactory.createUnaryCallable( - batchGetEffectiveIamPoliciesTransportSettings, - settings.batchGetEffectiveIamPoliciesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable exportAssetsCallable() { - return exportAssetsCallable; - } - - @Override - public OperationCallable - exportAssetsOperationCallable() { - return exportAssetsOperationCallable; - } - - @Override - public UnaryCallable listAssetsCallable() { - return listAssetsCallable; - } - - @Override - public UnaryCallable listAssetsPagedCallable() { - return listAssetsPagedCallable; - } - - @Override - public UnaryCallable - batchGetAssetsHistoryCallable() { - return batchGetAssetsHistoryCallable; - } - - @Override - public UnaryCallable createFeedCallable() { - return createFeedCallable; - } - - @Override - public UnaryCallable getFeedCallable() { - return getFeedCallable; - } - - @Override - public UnaryCallable listFeedsCallable() { - return listFeedsCallable; - } - - @Override - public UnaryCallable updateFeedCallable() { - return updateFeedCallable; - } - - @Override - public UnaryCallable deleteFeedCallable() { - return deleteFeedCallable; - } - - @Override - public UnaryCallable - searchAllResourcesCallable() { - return searchAllResourcesCallable; - } - - @Override - public UnaryCallable - searchAllResourcesPagedCallable() { - return searchAllResourcesPagedCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesCallable() { - return searchAllIamPoliciesCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesPagedCallable() { - return searchAllIamPoliciesPagedCallable; - } - - @Override - public UnaryCallable - analyzeIamPolicyCallable() { - return analyzeIamPolicyCallable; - } - - @Override - public UnaryCallable - analyzeIamPolicyLongrunningCallable() { - return analyzeIamPolicyLongrunningCallable; - } - - @Override - public OperationCallable< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationCallable() { - return analyzeIamPolicyLongrunningOperationCallable; - } - - @Override - public UnaryCallable analyzeMoveCallable() { - return analyzeMoveCallable; - } - - @Override - public UnaryCallable queryAssetsCallable() { - return queryAssetsCallable; - } - - @Override - public UnaryCallable createSavedQueryCallable() { - return createSavedQueryCallable; - } - - @Override - public UnaryCallable getSavedQueryCallable() { - return getSavedQueryCallable; - } - - @Override - public UnaryCallable - listSavedQueriesCallable() { - return listSavedQueriesCallable; - } - - @Override - public UnaryCallable - listSavedQueriesPagedCallable() { - return listSavedQueriesPagedCallable; - } - - @Override - public UnaryCallable updateSavedQueryCallable() { - return updateSavedQueryCallable; - } - - @Override - public UnaryCallable deleteSavedQueryCallable() { - return deleteSavedQueryCallable; - } - - @Override - public UnaryCallable - batchGetEffectiveIamPoliciesCallable() { - return batchGetEffectiveIamPoliciesCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java deleted file mode 100644 index 08af9f93427f..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 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.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonAssetServiceCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java deleted file mode 100644 index a646b0278b52..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/HttpJsonAssetServiceStub.java +++ /dev/null @@ -1,1359 +0,0 @@ -/* - * Copyright 2022 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.v1.stub; - -import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; -import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; -import com.google.cloud.asset.v1.AnalyzeMoveRequest; -import com.google.cloud.asset.v1.AnalyzeMoveResponse; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; -import com.google.cloud.asset.v1.CreateFeedRequest; -import com.google.cloud.asset.v1.CreateSavedQueryRequest; -import com.google.cloud.asset.v1.DeleteFeedRequest; -import com.google.cloud.asset.v1.DeleteSavedQueryRequest; -import com.google.cloud.asset.v1.ExportAssetsRequest; -import com.google.cloud.asset.v1.ExportAssetsResponse; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.GetFeedRequest; -import com.google.cloud.asset.v1.GetSavedQueryRequest; -import com.google.cloud.asset.v1.ListAssetsRequest; -import com.google.cloud.asset.v1.ListAssetsResponse; -import com.google.cloud.asset.v1.ListFeedsRequest; -import com.google.cloud.asset.v1.ListFeedsResponse; -import com.google.cloud.asset.v1.ListSavedQueriesRequest; -import com.google.cloud.asset.v1.ListSavedQueriesResponse; -import com.google.cloud.asset.v1.QueryAssetsRequest; -import com.google.cloud.asset.v1.QueryAssetsResponse; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1.SearchAllResourcesResponse; -import com.google.cloud.asset.v1.UpdateFeedRequest; -import com.google.cloud.asset.v1.UpdateSavedQueryRequest; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonAssetServiceStub extends AssetServiceStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(AnalyzeIamPolicyLongrunningMetadata.getDescriptor()) - .add(ExportAssetsResponse.getDescriptor()) - .add(AnalyzeIamPolicyLongrunningResponse.getDescriptor()) - .add(ExportAssetsRequest.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - exportAssetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/ExportAssets") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}:exportAssets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (ExportAssetsRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - listAssetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/ListAssets") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}/assets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "assetTypes", request.getAssetTypesList()); - serializer.putQueryParam( - fields, "contentType", request.getContentType()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "readTime", request.getReadTime()); - serializer.putQueryParam( - fields, "relationshipTypes", request.getRelationshipTypesList()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> - batchGetAssetsHistoryMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetAssetsHistory") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}:batchGetAssetsHistory", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "assetNames", request.getAssetNamesList()); - serializer.putQueryParam( - fields, "contentType", request.getContentType()); - serializer.putQueryParam( - fields, "readTimeWindow", request.getReadTimeWindow()); - serializer.putQueryParam( - fields, "relationshipTypes", request.getRelationshipTypesList()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchGetAssetsHistoryResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor createFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/CreateFeed") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}/feeds", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Feed.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/GetFeed") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=*/*/feeds/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Feed.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listFeedsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/ListFeeds") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}/feeds", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListFeedsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor updateFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateFeed") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{feed.name=*/*/feeds/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "feed.name", request.getFeed().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Feed.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor deleteFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=*/*/feeds/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - searchAllResourcesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllResources") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{scope=*/*}:searchAllResources", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "scope", request.getScope()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "assetTypes", request.getAssetTypesList()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "query", request.getQuery()); - serializer.putQueryParam(fields, "readMask", request.getReadMask()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchAllResourcesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> - searchAllIamPoliciesMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/SearchAllIamPolicies") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{scope=*/*}:searchAllIamPolicies", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "scope", request.getScope()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "assetTypes", request.getAssetTypesList()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "query", request.getQuery()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchAllIamPoliciesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - analyzeIamPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicy") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{analysisQuery.scope=*/*}:analyzeIamPolicy", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "analysisQuery.scope", - request.getAnalysisQuery().getScope()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "analysisQuery", request.getAnalysisQuery()); - serializer.putQueryParam( - fields, "executionTimeout", request.getExecutionTimeout()); - serializer.putQueryParam( - fields, "savedAnalysisQuery", request.getSavedAnalysisQuery()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AnalyzeIamPolicyResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - analyzeIamPolicyLongrunningMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicyLongrunning") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{analysisQuery.scope=*/*}:analyzeIamPolicyLongrunning", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, - "analysisQuery.scope", - request.getAnalysisQuery().getScope()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (AnalyzeIamPolicyLongrunningRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - analyzeMoveMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeMove") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{resource=*/*}:analyzeMove", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "resource", request.getResource()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "destinationParent", request.getDestinationParent()); - serializer.putQueryParam(fields, "view", request.getView()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(AnalyzeMoveResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - queryAssetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/QueryAssets") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}:queryAssets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(QueryAssetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createSavedQueryMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/CreateSavedQuery") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}/savedQueries", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "savedQueryId", request.getSavedQueryId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("savedQuery", request.getSavedQuery(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SavedQuery.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getSavedQueryMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/GetSavedQuery") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=*/*/savedQueries/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SavedQuery.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listSavedQueriesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/ListSavedQueries") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=*/*}/savedQueries", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListSavedQueriesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateSavedQueryMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateSavedQuery") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{savedQuery.name=*/*/savedQueries/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "savedQuery.name", request.getSavedQuery().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("savedQuery", request.getSavedQuery(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SavedQuery.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteSavedQueryMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteSavedQuery") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=*/*/savedQueries/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() - .setFullMethodName("google.cloud.asset.v1.AssetService/BatchGetEffectiveIamPolicies") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{scope=*/*}/effectiveIamPolicies:batchGet", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "scope", request.getScope()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "names", request.getNamesList()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(BatchGetEffectiveIamPoliciesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable exportAssetsCallable; - private final OperationCallable - exportAssetsOperationCallable; - private final UnaryCallable listAssetsCallable; - private final UnaryCallable listAssetsPagedCallable; - private final UnaryCallable - batchGetAssetsHistoryCallable; - private final UnaryCallable createFeedCallable; - private final UnaryCallable getFeedCallable; - private final UnaryCallable listFeedsCallable; - private final UnaryCallable updateFeedCallable; - private final UnaryCallable deleteFeedCallable; - private final UnaryCallable - searchAllResourcesCallable; - private final UnaryCallable - searchAllResourcesPagedCallable; - private final UnaryCallable - searchAllIamPoliciesCallable; - private final UnaryCallable - searchAllIamPoliciesPagedCallable; - private final UnaryCallable - analyzeIamPolicyCallable; - private final UnaryCallable - analyzeIamPolicyLongrunningCallable; - private final OperationCallable< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationCallable; - private final UnaryCallable analyzeMoveCallable; - private final UnaryCallable queryAssetsCallable; - private final UnaryCallable createSavedQueryCallable; - private final UnaryCallable getSavedQueryCallable; - private final UnaryCallable - listSavedQueriesCallable; - private final UnaryCallable - listSavedQueriesPagedCallable; - private final UnaryCallable updateSavedQueryCallable; - private final UnaryCallable deleteSavedQueryCallable; - private final UnaryCallable< - BatchGetEffectiveIamPoliciesRequest, BatchGetEffectiveIamPoliciesResponse> - batchGetEffectiveIamPoliciesCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonAssetServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonAssetServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings exportAssetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(exportAssetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listAssetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listAssetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - batchGetAssetsHistoryTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(batchGetAssetsHistoryMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listFeedsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listFeedsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - searchAllResourcesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(searchAllResourcesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - searchAllIamPoliciesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - analyzeIamPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(analyzeIamPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - analyzeIamPolicyLongrunningTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(analyzeIamPolicyLongrunningMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings analyzeMoveTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(analyzeMoveMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings queryAssetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(queryAssetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createSavedQueryTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createSavedQueryMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getSavedQueryTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getSavedQueryMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listSavedQueriesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listSavedQueriesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateSavedQueryTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateSavedQueryMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteSavedQueryTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteSavedQueryMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - batchGetEffectiveIamPoliciesTransportSettings = - HttpJsonCallSettings - . - newBuilder() - .setMethodDescriptor(batchGetEffectiveIamPoliciesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.exportAssetsCallable = - callableFactory.createUnaryCallable( - exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); - this.exportAssetsOperationCallable = - callableFactory.createOperationCallable( - exportAssetsTransportSettings, - settings.exportAssetsOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.listAssetsCallable = - callableFactory.createUnaryCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listAssetsPagedCallable = - callableFactory.createPagedCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.batchGetAssetsHistoryCallable = - callableFactory.createUnaryCallable( - batchGetAssetsHistoryTransportSettings, - settings.batchGetAssetsHistorySettings(), - clientContext); - this.createFeedCallable = - callableFactory.createUnaryCallable( - createFeedTransportSettings, settings.createFeedSettings(), clientContext); - this.getFeedCallable = - callableFactory.createUnaryCallable( - getFeedTransportSettings, settings.getFeedSettings(), clientContext); - this.listFeedsCallable = - callableFactory.createUnaryCallable( - listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); - this.updateFeedCallable = - callableFactory.createUnaryCallable( - updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); - this.deleteFeedCallable = - callableFactory.createUnaryCallable( - deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); - this.searchAllResourcesCallable = - callableFactory.createUnaryCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllResourcesPagedCallable = - callableFactory.createPagedCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllIamPoliciesCallable = - callableFactory.createUnaryCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - this.searchAllIamPoliciesPagedCallable = - callableFactory.createPagedCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - this.analyzeIamPolicyCallable = - callableFactory.createUnaryCallable( - analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); - this.analyzeIamPolicyLongrunningCallable = - callableFactory.createUnaryCallable( - analyzeIamPolicyLongrunningTransportSettings, - settings.analyzeIamPolicyLongrunningSettings(), - clientContext); - this.analyzeIamPolicyLongrunningOperationCallable = - callableFactory.createOperationCallable( - analyzeIamPolicyLongrunningTransportSettings, - settings.analyzeIamPolicyLongrunningOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.analyzeMoveCallable = - callableFactory.createUnaryCallable( - analyzeMoveTransportSettings, settings.analyzeMoveSettings(), clientContext); - this.queryAssetsCallable = - callableFactory.createUnaryCallable( - queryAssetsTransportSettings, settings.queryAssetsSettings(), clientContext); - this.createSavedQueryCallable = - callableFactory.createUnaryCallable( - createSavedQueryTransportSettings, settings.createSavedQuerySettings(), clientContext); - this.getSavedQueryCallable = - callableFactory.createUnaryCallable( - getSavedQueryTransportSettings, settings.getSavedQuerySettings(), clientContext); - this.listSavedQueriesCallable = - callableFactory.createUnaryCallable( - listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); - this.listSavedQueriesPagedCallable = - callableFactory.createPagedCallable( - listSavedQueriesTransportSettings, settings.listSavedQueriesSettings(), clientContext); - this.updateSavedQueryCallable = - callableFactory.createUnaryCallable( - updateSavedQueryTransportSettings, settings.updateSavedQuerySettings(), clientContext); - this.deleteSavedQueryCallable = - callableFactory.createUnaryCallable( - deleteSavedQueryTransportSettings, settings.deleteSavedQuerySettings(), clientContext); - this.batchGetEffectiveIamPoliciesCallable = - callableFactory.createUnaryCallable( - batchGetEffectiveIamPoliciesTransportSettings, - settings.batchGetEffectiveIamPoliciesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(exportAssetsMethodDescriptor); - methodDescriptors.add(listAssetsMethodDescriptor); - methodDescriptors.add(batchGetAssetsHistoryMethodDescriptor); - methodDescriptors.add(createFeedMethodDescriptor); - methodDescriptors.add(getFeedMethodDescriptor); - methodDescriptors.add(listFeedsMethodDescriptor); - methodDescriptors.add(updateFeedMethodDescriptor); - methodDescriptors.add(deleteFeedMethodDescriptor); - methodDescriptors.add(searchAllResourcesMethodDescriptor); - methodDescriptors.add(searchAllIamPoliciesMethodDescriptor); - methodDescriptors.add(analyzeIamPolicyMethodDescriptor); - methodDescriptors.add(analyzeIamPolicyLongrunningMethodDescriptor); - methodDescriptors.add(analyzeMoveMethodDescriptor); - methodDescriptors.add(queryAssetsMethodDescriptor); - methodDescriptors.add(createSavedQueryMethodDescriptor); - methodDescriptors.add(getSavedQueryMethodDescriptor); - methodDescriptors.add(listSavedQueriesMethodDescriptor); - methodDescriptors.add(updateSavedQueryMethodDescriptor); - methodDescriptors.add(deleteSavedQueryMethodDescriptor); - methodDescriptors.add(batchGetEffectiveIamPoliciesMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable exportAssetsCallable() { - return exportAssetsCallable; - } - - @Override - public OperationCallable - exportAssetsOperationCallable() { - return exportAssetsOperationCallable; - } - - @Override - public UnaryCallable listAssetsCallable() { - return listAssetsCallable; - } - - @Override - public UnaryCallable listAssetsPagedCallable() { - return listAssetsPagedCallable; - } - - @Override - public UnaryCallable - batchGetAssetsHistoryCallable() { - return batchGetAssetsHistoryCallable; - } - - @Override - public UnaryCallable createFeedCallable() { - return createFeedCallable; - } - - @Override - public UnaryCallable getFeedCallable() { - return getFeedCallable; - } - - @Override - public UnaryCallable listFeedsCallable() { - return listFeedsCallable; - } - - @Override - public UnaryCallable updateFeedCallable() { - return updateFeedCallable; - } - - @Override - public UnaryCallable deleteFeedCallable() { - return deleteFeedCallable; - } - - @Override - public UnaryCallable - searchAllResourcesCallable() { - return searchAllResourcesCallable; - } - - @Override - public UnaryCallable - searchAllResourcesPagedCallable() { - return searchAllResourcesPagedCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesCallable() { - return searchAllIamPoliciesCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesPagedCallable() { - return searchAllIamPoliciesPagedCallable; - } - - @Override - public UnaryCallable - analyzeIamPolicyCallable() { - return analyzeIamPolicyCallable; - } - - @Override - public UnaryCallable - analyzeIamPolicyLongrunningCallable() { - return analyzeIamPolicyLongrunningCallable; - } - - @Override - public OperationCallable< - AnalyzeIamPolicyLongrunningRequest, - AnalyzeIamPolicyLongrunningResponse, - AnalyzeIamPolicyLongrunningMetadata> - analyzeIamPolicyLongrunningOperationCallable() { - return analyzeIamPolicyLongrunningOperationCallable; - } - - @Override - public UnaryCallable analyzeMoveCallable() { - return analyzeMoveCallable; - } - - @Override - public UnaryCallable queryAssetsCallable() { - return queryAssetsCallable; - } - - @Override - public UnaryCallable createSavedQueryCallable() { - return createSavedQueryCallable; - } - - @Override - public UnaryCallable getSavedQueryCallable() { - return getSavedQueryCallable; - } - - @Override - public UnaryCallable - listSavedQueriesCallable() { - return listSavedQueriesCallable; - } - - @Override - public UnaryCallable - listSavedQueriesPagedCallable() { - return listSavedQueriesPagedCallable; - } - - @Override - public UnaryCallable updateSavedQueryCallable() { - return updateSavedQueryCallable; - } - - @Override - public UnaryCallable deleteSavedQueryCallable() { - return deleteSavedQueryCallable; - } - - @Override - public UnaryCallable - batchGetEffectiveIamPoliciesCallable() { - return batchGetEffectiveIamPoliciesCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java deleted file mode 100644 index 54b289b05399..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientHttpJsonTest.java +++ /dev/null @@ -1,1769 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.api.resourcenames.ResourceName; -import com.google.cloud.asset.v1.stub.HttpJsonAssetServiceStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Duration; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.type.Expr; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonAssetServiceStub.getMethodDescriptors(), - AssetServiceSettings.getDefaultEndpoint()); - AssetServiceSettings settings = - AssetServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void exportAssetsTest() throws Exception { - ExportAssetsResponse expectedResponse = - ExportAssetsResponse.newBuilder() - .setReadTime(Timestamp.newBuilder().build()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .setOutputResult(OutputResult.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportAssetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - - ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void exportAssetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - client.exportAssetsAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void listAssetsTest() throws Exception { - Asset responsesElement = Asset.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllAssets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ResourceName parent = FolderName.of("[FOLDER]"); - - ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAssetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ResourceName parent = FolderName.of("[FOLDER]"); - client.listAssets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAssetsTest2() throws Exception { - Asset responsesElement = Asset.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllAssets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-4715/parent-4715"; - - ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAssetsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-4715/parent-4715"; - client.listAssets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchGetAssetsHistoryTest() throws Exception { - BatchGetAssetsHistoryResponse expectedResponse = - BatchGetAssetsHistoryResponse.newBuilder() - .addAllAssets(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .addAllAssetNames(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setReadTimeWindow(TimeWindow.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - - BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchGetAssetsHistoryExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .addAllAssetNames(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setReadTimeWindow(TimeWindow.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - client.batchGetAssetsHistory(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-4715/parent-4715"; - - Feed actualResponse = client.createFeed(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-4715/parent-4715"; - client.createFeed(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest2() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "name-2459/name-2459/feeds/feed-2459"; - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFeedExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "name-2459/name-2459/feeds/feed-2459"; - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFeedsTest() throws Exception { - ListFeedsResponse expectedResponse = - ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-4715/parent-4715"; - - ListFeedsResponse actualResponse = client.listFeeds(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFeedsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-4715/parent-4715"; - client.listFeeds(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - Feed feed = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - - Feed actualResponse = client.updateFeed(feed); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Feed feed = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - client.updateFeed(feed); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - client.deleteFeed(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "name-2459/name-2459/feeds/feed-2459"; - - client.deleteFeed(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFeedExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "name-2459/name-2459/feeds/feed-2459"; - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void searchAllResourcesTest() throws Exception { - ResourceSearchResult responsesElement = ResourceSearchResult.newBuilder().build(); - SearchAllResourcesResponse expectedResponse = - SearchAllResourcesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - - SearchAllResourcesPagedResponse pagedListResponse = - client.searchAllResources(scope, query, assetTypes); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void searchAllResourcesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - client.searchAllResources(scope, query, assetTypes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void searchAllIamPoliciesTest() throws Exception { - IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); - SearchAllIamPoliciesResponse expectedResponse = - SearchAllIamPoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - - SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void searchAllIamPoliciesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - client.searchAllIamPolicies(scope, query); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void analyzeIamPolicyTest() throws Exception { - AnalyzeIamPolicyResponse expectedResponse = - AnalyzeIamPolicyResponse.newBuilder() - .setMainAnalysis(AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder().build()) - .addAllServiceAccountImpersonationAnalysis( - new ArrayList()) - .setFullyExplored(true) - .build(); - mockService.addResponse(expectedResponse); - - AnalyzeIamPolicyRequest request = - AnalyzeIamPolicyRequest.newBuilder() - .setAnalysisQuery( - IamPolicyAnalysisQuery.newBuilder() - .setScope("scope-2319/scope-2319") - .setResourceSelector( - IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) - .setIdentitySelector( - IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) - .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) - .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) - .setConditionContext( - IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) - .build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setExecutionTimeout(Duration.newBuilder().build()) - .build(); - - AnalyzeIamPolicyResponse actualResponse = client.analyzeIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void analyzeIamPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AnalyzeIamPolicyRequest request = - AnalyzeIamPolicyRequest.newBuilder() - .setAnalysisQuery( - IamPolicyAnalysisQuery.newBuilder() - .setScope("scope-2319/scope-2319") - .setResourceSelector( - IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) - .setIdentitySelector( - IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) - .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) - .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) - .setConditionContext( - IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) - .build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setExecutionTimeout(Duration.newBuilder().build()) - .build(); - client.analyzeIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void analyzeIamPolicyLongrunningTest() throws Exception { - AnalyzeIamPolicyLongrunningResponse expectedResponse = - AnalyzeIamPolicyLongrunningResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("analyzeIamPolicyLongrunningTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - AnalyzeIamPolicyLongrunningRequest request = - AnalyzeIamPolicyLongrunningRequest.newBuilder() - .setAnalysisQuery( - IamPolicyAnalysisQuery.newBuilder() - .setScope("scope-2319/scope-2319") - .setResourceSelector( - IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) - .setIdentitySelector( - IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) - .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) - .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) - .setConditionContext( - IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) - .build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) - .build(); - - AnalyzeIamPolicyLongrunningResponse actualResponse = - client.analyzeIamPolicyLongrunningAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void analyzeIamPolicyLongrunningExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AnalyzeIamPolicyLongrunningRequest request = - AnalyzeIamPolicyLongrunningRequest.newBuilder() - .setAnalysisQuery( - IamPolicyAnalysisQuery.newBuilder() - .setScope("scope-2319/scope-2319") - .setResourceSelector( - IamPolicyAnalysisQuery.ResourceSelector.newBuilder().build()) - .setIdentitySelector( - IamPolicyAnalysisQuery.IdentitySelector.newBuilder().build()) - .setAccessSelector(IamPolicyAnalysisQuery.AccessSelector.newBuilder().build()) - .setOptions(IamPolicyAnalysisQuery.Options.newBuilder().build()) - .setConditionContext( - IamPolicyAnalysisQuery.ConditionContext.newBuilder().build()) - .build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) - .build(); - client.analyzeIamPolicyLongrunningAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void analyzeMoveTest() throws Exception { - AnalyzeMoveResponse expectedResponse = - AnalyzeMoveResponse.newBuilder().addAllMoveAnalysis(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - AnalyzeMoveRequest request = - AnalyzeMoveRequest.newBuilder() - .setResource("resource-4407/resource-4407") - .setDestinationParent("destinationParent-1733659048") - .build(); - - AnalyzeMoveResponse actualResponse = client.analyzeMove(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void analyzeMoveExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AnalyzeMoveRequest request = - AnalyzeMoveRequest.newBuilder() - .setResource("resource-4407/resource-4407") - .setDestinationParent("destinationParent-1733659048") - .build(); - client.analyzeMove(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void queryAssetsTest() throws Exception { - QueryAssetsResponse expectedResponse = - QueryAssetsResponse.newBuilder() - .setJobReference("jobReference-2094880754") - .setDone(true) - .build(); - mockService.addResponse(expectedResponse); - - QueryAssetsRequest request = - QueryAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setTimeout(Duration.newBuilder().build()) - .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) - .build(); - - QueryAssetsResponse actualResponse = client.queryAssets(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void queryAssetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - QueryAssetsRequest request = - QueryAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setTimeout(Duration.newBuilder().build()) - .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) - .build(); - client.queryAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createSavedQueryExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest2() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createSavedQueryExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest3() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createSavedQueryExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest4() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-4715/parent-4715"; - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createSavedQueryExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-4715/parent-4715"; - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSavedQueryTest() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - - SavedQuery actualResponse = client.getSavedQuery(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSavedQueryExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - client.getSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSavedQueryTest2() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; - - SavedQuery actualResponse = client.getSavedQuery(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSavedQueryExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; - client.getSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSavedQueriesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest2() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSavedQueriesExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest3() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSavedQueriesExceptionTest3() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest4() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-4715/parent-4715"; - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listSavedQueriesExceptionTest4() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-4715/parent-4715"; - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateSavedQueryTest() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - SavedQuery savedQuery = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - SavedQuery actualResponse = client.updateSavedQuery(savedQuery, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateSavedQueryExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SavedQuery savedQuery = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSavedQuery(savedQuery, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteSavedQueryTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - - client.deleteSavedQuery(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteSavedQueryExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - client.deleteSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteSavedQueryTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; - - client.deleteSavedQuery(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteSavedQueryExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "name-3263/name-3263/savedQueries/savedQuerie-3263"; - client.deleteSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchGetEffectiveIamPoliciesTest() throws Exception { - BatchGetEffectiveIamPoliciesResponse expectedResponse = - BatchGetEffectiveIamPoliciesResponse.newBuilder() - .addAllPolicyResults( - new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - BatchGetEffectiveIamPoliciesRequest request = - BatchGetEffectiveIamPoliciesRequest.newBuilder() - .setScope(FolderName.of("[FOLDER]").toString()) - .addAllNames(new ArrayList()) - .build(); - - BatchGetEffectiveIamPoliciesResponse actualResponse = - client.batchGetEffectiveIamPolicies(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void batchGetEffectiveIamPoliciesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - BatchGetEffectiveIamPoliciesRequest request = - BatchGetEffectiveIamPoliciesRequest.newBuilder() - .setScope(FolderName.of("[FOLDER]").toString()) - .addAllNames(new ArrayList()) - .build(); - client.batchGetEffectiveIamPolicies(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java deleted file mode 100644 index bf670f43abf7..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java +++ /dev/null @@ -1,1551 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.ListSavedQueriesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.resourcenames.ResourceName; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Duration; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import com.google.type.Expr; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientTest { - private static MockAssetService mockAssetService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockAssetService = new MockAssetService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - AssetServiceSettings settings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void exportAssetsTest() throws Exception { - ExportAssetsResponse expectedResponse = - ExportAssetsResponse.newBuilder() - .setReadTime(Timestamp.newBuilder().build()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .setOutputResult(OutputResult.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportAssetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAssetService.addResponse(resultOperation); - - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - - ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportAssetsRequest actualRequest = ((ExportAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); - Assert.assertEquals(request.getAssetTypesList(), actualRequest.getAssetTypesList()); - Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); - Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); - Assert.assertEquals( - request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void exportAssetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - client.exportAssetsAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void listAssetsTest() throws Exception { - Asset responsesElement = Asset.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllAssets(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - ResourceName parent = FolderName.of("[FOLDER]"); - - ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAssetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - ResourceName parent = FolderName.of("[FOLDER]"); - client.listAssets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAssetsTest2() throws Exception { - Asset responsesElement = Asset.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllAssets(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAssetsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listAssets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchGetAssetsHistoryTest() throws Exception { - BatchGetAssetsHistoryResponse expectedResponse = - BatchGetAssetsHistoryResponse.newBuilder() - .addAllAssets(new ArrayList()) - .build(); - mockAssetService.addResponse(expectedResponse); - - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .addAllAssetNames(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setReadTimeWindow(TimeWindow.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - - BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchGetAssetsHistoryRequest actualRequest = - ((BatchGetAssetsHistoryRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getAssetNamesList(), actualRequest.getAssetNamesList()); - Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); - Assert.assertEquals(request.getReadTimeWindow(), actualRequest.getReadTimeWindow()); - Assert.assertEquals( - request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchGetAssetsHistoryExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .addAllAssetNames(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setReadTimeWindow(TimeWindow.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - client.batchGetAssetsHistory(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - Feed actualResponse = client.createFeed(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFeedRequest actualRequest = ((CreateFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - client.createFeed(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockAssetService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest2() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockAssetService.addResponse(expectedResponse); - - String name = "name3373707"; - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFeedExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String name = "name3373707"; - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFeedsTest() throws Exception { - ListFeedsResponse expectedResponse = - ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListFeedsResponse actualResponse = client.listFeeds(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFeedsRequest actualRequest = ((ListFeedsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFeedsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listFeeds(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .setCondition(Expr.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - mockAssetService.addResponse(expectedResponse); - - Feed feed = Feed.newBuilder().build(); - - Feed actualResponse = client.updateFeed(feed); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateFeedRequest actualRequest = ((UpdateFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(feed, actualRequest.getFeed()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - Feed feed = Feed.newBuilder().build(); - client.updateFeed(feed); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAssetService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - client.deleteFeed(name); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAssetService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteFeed(name); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFeedExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String name = "name3373707"; - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void searchAllResourcesTest() throws Exception { - ResourceSearchResult responsesElement = ResourceSearchResult.newBuilder().build(); - SearchAllResourcesResponse expectedResponse = - SearchAllResourcesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - - SearchAllResourcesPagedResponse pagedListResponse = - client.searchAllResources(scope, query, assetTypes); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SearchAllResourcesRequest actualRequest = ((SearchAllResourcesRequest) actualRequests.get(0)); - - Assert.assertEquals(scope, actualRequest.getScope()); - Assert.assertEquals(query, actualRequest.getQuery()); - Assert.assertEquals(assetTypes, actualRequest.getAssetTypesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void searchAllResourcesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - client.searchAllResources(scope, query, assetTypes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void searchAllIamPoliciesTest() throws Exception { - IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); - SearchAllIamPoliciesResponse expectedResponse = - SearchAllIamPoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - String scope = "scope109264468"; - String query = "query107944136"; - - SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SearchAllIamPoliciesRequest actualRequest = - ((SearchAllIamPoliciesRequest) actualRequests.get(0)); - - Assert.assertEquals(scope, actualRequest.getScope()); - Assert.assertEquals(query, actualRequest.getQuery()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void searchAllIamPoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String scope = "scope109264468"; - String query = "query107944136"; - client.searchAllIamPolicies(scope, query); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void analyzeIamPolicyTest() throws Exception { - AnalyzeIamPolicyResponse expectedResponse = - AnalyzeIamPolicyResponse.newBuilder() - .setMainAnalysis(AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder().build()) - .addAllServiceAccountImpersonationAnalysis( - new ArrayList()) - .setFullyExplored(true) - .build(); - mockAssetService.addResponse(expectedResponse); - - AnalyzeIamPolicyRequest request = - AnalyzeIamPolicyRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setExecutionTimeout(Duration.newBuilder().build()) - .build(); - - AnalyzeIamPolicyResponse actualResponse = client.analyzeIamPolicy(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AnalyzeIamPolicyRequest actualRequest = ((AnalyzeIamPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getAnalysisQuery(), actualRequest.getAnalysisQuery()); - Assert.assertEquals(request.getSavedAnalysisQuery(), actualRequest.getSavedAnalysisQuery()); - Assert.assertEquals(request.getExecutionTimeout(), actualRequest.getExecutionTimeout()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void analyzeIamPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - AnalyzeIamPolicyRequest request = - AnalyzeIamPolicyRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setExecutionTimeout(Duration.newBuilder().build()) - .build(); - client.analyzeIamPolicy(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void analyzeIamPolicyLongrunningTest() throws Exception { - AnalyzeIamPolicyLongrunningResponse expectedResponse = - AnalyzeIamPolicyLongrunningResponse.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("analyzeIamPolicyLongrunningTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAssetService.addResponse(resultOperation); - - AnalyzeIamPolicyLongrunningRequest request = - AnalyzeIamPolicyLongrunningRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) - .build(); - - AnalyzeIamPolicyLongrunningResponse actualResponse = - client.analyzeIamPolicyLongrunningAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AnalyzeIamPolicyLongrunningRequest actualRequest = - ((AnalyzeIamPolicyLongrunningRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getAnalysisQuery(), actualRequest.getAnalysisQuery()); - Assert.assertEquals(request.getSavedAnalysisQuery(), actualRequest.getSavedAnalysisQuery()); - Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void analyzeIamPolicyLongrunningExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - AnalyzeIamPolicyLongrunningRequest request = - AnalyzeIamPolicyLongrunningRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) - .build(); - client.analyzeIamPolicyLongrunningAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - public void analyzeMoveTest() throws Exception { - AnalyzeMoveResponse expectedResponse = - AnalyzeMoveResponse.newBuilder().addAllMoveAnalysis(new ArrayList()).build(); - mockAssetService.addResponse(expectedResponse); - - AnalyzeMoveRequest request = - AnalyzeMoveRequest.newBuilder() - .setResource("resource-341064690") - .setDestinationParent("destinationParent-1733659048") - .build(); - - AnalyzeMoveResponse actualResponse = client.analyzeMove(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - AnalyzeMoveRequest actualRequest = ((AnalyzeMoveRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getResource(), actualRequest.getResource()); - Assert.assertEquals(request.getDestinationParent(), actualRequest.getDestinationParent()); - Assert.assertEquals(request.getView(), actualRequest.getView()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void analyzeMoveExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - AnalyzeMoveRequest request = - AnalyzeMoveRequest.newBuilder() - .setResource("resource-341064690") - .setDestinationParent("destinationParent-1733659048") - .build(); - client.analyzeMove(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void queryAssetsTest() throws Exception { - QueryAssetsResponse expectedResponse = - QueryAssetsResponse.newBuilder() - .setJobReference("jobReference-2094880754") - .setDone(true) - .build(); - mockAssetService.addResponse(expectedResponse); - - QueryAssetsRequest request = - QueryAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setTimeout(Duration.newBuilder().build()) - .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) - .build(); - - QueryAssetsResponse actualResponse = client.queryAssets(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - QueryAssetsRequest actualRequest = ((QueryAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getStatement(), actualRequest.getStatement()); - Assert.assertEquals(request.getJobReference(), actualRequest.getJobReference()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertEquals(request.getTimeout(), actualRequest.getTimeout()); - Assert.assertEquals(request.getReadTimeWindow(), actualRequest.getReadTimeWindow()); - Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); - Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void queryAssetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - QueryAssetsRequest request = - QueryAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setTimeout(Duration.newBuilder().build()) - .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) - .build(); - client.queryAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); - Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createSavedQueryExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest2() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); - Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createSavedQueryExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest3() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); - Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createSavedQueryExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createSavedQueryTest4() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - - SavedQuery actualResponse = client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateSavedQueryRequest actualRequest = ((CreateSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); - Assert.assertEquals(savedQueryId, actualRequest.getSavedQueryId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createSavedQueryExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - client.createSavedQuery(parent, savedQuery, savedQueryId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSavedQueryTest() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - - SavedQuery actualResponse = client.getSavedQuery(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetSavedQueryRequest actualRequest = ((GetSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSavedQueryExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - client.getSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSavedQueryTest2() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - String name = "name3373707"; - - SavedQuery actualResponse = client.getSavedQuery(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetSavedQueryRequest actualRequest = ((GetSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSavedQueryExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String name = "name3373707"; - client.getSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - FolderName parent = FolderName.of("[FOLDER]"); - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSavedQueriesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - FolderName parent = FolderName.of("[FOLDER]"); - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest2() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSavedQueriesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest3() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSavedQueriesExceptionTest3() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listSavedQueriesTest4() throws Exception { - SavedQuery responsesElement = SavedQuery.newBuilder().build(); - ListSavedQueriesResponse expectedResponse = - ListSavedQueriesResponse.newBuilder() - .setNextPageToken("") - .addAllSavedQueries(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListSavedQueriesPagedResponse pagedListResponse = client.listSavedQueries(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getSavedQueriesList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListSavedQueriesRequest actualRequest = ((ListSavedQueriesRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listSavedQueriesExceptionTest4() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listSavedQueries(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateSavedQueryTest() throws Exception { - SavedQuery expectedResponse = - SavedQuery.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .setDescription("description-1724546052") - .setCreateTime(Timestamp.newBuilder().build()) - .setCreator("creator1028554796") - .setLastUpdateTime(Timestamp.newBuilder().build()) - .setLastUpdater("lastUpdater1649733971") - .putAllLabels(new HashMap()) - .setContent(SavedQuery.QueryContent.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - SavedQuery actualResponse = client.updateSavedQuery(savedQuery, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateSavedQueryRequest actualRequest = ((UpdateSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(savedQuery, actualRequest.getSavedQuery()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateSavedQueryExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateSavedQuery(savedQuery, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteSavedQueryTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAssetService.addResponse(expectedResponse); - - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - - client.deleteSavedQuery(name); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteSavedQueryRequest actualRequest = ((DeleteSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteSavedQueryExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - client.deleteSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteSavedQueryTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAssetService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteSavedQuery(name); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteSavedQueryRequest actualRequest = ((DeleteSavedQueryRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteSavedQueryExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String name = "name3373707"; - client.deleteSavedQuery(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void batchGetEffectiveIamPoliciesTest() throws Exception { - BatchGetEffectiveIamPoliciesResponse expectedResponse = - BatchGetEffectiveIamPoliciesResponse.newBuilder() - .addAllPolicyResults( - new ArrayList()) - .build(); - mockAssetService.addResponse(expectedResponse); - - BatchGetEffectiveIamPoliciesRequest request = - BatchGetEffectiveIamPoliciesRequest.newBuilder() - .setScope(FolderName.of("[FOLDER]").toString()) - .addAllNames(new ArrayList()) - .build(); - - BatchGetEffectiveIamPoliciesResponse actualResponse = - client.batchGetEffectiveIamPolicies(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchGetEffectiveIamPoliciesRequest actualRequest = - ((BatchGetEffectiveIamPoliciesRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getScope(), actualRequest.getScope()); - Assert.assertEquals(request.getNamesList(), actualRequest.getNamesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void batchGetEffectiveIamPoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - BatchGetEffectiveIamPoliciesRequest request = - BatchGetEffectiveIamPoliciesRequest.newBuilder() - .setScope(FolderName.of("[FOLDER]").toString()) - .addAllNames(new ArrayList()) - .build(); - client.batchGetEffectiveIamPolicies(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java deleted file mode 100644 index 304f002778bc..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetService implements MockGrpcService { - private final MockAssetServiceImpl serviceImpl; - - public MockAssetService() { - serviceImpl = new MockAssetServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java deleted file mode 100644 index b4107bb0f09b..000000000000 --- a/owl-bot-staging/java-asset/v1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.asset.v1.AssetServiceGrpc.AssetServiceImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetServiceImpl extends AssetServiceImplBase { - private List requests; - private Queue responses; - - public MockAssetServiceImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void exportAssets( - ExportAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ExportAssets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listAssets( - ListAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListAssetsResponse) { - requests.add(request); - responseObserver.onNext(((ListAssetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListAssets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListAssetsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchGetAssetsHistory( - BatchGetAssetsHistoryRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchGetAssetsHistoryResponse) { - requests.add(request); - responseObserver.onNext(((BatchGetAssetsHistoryResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchGetAssetsHistory, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchGetAssetsHistoryResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createFeed(CreateFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Feed) { - requests.add(request); - responseObserver.onNext(((Feed) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Feed.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getFeed(GetFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Feed) { - requests.add(request); - responseObserver.onNext(((Feed) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Feed.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listFeeds( - ListFeedsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListFeedsResponse) { - requests.add(request); - responseObserver.onNext(((ListFeedsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListFeeds, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListFeedsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateFeed(UpdateFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Feed) { - requests.add(request); - responseObserver.onNext(((Feed) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Feed.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteFeed(DeleteFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void searchAllResources( - SearchAllResourcesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SearchAllResourcesResponse) { - requests.add(request); - responseObserver.onNext(((SearchAllResourcesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SearchAllResources, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SearchAllResourcesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void searchAllIamPolicies( - SearchAllIamPoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SearchAllIamPoliciesResponse) { - requests.add(request); - responseObserver.onNext(((SearchAllIamPoliciesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SearchAllIamPolicies, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SearchAllIamPoliciesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void analyzeIamPolicy( - AnalyzeIamPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof AnalyzeIamPolicyResponse) { - requests.add(request); - responseObserver.onNext(((AnalyzeIamPolicyResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AnalyzeIamPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - AnalyzeIamPolicyResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void analyzeIamPolicyLongrunning( - AnalyzeIamPolicyLongrunningRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AnalyzeIamPolicyLongrunning, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void analyzeMove( - AnalyzeMoveRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof AnalyzeMoveResponse) { - requests.add(request); - responseObserver.onNext(((AnalyzeMoveResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method AnalyzeMove, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - AnalyzeMoveResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void queryAssets( - QueryAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof QueryAssetsResponse) { - requests.add(request); - responseObserver.onNext(((QueryAssetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method QueryAssets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - QueryAssetsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createSavedQuery( - CreateSavedQueryRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SavedQuery) { - requests.add(request); - responseObserver.onNext(((SavedQuery) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateSavedQuery, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SavedQuery.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getSavedQuery( - GetSavedQueryRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SavedQuery) { - requests.add(request); - responseObserver.onNext(((SavedQuery) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetSavedQuery, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SavedQuery.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listSavedQueries( - ListSavedQueriesRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListSavedQueriesResponse) { - requests.add(request); - responseObserver.onNext(((ListSavedQueriesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListSavedQueries, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListSavedQueriesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateSavedQuery( - UpdateSavedQueryRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SavedQuery) { - requests.add(request); - responseObserver.onNext(((SavedQuery) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateSavedQuery, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SavedQuery.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteSavedQuery( - DeleteSavedQueryRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteSavedQuery, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void batchGetEffectiveIamPolicies( - BatchGetEffectiveIamPoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof BatchGetEffectiveIamPoliciesResponse) { - requests.add(request); - responseObserver.onNext(((BatchGetEffectiveIamPoliciesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method BatchGetEffectiveIamPolicies, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - BatchGetEffectiveIamPoliciesResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java b/owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java deleted file mode 100644 index 635b5e007454..000000000000 --- a/owl-bot-staging/java-asset/v1/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java +++ /dev/null @@ -1,2129 +0,0 @@ -package com.google.cloud.asset.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * 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 String SERVICE_NAME = "google.cloud.asset.v1.AssetService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor 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 getExportAssetsMethod() { - io.grpc.MethodDescriptor 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.v1.ExportAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ExportAssets")) - .build(); - } - } - } - return getExportAssetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getListAssetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAssets", - requestType = com.google.cloud.asset.v1.ListAssetsRequest.class, - responseType = com.google.cloud.asset.v1.ListAssetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListAssetsMethod() { - io.grpc.MethodDescriptor 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.v1.ListAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListAssets")) - .build(); - } - } - } - return getListAssetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchGetAssetsHistoryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchGetAssetsHistory", - requestType = com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.class, - responseType = com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchGetAssetsHistoryMethod() { - io.grpc.MethodDescriptor getBatchGetAssetsHistoryMethod; - if ((getBatchGetAssetsHistoryMethod = AssetServiceGrpc.getBatchGetAssetsHistoryMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getBatchGetAssetsHistoryMethod = AssetServiceGrpc.getBatchGetAssetsHistoryMethod) == null) { - AssetServiceGrpc.getBatchGetAssetsHistoryMethod = getBatchGetAssetsHistoryMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchGetAssetsHistory")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("BatchGetAssetsHistory")) - .build(); - } - } - } - return getBatchGetAssetsHistoryMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateFeedMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateFeed", - requestType = com.google.cloud.asset.v1.CreateFeedRequest.class, - responseType = com.google.cloud.asset.v1.Feed.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateFeedMethod() { - io.grpc.MethodDescriptor 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.v1.CreateFeedRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.Feed.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("CreateFeed")) - .build(); - } - } - } - return getCreateFeedMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetFeedMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetFeed", - requestType = com.google.cloud.asset.v1.GetFeedRequest.class, - responseType = com.google.cloud.asset.v1.Feed.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetFeedMethod() { - io.grpc.MethodDescriptor 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.v1.GetFeedRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.Feed.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("GetFeed")) - .build(); - } - } - } - return getGetFeedMethod; - } - - private static volatile io.grpc.MethodDescriptor getListFeedsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListFeeds", - requestType = com.google.cloud.asset.v1.ListFeedsRequest.class, - responseType = com.google.cloud.asset.v1.ListFeedsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListFeedsMethod() { - io.grpc.MethodDescriptor 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.v1.ListFeedsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.ListFeedsResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListFeeds")) - .build(); - } - } - } - return getListFeedsMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateFeedMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateFeed", - requestType = com.google.cloud.asset.v1.UpdateFeedRequest.class, - responseType = com.google.cloud.asset.v1.Feed.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateFeedMethod() { - io.grpc.MethodDescriptor 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.v1.UpdateFeedRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.Feed.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("UpdateFeed")) - .build(); - } - } - } - return getUpdateFeedMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteFeedMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteFeed", - requestType = com.google.cloud.asset.v1.DeleteFeedRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteFeedMethod() { - io.grpc.MethodDescriptor 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.v1.DeleteFeedRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("DeleteFeed")) - .build(); - } - } - } - return getDeleteFeedMethod; - } - - private static volatile io.grpc.MethodDescriptor getSearchAllResourcesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SearchAllResources", - requestType = com.google.cloud.asset.v1.SearchAllResourcesRequest.class, - responseType = com.google.cloud.asset.v1.SearchAllResourcesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSearchAllResourcesMethod() { - io.grpc.MethodDescriptor getSearchAllResourcesMethod; - if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { - AssetServiceGrpc.getSearchAllResourcesMethod = getSearchAllResourcesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllResources")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.SearchAllResourcesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.SearchAllResourcesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllResources")) - .build(); - } - } - } - return getSearchAllResourcesMethod; - } - - private static volatile io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SearchAllIamPolicies", - requestType = com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.class, - responseType = com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod() { - io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; - if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { - AssetServiceGrpc.getSearchAllIamPoliciesMethod = getSearchAllIamPoliciesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllIamPolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllIamPolicies")) - .build(); - } - } - } - return getSearchAllIamPoliciesMethod; - } - - private static volatile io.grpc.MethodDescriptor getAnalyzeIamPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AnalyzeIamPolicy", - requestType = com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, - responseType = com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAnalyzeIamPolicyMethod() { - io.grpc.MethodDescriptor getAnalyzeIamPolicyMethod; - if ((getAnalyzeIamPolicyMethod = AssetServiceGrpc.getAnalyzeIamPolicyMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getAnalyzeIamPolicyMethod = AssetServiceGrpc.getAnalyzeIamPolicyMethod) == null) { - AssetServiceGrpc.getAnalyzeIamPolicyMethod = getAnalyzeIamPolicyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeIamPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("AnalyzeIamPolicy")) - .build(); - } - } - } - return getAnalyzeIamPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor getAnalyzeIamPolicyLongrunningMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AnalyzeIamPolicyLongrunning", - requestType = com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAnalyzeIamPolicyLongrunningMethod() { - io.grpc.MethodDescriptor getAnalyzeIamPolicyLongrunningMethod; - if ((getAnalyzeIamPolicyLongrunningMethod = AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getAnalyzeIamPolicyLongrunningMethod = AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod) == null) { - AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod = getAnalyzeIamPolicyLongrunningMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeIamPolicyLongrunning")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("AnalyzeIamPolicyLongrunning")) - .build(); - } - } - } - return getAnalyzeIamPolicyLongrunningMethod; - } - - private static volatile io.grpc.MethodDescriptor getAnalyzeMoveMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "AnalyzeMove", - requestType = com.google.cloud.asset.v1.AnalyzeMoveRequest.class, - responseType = com.google.cloud.asset.v1.AnalyzeMoveResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getAnalyzeMoveMethod() { - io.grpc.MethodDescriptor getAnalyzeMoveMethod; - if ((getAnalyzeMoveMethod = AssetServiceGrpc.getAnalyzeMoveMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getAnalyzeMoveMethod = AssetServiceGrpc.getAnalyzeMoveMethod) == null) { - AssetServiceGrpc.getAnalyzeMoveMethod = getAnalyzeMoveMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeMove")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.AnalyzeMoveRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.AnalyzeMoveResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("AnalyzeMove")) - .build(); - } - } - } - return getAnalyzeMoveMethod; - } - - private static volatile io.grpc.MethodDescriptor getQueryAssetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "QueryAssets", - requestType = com.google.cloud.asset.v1.QueryAssetsRequest.class, - responseType = com.google.cloud.asset.v1.QueryAssetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getQueryAssetsMethod() { - io.grpc.MethodDescriptor getQueryAssetsMethod; - if ((getQueryAssetsMethod = AssetServiceGrpc.getQueryAssetsMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getQueryAssetsMethod = AssetServiceGrpc.getQueryAssetsMethod) == null) { - AssetServiceGrpc.getQueryAssetsMethod = getQueryAssetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryAssets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.QueryAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.QueryAssetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("QueryAssets")) - .build(); - } - } - } - return getQueryAssetsMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateSavedQueryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateSavedQuery", - requestType = com.google.cloud.asset.v1.CreateSavedQueryRequest.class, - responseType = com.google.cloud.asset.v1.SavedQuery.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateSavedQueryMethod() { - io.grpc.MethodDescriptor getCreateSavedQueryMethod; - if ((getCreateSavedQueryMethod = AssetServiceGrpc.getCreateSavedQueryMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getCreateSavedQueryMethod = AssetServiceGrpc.getCreateSavedQueryMethod) == null) { - AssetServiceGrpc.getCreateSavedQueryMethod = getCreateSavedQueryMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSavedQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.CreateSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.SavedQuery.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("CreateSavedQuery")) - .build(); - } - } - } - return getCreateSavedQueryMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetSavedQueryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSavedQuery", - requestType = com.google.cloud.asset.v1.GetSavedQueryRequest.class, - responseType = com.google.cloud.asset.v1.SavedQuery.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSavedQueryMethod() { - io.grpc.MethodDescriptor getGetSavedQueryMethod; - if ((getGetSavedQueryMethod = AssetServiceGrpc.getGetSavedQueryMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getGetSavedQueryMethod = AssetServiceGrpc.getGetSavedQueryMethod) == null) { - AssetServiceGrpc.getGetSavedQueryMethod = getGetSavedQueryMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSavedQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.GetSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.SavedQuery.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("GetSavedQuery")) - .build(); - } - } - } - return getGetSavedQueryMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSavedQueriesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSavedQueries", - requestType = com.google.cloud.asset.v1.ListSavedQueriesRequest.class, - responseType = com.google.cloud.asset.v1.ListSavedQueriesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSavedQueriesMethod() { - io.grpc.MethodDescriptor getListSavedQueriesMethod; - if ((getListSavedQueriesMethod = AssetServiceGrpc.getListSavedQueriesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getListSavedQueriesMethod = AssetServiceGrpc.getListSavedQueriesMethod) == null) { - AssetServiceGrpc.getListSavedQueriesMethod = getListSavedQueriesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSavedQueries")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.ListSavedQueriesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.ListSavedQueriesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListSavedQueries")) - .build(); - } - } - } - return getListSavedQueriesMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateSavedQueryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateSavedQuery", - requestType = com.google.cloud.asset.v1.UpdateSavedQueryRequest.class, - responseType = com.google.cloud.asset.v1.SavedQuery.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateSavedQueryMethod() { - io.grpc.MethodDescriptor getUpdateSavedQueryMethod; - if ((getUpdateSavedQueryMethod = AssetServiceGrpc.getUpdateSavedQueryMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getUpdateSavedQueryMethod = AssetServiceGrpc.getUpdateSavedQueryMethod) == null) { - AssetServiceGrpc.getUpdateSavedQueryMethod = getUpdateSavedQueryMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSavedQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.UpdateSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.SavedQuery.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("UpdateSavedQuery")) - .build(); - } - } - } - return getUpdateSavedQueryMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteSavedQueryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteSavedQuery", - requestType = com.google.cloud.asset.v1.DeleteSavedQueryRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteSavedQueryMethod() { - io.grpc.MethodDescriptor getDeleteSavedQueryMethod; - if ((getDeleteSavedQueryMethod = AssetServiceGrpc.getDeleteSavedQueryMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getDeleteSavedQueryMethod = AssetServiceGrpc.getDeleteSavedQueryMethod) == null) { - AssetServiceGrpc.getDeleteSavedQueryMethod = getDeleteSavedQueryMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSavedQuery")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.DeleteSavedQueryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("DeleteSavedQuery")) - .build(); - } - } - } - return getDeleteSavedQueryMethod; - } - - private static volatile io.grpc.MethodDescriptor getBatchGetEffectiveIamPoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchGetEffectiveIamPolicies", - requestType = com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.class, - responseType = com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBatchGetEffectiveIamPoliciesMethod() { - io.grpc.MethodDescriptor getBatchGetEffectiveIamPoliciesMethod; - if ((getBatchGetEffectiveIamPoliciesMethod = AssetServiceGrpc.getBatchGetEffectiveIamPoliciesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getBatchGetEffectiveIamPoliciesMethod = AssetServiceGrpc.getBatchGetEffectiveIamPoliciesMethod) == null) { - AssetServiceGrpc.getBatchGetEffectiveIamPoliciesMethod = getBatchGetEffectiveIamPoliciesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchGetEffectiveIamPolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("BatchGetEffectiveIamPolicies")) - .build(); - } - } - } - return getBatchGetEffectiveIamPoliciesMethod; - } - - /** - * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportAssetsMethod(), responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchGetAssetsHistoryMethod(), responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFeedMethod(), responseObserver); - } - - /** - *
-     * Gets details about an asset feed.
-     * 
- */ - public void getFeed(com.google.cloud.asset.v1.GetFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFeedMethod(), responseObserver); - } - - /** - *
-     * Lists all asset feeds in a parent project/folder/organization.
-     * 
- */ - public void listFeeds(com.google.cloud.asset.v1.ListFeedsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListFeedsMethod(), responseObserver); - } - - /** - *
-     * Updates an asset feed configuration.
-     * 
- */ - public void updateFeed(com.google.cloud.asset.v1.UpdateFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFeedMethod(), responseObserver); - } - - /** - *
-     * Deletes an asset feed.
-     * 
- */ - public void deleteFeed(com.google.cloud.asset.v1.DeleteFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFeedMethod(), responseObserver); - } - - /** - *
-     * Searches all 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllResourcesMethod(), responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllIamPoliciesMethod(), responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAnalyzeIamPolicyMethod(), responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAnalyzeIamPolicyLongrunningMethod(), responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAnalyzeMoveMethod(), responseObserver); - } - - /** - *
-     * Issue a job that queries assets using a SQL statement compatible with
-     * [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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 responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryAssetsMethod(), responseObserver); - } - - /** - *
-     * Creates a saved query in a parent project/folder/organization.
-     * 
- */ - public void createSavedQuery(com.google.cloud.asset.v1.CreateSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSavedQueryMethod(), responseObserver); - } - - /** - *
-     * Gets details about a saved query.
-     * 
- */ - public void getSavedQuery(com.google.cloud.asset.v1.GetSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSavedQueryMethod(), responseObserver); - } - - /** - *
-     * Lists all saved queries in a parent project/folder/organization.
-     * 
- */ - public void listSavedQueries(com.google.cloud.asset.v1.ListSavedQueriesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSavedQueriesMethod(), responseObserver); - } - - /** - *
-     * Updates a saved query.
-     * 
- */ - public void updateSavedQuery(com.google.cloud.asset.v1.UpdateSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSavedQueryMethod(), responseObserver); - } - - /** - *
-     * Deletes a saved query.
-     * 
- */ - public void deleteSavedQuery(com.google.cloud.asset.v1.DeleteSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSavedQueryMethod(), responseObserver); - } - - /** - *
-     * Gets effective IAM policies for a batch of resources.
-     * 
- */ - public void batchGetEffectiveIamPolicies(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchGetEffectiveIamPoliciesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getExportAssetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.ExportAssetsRequest, - com.google.longrunning.Operation>( - this, METHODID_EXPORT_ASSETS))) - .addMethod( - getListAssetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.ListAssetsRequest, - com.google.cloud.asset.v1.ListAssetsResponse>( - this, METHODID_LIST_ASSETS))) - .addMethod( - getBatchGetAssetsHistoryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest, - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse>( - this, METHODID_BATCH_GET_ASSETS_HISTORY))) - .addMethod( - getCreateFeedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.CreateFeedRequest, - com.google.cloud.asset.v1.Feed>( - this, METHODID_CREATE_FEED))) - .addMethod( - getGetFeedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.GetFeedRequest, - com.google.cloud.asset.v1.Feed>( - this, METHODID_GET_FEED))) - .addMethod( - getListFeedsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.ListFeedsRequest, - com.google.cloud.asset.v1.ListFeedsResponse>( - this, METHODID_LIST_FEEDS))) - .addMethod( - getUpdateFeedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.UpdateFeedRequest, - com.google.cloud.asset.v1.Feed>( - this, METHODID_UPDATE_FEED))) - .addMethod( - getDeleteFeedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.DeleteFeedRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_FEED))) - .addMethod( - getSearchAllResourcesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.SearchAllResourcesRequest, - com.google.cloud.asset.v1.SearchAllResourcesResponse>( - this, METHODID_SEARCH_ALL_RESOURCES))) - .addMethod( - getSearchAllIamPoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest, - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse>( - this, METHODID_SEARCH_ALL_IAM_POLICIES))) - .addMethod( - getAnalyzeIamPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest, - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse>( - this, METHODID_ANALYZE_IAM_POLICY))) - .addMethod( - getAnalyzeIamPolicyLongrunningMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest, - com.google.longrunning.Operation>( - this, METHODID_ANALYZE_IAM_POLICY_LONGRUNNING))) - .addMethod( - getAnalyzeMoveMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.AnalyzeMoveRequest, - com.google.cloud.asset.v1.AnalyzeMoveResponse>( - this, METHODID_ANALYZE_MOVE))) - .addMethod( - getQueryAssetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.QueryAssetsRequest, - com.google.cloud.asset.v1.QueryAssetsResponse>( - this, METHODID_QUERY_ASSETS))) - .addMethod( - getCreateSavedQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.CreateSavedQueryRequest, - com.google.cloud.asset.v1.SavedQuery>( - this, METHODID_CREATE_SAVED_QUERY))) - .addMethod( - getGetSavedQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.GetSavedQueryRequest, - com.google.cloud.asset.v1.SavedQuery>( - this, METHODID_GET_SAVED_QUERY))) - .addMethod( - getListSavedQueriesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.ListSavedQueriesRequest, - com.google.cloud.asset.v1.ListSavedQueriesResponse>( - this, METHODID_LIST_SAVED_QUERIES))) - .addMethod( - getUpdateSavedQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.UpdateSavedQueryRequest, - com.google.cloud.asset.v1.SavedQuery>( - this, METHODID_UPDATE_SAVED_QUERY))) - .addMethod( - getDeleteSavedQueryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.DeleteSavedQueryRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_SAVED_QUERY))) - .addMethod( - getBatchGetEffectiveIamPoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest, - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse>( - this, METHODID_BATCH_GET_EFFECTIVE_IAM_POLICIES))) - .build(); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchGetAssetsHistoryMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateFeedMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets details about an asset feed.
-     * 
- */ - public void getFeed(com.google.cloud.asset.v1.GetFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1.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.v1.UpdateFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes an asset feed.
-     * 
- */ - public void deleteFeed(com.google.cloud.asset.v1.DeleteFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Searches all 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSearchAllResourcesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAnalyzeIamPolicyMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAnalyzeIamPolicyLongrunningMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * 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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getAnalyzeMoveMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Issue a job that queries assets using a SQL statement compatible with
-     * [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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 responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getQueryAssetsMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Creates a saved query in a parent project/folder/organization.
-     * 
- */ - public void createSavedQuery(com.google.cloud.asset.v1.CreateSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateSavedQueryMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets details about a saved query.
-     * 
- */ - public void getSavedQuery(com.google.cloud.asset.v1.GetSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSavedQueryMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Lists all saved queries in a parent project/folder/organization.
-     * 
- */ - public void listSavedQueries(com.google.cloud.asset.v1.ListSavedQueriesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListSavedQueriesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Updates a saved query.
-     * 
- */ - public void updateSavedQuery(com.google.cloud.asset.v1.UpdateSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateSavedQueryMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Deletes a saved query.
-     * 
- */ - public void deleteSavedQuery(com.google.cloud.asset.v1.DeleteSavedQueryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteSavedQueryMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Gets effective IAM policies for a batch of resources.
-     * 
- */ - public void batchGetEffectiveIamPolicies(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBatchGetEffectiveIamPoliciesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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 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 Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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 exportAssets( - com.google.cloud.asset.v1.ExportAssetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists assets with time and resource types and returns paged results in
-     * response.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture 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 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 createFeed( - com.google.cloud.asset.v1.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.v1.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 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 updateFeed( - com.google.cloud.asset.v1.UpdateFeedRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateFeedMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes an asset feed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteFeed( - com.google.cloud.asset.v1.DeleteFeedRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request); - } - - /** - *
-     * Searches all 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 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 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 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 analyzeIamPolicyLongrunning( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(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.common.util.concurrent.ListenableFuture 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 Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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 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 createSavedQuery( - com.google.cloud.asset.v1.CreateSavedQueryRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateSavedQueryMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets details about a saved query.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getSavedQuery( - com.google.cloud.asset.v1.GetSavedQueryRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSavedQueryMethod(), getCallOptions()), request); - } - - /** - *
-     * Lists all saved queries in a parent project/folder/organization.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture 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 updateSavedQuery( - com.google.cloud.asset.v1.UpdateSavedQueryRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateSavedQueryMethod(), getCallOptions()), request); - } - - /** - *
-     * Deletes a saved query.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture deleteSavedQuery( - com.google.cloud.asset.v1.DeleteSavedQueryRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteSavedQueryMethod(), getCallOptions()), request); - } - - /** - *
-     * Gets effective IAM policies for a batch of resources.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture batchGetEffectiveIamPolicies( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBatchGetEffectiveIamPoliciesMethod(), 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 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 AssetServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AssetServiceImplBase 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_EXPORT_ASSETS: - serviceImpl.exportAssets((com.google.cloud.asset.v1.ExportAssetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_ASSETS: - serviceImpl.listAssets((com.google.cloud.asset.v1.ListAssetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_GET_ASSETS_HISTORY: - serviceImpl.batchGetAssetsHistory((com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_FEED: - serviceImpl.createFeed((com.google.cloud.asset.v1.CreateFeedRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_FEED: - serviceImpl.getFeed((com.google.cloud.asset.v1.GetFeedRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_FEEDS: - serviceImpl.listFeeds((com.google.cloud.asset.v1.ListFeedsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_FEED: - serviceImpl.updateFeed((com.google.cloud.asset.v1.UpdateFeedRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_FEED: - serviceImpl.deleteFeed((com.google.cloud.asset.v1.DeleteFeedRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SEARCH_ALL_RESOURCES: - serviceImpl.searchAllResources((com.google.cloud.asset.v1.SearchAllResourcesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SEARCH_ALL_IAM_POLICIES: - serviceImpl.searchAllIamPolicies((com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ANALYZE_IAM_POLICY: - serviceImpl.analyzeIamPolicy((com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ANALYZE_IAM_POLICY_LONGRUNNING: - serviceImpl.analyzeIamPolicyLongrunning((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_ANALYZE_MOVE: - serviceImpl.analyzeMove((com.google.cloud.asset.v1.AnalyzeMoveRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_QUERY_ASSETS: - serviceImpl.queryAssets((com.google.cloud.asset.v1.QueryAssetsRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_SAVED_QUERY: - serviceImpl.createSavedQuery((com.google.cloud.asset.v1.CreateSavedQueryRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_SAVED_QUERY: - serviceImpl.getSavedQuery((com.google.cloud.asset.v1.GetSavedQueryRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LIST_SAVED_QUERIES: - serviceImpl.listSavedQueries((com.google.cloud.asset.v1.ListSavedQueriesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_SAVED_QUERY: - serviceImpl.updateSavedQuery((com.google.cloud.asset.v1.UpdateSavedQueryRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_SAVED_QUERY: - serviceImpl.deleteSavedQuery((com.google.cloud.asset.v1.DeleteSavedQueryRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BATCH_GET_EFFECTIVE_IAM_POLICIES: - serviceImpl.batchGetEffectiveIamPolicies((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) 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(); - } - } - } - - private static abstract 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.v1.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 String methodName; - - AssetServiceMethodDescriptorSupplier(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(getExportAssetsMethod()) - .addMethod(getListAssetsMethod()) - .addMethod(getBatchGetAssetsHistoryMethod()) - .addMethod(getCreateFeedMethod()) - .addMethod(getGetFeedMethod()) - .addMethod(getListFeedsMethod()) - .addMethod(getUpdateFeedMethod()) - .addMethod(getDeleteFeedMethod()) - .addMethod(getSearchAllResourcesMethod()) - .addMethod(getSearchAllIamPoliciesMethod()) - .addMethod(getAnalyzeIamPolicyMethod()) - .addMethod(getAnalyzeIamPolicyLongrunningMethod()) - .addMethod(getAnalyzeMoveMethod()) - .addMethod(getQueryAssetsMethod()) - .addMethod(getCreateSavedQueryMethod()) - .addMethod(getGetSavedQueryMethod()) - .addMethod(getListSavedQueriesMethod()) - .addMethod(getUpdateSavedQueryMethod()) - .addMethod(getDeleteSavedQueryMethod()) - .addMethod(getBatchGetEffectiveIamPoliciesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java deleted file mode 100644 index 19ad39147e56..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java +++ /dev/null @@ -1,667 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Represents the metadata of the longrunning operation for the
- * AnalyzeIamPolicyLongrunning rpc.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata} - */ -public final class AnalyzeIamPolicyLongrunningMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) - AnalyzeIamPolicyLongrunningMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeIamPolicyLongrunningMetadata.newBuilder() to construct. - private AnalyzeIamPolicyLongrunningMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeIamPolicyLongrunningMetadata() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeIamPolicyLongrunningMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeIamPolicyLongrunningMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getCreateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata other = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents the metadata of the longrunning operation for the
-   * AnalyzeIamPolicyLongrunning rpc.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata build() { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata buildPartial() { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata result = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata other) { - if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata.getDefaultInstance()) return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) - private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata(); - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeIamPolicyLongrunningMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyLongrunningMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java deleted file mode 100644 index a603612929d5..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface AnalyzeIamPolicyLongrunningMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java deleted file mode 100644 index 6a0c4fa5e2a5..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java +++ /dev/null @@ -1,1165 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A request message for
- * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest} - */ -public final class AnalyzeIamPolicyLongrunningRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) - AnalyzeIamPolicyLongrunningRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeIamPolicyLongrunningRequest.newBuilder() to construct. - private AnalyzeIamPolicyLongrunningRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeIamPolicyLongrunningRequest() { - savedAnalysisQuery_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeIamPolicyLongrunningRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeIamPolicyLongrunningRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (analysisQuery_ != null) { - subBuilder = analysisQuery_.toBuilder(); - } - analysisQuery_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisQuery_); - analysisQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - savedAnalysisQuery_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.Builder.class); - } - - public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the analysisQuery field is set. - */ - @java.lang.Override - public boolean hasAnalysisQuery() { - return analysisQuery_ != null; - } - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The analysisQuery. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { - return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { - return getAnalysisQuery(); - } - - public static final int SAVED_ANALYSIS_QUERY_FIELD_NUMBER = 3; - private volatile java.lang.Object savedAnalysisQuery_; - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * doc.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The savedAnalysisQuery. - */ - @java.lang.Override - public java.lang.String getSavedAnalysisQuery() { - java.lang.Object ref = savedAnalysisQuery_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - savedAnalysisQuery_ = s; - return s; - } - } - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * doc.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for savedAnalysisQuery. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSavedAnalysisQueryBytes() { - java.lang.Object ref = savedAnalysisQuery_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - savedAnalysisQuery_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig outputConfig_; - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (analysisQuery_ != null) { - output.writeMessage(1, getAnalysisQuery()); - } - if (outputConfig_ != null) { - output.writeMessage(2, getOutputConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedAnalysisQuery_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (analysisQuery_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAnalysisQuery()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOutputConfig()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedAnalysisQuery_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest other = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) obj; - - if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; - if (hasAnalysisQuery()) { - if (!getAnalysisQuery() - .equals(other.getAnalysisQuery())) return false; - } - if (!getSavedAnalysisQuery() - .equals(other.getSavedAnalysisQuery())) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAnalysisQuery()) { - hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisQuery().hashCode(); - } - hash = (37 * hash) + SAVED_ANALYSIS_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getSavedAnalysisQuery().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A request message for
-   * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (analysisQueryBuilder_ == null) { - analysisQuery_ = null; - } else { - analysisQuery_ = null; - analysisQueryBuilder_ = null; - } - savedAnalysisQuery_ = ""; - - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest build() { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest buildPartial() { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest result = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest(this); - if (analysisQueryBuilder_ == null) { - result.analysisQuery_ = analysisQuery_; - } else { - result.analysisQuery_ = analysisQueryBuilder_.build(); - } - result.savedAnalysisQuery_ = savedAnalysisQuery_; - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest other) { - if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.getDefaultInstance()) return this; - if (other.hasAnalysisQuery()) { - mergeAnalysisQuery(other.getAnalysisQuery()); - } - if (!other.getSavedAnalysisQuery().isEmpty()) { - savedAnalysisQuery_ = other.savedAnalysisQuery_; - onChanged(); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> analysisQueryBuilder_; - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the analysisQuery field is set. - */ - public boolean hasAnalysisQuery() { - return analysisQueryBuilder_ != null || analysisQuery_ != null; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The analysisQuery. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { - if (analysisQueryBuilder_ == null) { - return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } else { - return analysisQueryBuilder_.getMessage(); - } - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (analysisQueryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisQuery_ = value; - onChanged(); - } else { - analysisQueryBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setAnalysisQuery( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { - if (analysisQueryBuilder_ == null) { - analysisQuery_ = builderForValue.build(); - onChanged(); - } else { - analysisQueryBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (analysisQueryBuilder_ == null) { - if (analysisQuery_ != null) { - analysisQuery_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_).mergeFrom(value).buildPartial(); - } else { - analysisQuery_ = value; - } - onChanged(); - } else { - analysisQueryBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearAnalysisQuery() { - if (analysisQueryBuilder_ == null) { - analysisQuery_ = null; - onChanged(); - } else { - analysisQuery_ = null; - analysisQueryBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { - - onChanged(); - return getAnalysisQueryFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { - if (analysisQueryBuilder_ != null) { - return analysisQueryBuilder_.getMessageOrBuilder(); - } else { - return analysisQuery_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> - getAnalysisQueryFieldBuilder() { - if (analysisQueryBuilder_ == null) { - analysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( - getAnalysisQuery(), - getParentForChildren(), - isClean()); - analysisQuery_ = null; - } - return analysisQueryBuilder_; - } - - private java.lang.Object savedAnalysisQuery_ = ""; - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * doc.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The savedAnalysisQuery. - */ - public java.lang.String getSavedAnalysisQuery() { - java.lang.Object ref = savedAnalysisQuery_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - savedAnalysisQuery_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * doc.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for savedAnalysisQuery. - */ - public com.google.protobuf.ByteString - getSavedAnalysisQueryBytes() { - java.lang.Object ref = savedAnalysisQuery_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - savedAnalysisQuery_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * doc.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The savedAnalysisQuery to set. - * @return This builder for chaining. - */ - public Builder setSavedAnalysisQuery( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - savedAnalysisQuery_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * doc.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearSavedAnalysisQuery() { - - savedAnalysisQuery_ = getDefaultInstance().getSavedAnalysisQuery(); - onChanged(); - return this; - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * doc.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for savedAnalysisQuery to set. - * @return This builder for chaining. - */ - public Builder setSavedAnalysisQueryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - savedAnalysisQuery_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) - private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest(); - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeIamPolicyLongrunningRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyLongrunningRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java deleted file mode 100644 index 06cba9c7f30a..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface AnalyzeIamPolicyLongrunningRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the analysisQuery field is set. - */ - boolean hasAnalysisQuery(); - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The analysisQuery. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); - - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * doc.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The savedAnalysisQuery. - */ - java.lang.String getSavedAnalysisQuery(); - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * doc.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for savedAnalysisQuery. - */ - com.google.protobuf.ByteString - getSavedAnalysisQueryBytes(); - - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig(); - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java deleted file mode 100644 index 4c2c429c1b54..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java +++ /dev/null @@ -1,431 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A response message for
- * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse} - */ -public final class AnalyzeIamPolicyLongrunningResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) - AnalyzeIamPolicyLongrunningResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeIamPolicyLongrunningResponse.newBuilder() to construct. - private AnalyzeIamPolicyLongrunningResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeIamPolicyLongrunningResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeIamPolicyLongrunningResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeIamPolicyLongrunningResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse other = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A response message for
-   * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse build() { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse buildPartial() { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse result = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse other) { - if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) - private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse(); - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeIamPolicyLongrunningResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyLongrunningResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java deleted file mode 100644 index e2d8e4d0037f..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface AnalyzeIamPolicyLongrunningResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) - com.google.protobuf.MessageOrBuilder { -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java deleted file mode 100644 index f0e5a529ba2d..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java +++ /dev/null @@ -1,1249 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A request message for
- * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyRequest} - */ -public final class AnalyzeIamPolicyRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyRequest) - AnalyzeIamPolicyRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeIamPolicyRequest.newBuilder() to construct. - private AnalyzeIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeIamPolicyRequest() { - savedAnalysisQuery_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeIamPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeIamPolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (analysisQuery_ != null) { - subBuilder = analysisQuery_.toBuilder(); - } - analysisQuery_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisQuery_); - analysisQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.Duration.Builder subBuilder = null; - if (executionTimeout_ != null) { - subBuilder = executionTimeout_.toBuilder(); - } - executionTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(executionTimeout_); - executionTimeout_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - savedAnalysisQuery_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.Builder.class); - } - - public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the analysisQuery field is set. - */ - @java.lang.Override - public boolean hasAnalysisQuery() { - return analysisQuery_ != null; - } - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The analysisQuery. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { - return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { - return getAnalysisQuery(); - } - - public static final int SAVED_ANALYSIS_QUERY_FIELD_NUMBER = 3; - private volatile java.lang.Object savedAnalysisQuery_; - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * page.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The savedAnalysisQuery. - */ - @java.lang.Override - public java.lang.String getSavedAnalysisQuery() { - java.lang.Object ref = savedAnalysisQuery_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - savedAnalysisQuery_ = s; - return s; - } - } - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * page.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for savedAnalysisQuery. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSavedAnalysisQueryBytes() { - java.lang.Object ref = savedAnalysisQuery_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - savedAnalysisQuery_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXECUTION_TIMEOUT_FIELD_NUMBER = 2; - private com.google.protobuf.Duration executionTimeout_; - /** - *
-   * Optional. Amount of time executable has to complete.  See JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-   * If this field is set with a value less than the RPC deadline, and the
-   * execution of your query hasn't finished in the specified
-   * execution timeout,  you will get a response with partial result.
-   * Otherwise, your query's execution will continue until the RPC deadline.
-   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-   * Default is empty.
-   * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the executionTimeout field is set. - */ - @java.lang.Override - public boolean hasExecutionTimeout() { - return executionTimeout_ != null; - } - /** - *
-   * Optional. Amount of time executable has to complete.  See JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-   * If this field is set with a value less than the RPC deadline, and the
-   * execution of your query hasn't finished in the specified
-   * execution timeout,  you will get a response with partial result.
-   * Otherwise, your query's execution will continue until the RPC deadline.
-   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-   * Default is empty.
-   * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The executionTimeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getExecutionTimeout() { - return executionTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : executionTimeout_; - } - /** - *
-   * Optional. Amount of time executable has to complete.  See JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-   * If this field is set with a value less than the RPC deadline, and the
-   * execution of your query hasn't finished in the specified
-   * execution timeout,  you will get a response with partial result.
-   * Otherwise, your query's execution will continue until the RPC deadline.
-   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-   * Default is empty.
-   * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { - return getExecutionTimeout(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (analysisQuery_ != null) { - output.writeMessage(1, getAnalysisQuery()); - } - if (executionTimeout_ != null) { - output.writeMessage(2, getExecutionTimeout()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedAnalysisQuery_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (analysisQuery_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAnalysisQuery()); - } - if (executionTimeout_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getExecutionTimeout()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedAnalysisQuery_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedAnalysisQuery_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest other = (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) obj; - - if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; - if (hasAnalysisQuery()) { - if (!getAnalysisQuery() - .equals(other.getAnalysisQuery())) return false; - } - if (!getSavedAnalysisQuery() - .equals(other.getSavedAnalysisQuery())) return false; - if (hasExecutionTimeout() != other.hasExecutionTimeout()) return false; - if (hasExecutionTimeout()) { - if (!getExecutionTimeout() - .equals(other.getExecutionTimeout())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAnalysisQuery()) { - hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisQuery().hashCode(); - } - hash = (37 * hash) + SAVED_ANALYSIS_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getSavedAnalysisQuery().hashCode(); - if (hasExecutionTimeout()) { - hash = (37 * hash) + EXECUTION_TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getExecutionTimeout().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A request message for
-   * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyRequest) - com.google.cloud.asset.v1.AnalyzeIamPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (analysisQueryBuilder_ == null) { - analysisQuery_ = null; - } else { - analysisQuery_ = null; - analysisQueryBuilder_ = null; - } - savedAnalysisQuery_ = ""; - - if (executionTimeoutBuilder_ == null) { - executionTimeout_ = null; - } else { - executionTimeout_ = null; - executionTimeoutBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest build() { - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest buildPartial() { - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest result = new com.google.cloud.asset.v1.AnalyzeIamPolicyRequest(this); - if (analysisQueryBuilder_ == null) { - result.analysisQuery_ = analysisQuery_; - } else { - result.analysisQuery_ = analysisQueryBuilder_.build(); - } - result.savedAnalysisQuery_ = savedAnalysisQuery_; - if (executionTimeoutBuilder_ == null) { - result.executionTimeout_ = executionTimeout_; - } else { - result.executionTimeout_ = executionTimeoutBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest other) { - if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance()) return this; - if (other.hasAnalysisQuery()) { - mergeAnalysisQuery(other.getAnalysisQuery()); - } - if (!other.getSavedAnalysisQuery().isEmpty()) { - savedAnalysisQuery_ = other.savedAnalysisQuery_; - onChanged(); - } - if (other.hasExecutionTimeout()) { - mergeExecutionTimeout(other.getExecutionTimeout()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> analysisQueryBuilder_; - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the analysisQuery field is set. - */ - public boolean hasAnalysisQuery() { - return analysisQueryBuilder_ != null || analysisQuery_ != null; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The analysisQuery. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { - if (analysisQueryBuilder_ == null) { - return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } else { - return analysisQueryBuilder_.getMessage(); - } - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (analysisQueryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisQuery_ = value; - onChanged(); - } else { - analysisQueryBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setAnalysisQuery( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { - if (analysisQueryBuilder_ == null) { - analysisQuery_ = builderForValue.build(); - onChanged(); - } else { - analysisQueryBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (analysisQueryBuilder_ == null) { - if (analysisQuery_ != null) { - analysisQuery_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_).mergeFrom(value).buildPartial(); - } else { - analysisQuery_ = value; - } - onChanged(); - } else { - analysisQueryBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearAnalysisQuery() { - if (analysisQueryBuilder_ == null) { - analysisQuery_ = null; - onChanged(); - } else { - analysisQuery_ = null; - analysisQueryBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { - - onChanged(); - return getAnalysisQueryFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { - if (analysisQueryBuilder_ != null) { - return analysisQueryBuilder_.getMessageOrBuilder(); - } else { - return analysisQuery_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } - } - /** - *
-     * Required. The request query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> - getAnalysisQueryFieldBuilder() { - if (analysisQueryBuilder_ == null) { - analysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( - getAnalysisQuery(), - getParentForChildren(), - isClean()); - analysisQuery_ = null; - } - return analysisQueryBuilder_; - } - - private java.lang.Object savedAnalysisQuery_ = ""; - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * page.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The savedAnalysisQuery. - */ - public java.lang.String getSavedAnalysisQuery() { - java.lang.Object ref = savedAnalysisQuery_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - savedAnalysisQuery_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * page.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for savedAnalysisQuery. - */ - public com.google.protobuf.ByteString - getSavedAnalysisQueryBytes() { - java.lang.Object ref = savedAnalysisQuery_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - savedAnalysisQuery_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * page.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The savedAnalysisQuery to set. - * @return This builder for chaining. - */ - public Builder setSavedAnalysisQuery( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - savedAnalysisQuery_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * page.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearSavedAnalysisQuery() { - - savedAnalysisQuery_ = getDefaultInstance().getSavedAnalysisQuery(); - onChanged(); - return this; - } - /** - *
-     * Optional. The name of a saved query, which must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * If both `analysis_query` and `saved_analysis_query` are provided, they
-     * will be merged together with the `saved_analysis_query` as base and
-     * the `analysis_query` as overrides. For more details of the merge behavior,
-     * please refer to the
-     * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-     * page.
-     * Note that you cannot override primitive fields with default value, such as
-     * 0 or empty string, etc., because we use proto3, which doesn't support field
-     * presence yet.
-     * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for savedAnalysisQuery to set. - * @return This builder for chaining. - */ - public Builder setSavedAnalysisQueryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - savedAnalysisQuery_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Duration executionTimeout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> executionTimeoutBuilder_; - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the executionTimeout field is set. - */ - public boolean hasExecutionTimeout() { - return executionTimeoutBuilder_ != null || executionTimeout_ != null; - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The executionTimeout. - */ - public com.google.protobuf.Duration getExecutionTimeout() { - if (executionTimeoutBuilder_ == null) { - return executionTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : executionTimeout_; - } else { - return executionTimeoutBuilder_.getMessage(); - } - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setExecutionTimeout(com.google.protobuf.Duration value) { - if (executionTimeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - executionTimeout_ = value; - onChanged(); - } else { - executionTimeoutBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setExecutionTimeout( - com.google.protobuf.Duration.Builder builderForValue) { - if (executionTimeoutBuilder_ == null) { - executionTimeout_ = builderForValue.build(); - onChanged(); - } else { - executionTimeoutBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeExecutionTimeout(com.google.protobuf.Duration value) { - if (executionTimeoutBuilder_ == null) { - if (executionTimeout_ != null) { - executionTimeout_ = - com.google.protobuf.Duration.newBuilder(executionTimeout_).mergeFrom(value).buildPartial(); - } else { - executionTimeout_ = value; - } - onChanged(); - } else { - executionTimeoutBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearExecutionTimeout() { - if (executionTimeoutBuilder_ == null) { - executionTimeout_ = null; - onChanged(); - } else { - executionTimeout_ = null; - executionTimeoutBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.Duration.Builder getExecutionTimeoutBuilder() { - - onChanged(); - return getExecutionTimeoutFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { - if (executionTimeoutBuilder_ != null) { - return executionTimeoutBuilder_.getMessageOrBuilder(); - } else { - return executionTimeout_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : executionTimeout_; - } - } - /** - *
-     * Optional. Amount of time executable has to complete.  See JSON
-     * representation of
-     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-     * If this field is set with a value less than the RPC deadline, and the
-     * execution of your query hasn't finished in the specified
-     * execution timeout,  you will get a response with partial result.
-     * Otherwise, your query's execution will continue until the RPC deadline.
-     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-     * Default is empty.
-     * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getExecutionTimeoutFieldBuilder() { - if (executionTimeoutBuilder_ == null) { - executionTimeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getExecutionTimeout(), - getParentForChildren(), - isClean()); - executionTimeout_ = null; - } - return executionTimeoutBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyRequest) - private static final com.google.cloud.asset.v1.AnalyzeIamPolicyRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyRequest(); - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeIamPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java deleted file mode 100644 index 7a590165eced..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java +++ /dev/null @@ -1,131 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface AnalyzeIamPolicyRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the analysisQuery field is set. - */ - boolean hasAnalysisQuery(); - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The analysisQuery. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); - /** - *
-   * Required. The request query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); - - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * page.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The savedAnalysisQuery. - */ - java.lang.String getSavedAnalysisQuery(); - /** - *
-   * Optional. The name of a saved query, which must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * If both `analysis_query` and `saved_analysis_query` are provided, they
-   * will be merged together with the `saved_analysis_query` as base and
-   * the `analysis_query` as overrides. For more details of the merge behavior,
-   * please refer to the
-   * [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details)
-   * page.
-   * Note that you cannot override primitive fields with default value, such as
-   * 0 or empty string, etc., because we use proto3, which doesn't support field
-   * presence yet.
-   * 
- * - * string saved_analysis_query = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for savedAnalysisQuery. - */ - com.google.protobuf.ByteString - getSavedAnalysisQueryBytes(); - - /** - *
-   * Optional. Amount of time executable has to complete.  See JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-   * If this field is set with a value less than the RPC deadline, and the
-   * execution of your query hasn't finished in the specified
-   * execution timeout,  you will get a response with partial result.
-   * Otherwise, your query's execution will continue until the RPC deadline.
-   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-   * Default is empty.
-   * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the executionTimeout field is set. - */ - boolean hasExecutionTimeout(); - /** - *
-   * Optional. Amount of time executable has to complete.  See JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-   * If this field is set with a value less than the RPC deadline, and the
-   * execution of your query hasn't finished in the specified
-   * execution timeout,  you will get a response with partial result.
-   * Otherwise, your query's execution will continue until the RPC deadline.
-   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-   * Default is empty.
-   * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The executionTimeout. - */ - com.google.protobuf.Duration getExecutionTimeout(); - /** - *
-   * Optional. Amount of time executable has to complete.  See JSON
-   * representation of
-   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
-   * If this field is set with a value less than the RPC deadline, and the
-   * execution of your query hasn't finished in the specified
-   * execution timeout,  you will get a response with partial result.
-   * Otherwise, your query's execution will continue until the RPC deadline.
-   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
-   * Default is empty.
-   * 
- * - * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java deleted file mode 100644 index 897d314ac833..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java +++ /dev/null @@ -1,3072 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A response message for
- * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse} - */ -public final class AnalyzeIamPolicyResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse) - AnalyzeIamPolicyResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeIamPolicyResponse.newBuilder() to construct. - private AnalyzeIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeIamPolicyResponse() { - serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeIamPolicyResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeIamPolicyResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder subBuilder = null; - if (mainAnalysis_ != null) { - subBuilder = mainAnalysis_.toBuilder(); - } - mainAnalysis_ = input.readMessage(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mainAnalysis_); - mainAnalysis_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - serviceAccountImpersonationAnalysis_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - serviceAccountImpersonationAnalysis_.add( - input.readMessage(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), extensionRegistry)); - break; - } - case 24: { - - fullyExplored_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - serviceAccountImpersonationAnalysis_ = java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.Builder.class); - } - - public interface IamPolicyAnalysisOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The analysis query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - * @return Whether the analysisQuery field is set. - */ - boolean hasAnalysisQuery(); - /** - *
-     * The analysis query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - * @return The analysisQuery. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); - /** - *
-     * The analysis query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); - - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - java.util.List - getAnalysisResultsList(); - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index); - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - int getAnalysisResultsCount(); - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - java.util.List - getAnalysisResultsOrBuilderList(); - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( - int index); - - /** - *
-     * Represents whether all entries in the
-     * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
-     * have been fully explored to answer the query.
-     * 
- * - * bool fully_explored = 3; - * @return The fullyExplored. - */ - boolean getFullyExplored(); - - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - java.util.List - getNonCriticalErrorsList(); - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index); - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - int getNonCriticalErrorsCount(); - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - java.util.List - getNonCriticalErrorsOrBuilderList(); - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( - int index); - } - /** - *
-   * An analysis message to group the query and results.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} - */ - public static final class IamPolicyAnalysis extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) - IamPolicyAnalysisOrBuilder { - private static final long serialVersionUID = 0L; - // Use IamPolicyAnalysis.newBuilder() to construct. - private IamPolicyAnalysis(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicyAnalysis() { - analysisResults_ = java.util.Collections.emptyList(); - nonCriticalErrors_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicyAnalysis(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicyAnalysis( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (analysisQuery_ != null) { - subBuilder = analysisQuery_.toBuilder(); - } - analysisQuery_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisQuery_); - analysisQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - analysisResults_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - analysisResults_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.parser(), extensionRegistry)); - break; - } - case 24: { - - fullyExplored_ = input.readBool(); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - nonCriticalErrors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - nonCriticalErrors_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder.class); - } - - public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; - /** - *
-     * The analysis query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - * @return Whether the analysisQuery field is set. - */ - @java.lang.Override - public boolean hasAnalysisQuery() { - return analysisQuery_ != null; - } - /** - *
-     * The analysis query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - * @return The analysisQuery. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { - return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } - /** - *
-     * The analysis query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { - return getAnalysisQuery(); - } - - public static final int ANALYSIS_RESULTS_FIELD_NUMBER = 2; - private java.util.List analysisResults_; - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - @java.lang.Override - public java.util.List getAnalysisResultsList() { - return analysisResults_; - } - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - @java.lang.Override - public java.util.List - getAnalysisResultsOrBuilderList() { - return analysisResults_; - } - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - @java.lang.Override - public int getAnalysisResultsCount() { - return analysisResults_.size(); - } - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index) { - return analysisResults_.get(index); - } - /** - *
-     * A list of
-     * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-     * that matches the analysis query, or empty if no result is found.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( - int index) { - return analysisResults_.get(index); - } - - public static final int FULLY_EXPLORED_FIELD_NUMBER = 3; - private boolean fullyExplored_; - /** - *
-     * Represents whether all entries in the
-     * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
-     * have been fully explored to answer the query.
-     * 
- * - * bool fully_explored = 3; - * @return The fullyExplored. - */ - @java.lang.Override - public boolean getFullyExplored() { - return fullyExplored_; - } - - public static final int NON_CRITICAL_ERRORS_FIELD_NUMBER = 5; - private java.util.List nonCriticalErrors_; - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - @java.lang.Override - public java.util.List getNonCriticalErrorsList() { - return nonCriticalErrors_; - } - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - @java.lang.Override - public java.util.List - getNonCriticalErrorsOrBuilderList() { - return nonCriticalErrors_; - } - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - @java.lang.Override - public int getNonCriticalErrorsCount() { - return nonCriticalErrors_.size(); - } - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index) { - return nonCriticalErrors_.get(index); - } - /** - *
-     * A list of non-critical errors happened during the query handling.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( - int index) { - return nonCriticalErrors_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (analysisQuery_ != null) { - output.writeMessage(1, getAnalysisQuery()); - } - for (int i = 0; i < analysisResults_.size(); i++) { - output.writeMessage(2, analysisResults_.get(i)); - } - if (fullyExplored_ != false) { - output.writeBool(3, fullyExplored_); - } - for (int i = 0; i < nonCriticalErrors_.size(); i++) { - output.writeMessage(5, nonCriticalErrors_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (analysisQuery_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAnalysisQuery()); - } - for (int i = 0; i < analysisResults_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, analysisResults_.get(i)); - } - if (fullyExplored_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, fullyExplored_); - } - for (int i = 0; i < nonCriticalErrors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, nonCriticalErrors_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) obj; - - if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; - if (hasAnalysisQuery()) { - if (!getAnalysisQuery() - .equals(other.getAnalysisQuery())) return false; - } - if (!getAnalysisResultsList() - .equals(other.getAnalysisResultsList())) return false; - if (getFullyExplored() - != other.getFullyExplored()) return false; - if (!getNonCriticalErrorsList() - .equals(other.getNonCriticalErrorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAnalysisQuery()) { - hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisQuery().hashCode(); - } - if (getAnalysisResultsCount() > 0) { - hash = (37 * hash) + ANALYSIS_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisResultsList().hashCode(); - } - hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFullyExplored()); - if (getNonCriticalErrorsCount() > 0) { - hash = (37 * hash) + NON_CRITICAL_ERRORS_FIELD_NUMBER; - hash = (53 * hash) + getNonCriticalErrorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * An analysis message to group the query and results.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAnalysisResultsFieldBuilder(); - getNonCriticalErrorsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (analysisQueryBuilder_ == null) { - analysisQuery_ = null; - } else { - analysisQuery_ = null; - analysisQueryBuilder_ = null; - } - if (analysisResultsBuilder_ == null) { - analysisResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - analysisResultsBuilder_.clear(); - } - fullyExplored_ = false; - - if (nonCriticalErrorsBuilder_ == null) { - nonCriticalErrors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - nonCriticalErrorsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis build() { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis buildPartial() { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis(this); - int from_bitField0_ = bitField0_; - if (analysisQueryBuilder_ == null) { - result.analysisQuery_ = analysisQuery_; - } else { - result.analysisQuery_ = analysisQueryBuilder_.build(); - } - if (analysisResultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.analysisResults_ = analysisResults_; - } else { - result.analysisResults_ = analysisResultsBuilder_.build(); - } - result.fullyExplored_ = fullyExplored_; - if (nonCriticalErrorsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.nonCriticalErrors_ = nonCriticalErrors_; - } else { - result.nonCriticalErrors_ = nonCriticalErrorsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other) { - if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance()) return this; - if (other.hasAnalysisQuery()) { - mergeAnalysisQuery(other.getAnalysisQuery()); - } - if (analysisResultsBuilder_ == null) { - if (!other.analysisResults_.isEmpty()) { - if (analysisResults_.isEmpty()) { - analysisResults_ = other.analysisResults_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAnalysisResultsIsMutable(); - analysisResults_.addAll(other.analysisResults_); - } - onChanged(); - } - } else { - if (!other.analysisResults_.isEmpty()) { - if (analysisResultsBuilder_.isEmpty()) { - analysisResultsBuilder_.dispose(); - analysisResultsBuilder_ = null; - analysisResults_ = other.analysisResults_; - bitField0_ = (bitField0_ & ~0x00000001); - analysisResultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAnalysisResultsFieldBuilder() : null; - } else { - analysisResultsBuilder_.addAllMessages(other.analysisResults_); - } - } - } - if (other.getFullyExplored() != false) { - setFullyExplored(other.getFullyExplored()); - } - if (nonCriticalErrorsBuilder_ == null) { - if (!other.nonCriticalErrors_.isEmpty()) { - if (nonCriticalErrors_.isEmpty()) { - nonCriticalErrors_ = other.nonCriticalErrors_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.addAll(other.nonCriticalErrors_); - } - onChanged(); - } - } else { - if (!other.nonCriticalErrors_.isEmpty()) { - if (nonCriticalErrorsBuilder_.isEmpty()) { - nonCriticalErrorsBuilder_.dispose(); - nonCriticalErrorsBuilder_ = null; - nonCriticalErrors_ = other.nonCriticalErrors_; - bitField0_ = (bitField0_ & ~0x00000002); - nonCriticalErrorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNonCriticalErrorsFieldBuilder() : null; - } else { - nonCriticalErrorsBuilder_.addAllMessages(other.nonCriticalErrors_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> analysisQueryBuilder_; - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - * @return Whether the analysisQuery field is set. - */ - public boolean hasAnalysisQuery() { - return analysisQueryBuilder_ != null || analysisQuery_ != null; - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - * @return The analysisQuery. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { - if (analysisQueryBuilder_ == null) { - return analysisQuery_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } else { - return analysisQueryBuilder_.getMessage(); - } - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (analysisQueryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisQuery_ = value; - onChanged(); - } else { - analysisQueryBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - public Builder setAnalysisQuery( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { - if (analysisQueryBuilder_ == null) { - analysisQuery_ = builderForValue.build(); - onChanged(); - } else { - analysisQueryBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (analysisQueryBuilder_ == null) { - if (analysisQuery_ != null) { - analysisQuery_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_).mergeFrom(value).buildPartial(); - } else { - analysisQuery_ = value; - } - onChanged(); - } else { - analysisQueryBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - public Builder clearAnalysisQuery() { - if (analysisQueryBuilder_ == null) { - analysisQuery_ = null; - onChanged(); - } else { - analysisQuery_ = null; - analysisQueryBuilder_ = null; - } - - return this; - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { - - onChanged(); - return getAnalysisQueryFieldBuilder().getBuilder(); - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { - if (analysisQueryBuilder_ != null) { - return analysisQueryBuilder_.getMessageOrBuilder(); - } else { - return analysisQuery_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() : analysisQuery_; - } - } - /** - *
-       * The analysis query.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> - getAnalysisQueryFieldBuilder() { - if (analysisQueryBuilder_ == null) { - analysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( - getAnalysisQuery(), - getParentForChildren(), - isClean()); - analysisQuery_ = null; - } - return analysisQueryBuilder_; - } - - private java.util.List analysisResults_ = - java.util.Collections.emptyList(); - private void ensureAnalysisResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - analysisResults_ = new java.util.ArrayList(analysisResults_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder> analysisResultsBuilder_; - - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public java.util.List getAnalysisResultsList() { - if (analysisResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(analysisResults_); - } else { - return analysisResultsBuilder_.getMessageList(); - } - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public int getAnalysisResultsCount() { - if (analysisResultsBuilder_ == null) { - return analysisResults_.size(); - } else { - return analysisResultsBuilder_.getCount(); - } - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index) { - if (analysisResultsBuilder_ == null) { - return analysisResults_.get(index); - } else { - return analysisResultsBuilder_.getMessage(index); - } - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder setAnalysisResults( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { - if (analysisResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisResultsIsMutable(); - analysisResults_.set(index, value); - onChanged(); - } else { - analysisResultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder setAnalysisResults( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { - if (analysisResultsBuilder_ == null) { - ensureAnalysisResultsIsMutable(); - analysisResults_.set(index, builderForValue.build()); - onChanged(); - } else { - analysisResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder addAnalysisResults(com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { - if (analysisResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisResultsIsMutable(); - analysisResults_.add(value); - onChanged(); - } else { - analysisResultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder addAnalysisResults( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { - if (analysisResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnalysisResultsIsMutable(); - analysisResults_.add(index, value); - onChanged(); - } else { - analysisResultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder addAnalysisResults( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { - if (analysisResultsBuilder_ == null) { - ensureAnalysisResultsIsMutable(); - analysisResults_.add(builderForValue.build()); - onChanged(); - } else { - analysisResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder addAnalysisResults( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { - if (analysisResultsBuilder_ == null) { - ensureAnalysisResultsIsMutable(); - analysisResults_.add(index, builderForValue.build()); - onChanged(); - } else { - analysisResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder addAllAnalysisResults( - java.lang.Iterable values) { - if (analysisResultsBuilder_ == null) { - ensureAnalysisResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, analysisResults_); - onChanged(); - } else { - analysisResultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder clearAnalysisResults() { - if (analysisResultsBuilder_ == null) { - analysisResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - analysisResultsBuilder_.clear(); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public Builder removeAnalysisResults(int index) { - if (analysisResultsBuilder_ == null) { - ensureAnalysisResultsIsMutable(); - analysisResults_.remove(index); - onChanged(); - } else { - analysisResultsBuilder_.remove(index); - } - return this; - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder getAnalysisResultsBuilder( - int index) { - return getAnalysisResultsFieldBuilder().getBuilder(index); - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( - int index) { - if (analysisResultsBuilder_ == null) { - return analysisResults_.get(index); } else { - return analysisResultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public java.util.List - getAnalysisResultsOrBuilderList() { - if (analysisResultsBuilder_ != null) { - return analysisResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(analysisResults_); - } - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder addAnalysisResultsBuilder() { - return getAnalysisResultsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()); - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder addAnalysisResultsBuilder( - int index) { - return getAnalysisResultsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()); - } - /** - *
-       * A list of
-       * [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
-       * that matches the analysis query, or empty if no result is found.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; - */ - public java.util.List - getAnalysisResultsBuilderList() { - return getAnalysisResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder> - getAnalysisResultsFieldBuilder() { - if (analysisResultsBuilder_ == null) { - analysisResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder>( - analysisResults_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - analysisResults_ = null; - } - return analysisResultsBuilder_; - } - - private boolean fullyExplored_ ; - /** - *
-       * Represents whether all entries in the
-       * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
-       * have been fully explored to answer the query.
-       * 
- * - * bool fully_explored = 3; - * @return The fullyExplored. - */ - @java.lang.Override - public boolean getFullyExplored() { - return fullyExplored_; - } - /** - *
-       * Represents whether all entries in the
-       * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
-       * have been fully explored to answer the query.
-       * 
- * - * bool fully_explored = 3; - * @param value The fullyExplored to set. - * @return This builder for chaining. - */ - public Builder setFullyExplored(boolean value) { - - fullyExplored_ = value; - onChanged(); - return this; - } - /** - *
-       * Represents whether all entries in the
-       * [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results]
-       * have been fully explored to answer the query.
-       * 
- * - * bool fully_explored = 3; - * @return This builder for chaining. - */ - public Builder clearFullyExplored() { - - fullyExplored_ = false; - onChanged(); - return this; - } - - private java.util.List nonCriticalErrors_ = - java.util.Collections.emptyList(); - private void ensureNonCriticalErrorsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - nonCriticalErrors_ = new java.util.ArrayList(nonCriticalErrors_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> nonCriticalErrorsBuilder_; - - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public java.util.List getNonCriticalErrorsList() { - if (nonCriticalErrorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(nonCriticalErrors_); - } else { - return nonCriticalErrorsBuilder_.getMessageList(); - } - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public int getNonCriticalErrorsCount() { - if (nonCriticalErrorsBuilder_ == null) { - return nonCriticalErrors_.size(); - } else { - return nonCriticalErrorsBuilder_.getCount(); - } - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index) { - if (nonCriticalErrorsBuilder_ == null) { - return nonCriticalErrors_.get(index); - } else { - return nonCriticalErrorsBuilder_.getMessage(index); - } - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder setNonCriticalErrors( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (nonCriticalErrorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.set(index, value); - onChanged(); - } else { - nonCriticalErrorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder setNonCriticalErrors( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { - if (nonCriticalErrorsBuilder_ == null) { - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.set(index, builderForValue.build()); - onChanged(); - } else { - nonCriticalErrorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder addNonCriticalErrors(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (nonCriticalErrorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.add(value); - onChanged(); - } else { - nonCriticalErrorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder addNonCriticalErrors( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (nonCriticalErrorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.add(index, value); - onChanged(); - } else { - nonCriticalErrorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder addNonCriticalErrors( - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { - if (nonCriticalErrorsBuilder_ == null) { - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.add(builderForValue.build()); - onChanged(); - } else { - nonCriticalErrorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder addNonCriticalErrors( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { - if (nonCriticalErrorsBuilder_ == null) { - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.add(index, builderForValue.build()); - onChanged(); - } else { - nonCriticalErrorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder addAllNonCriticalErrors( - java.lang.Iterable values) { - if (nonCriticalErrorsBuilder_ == null) { - ensureNonCriticalErrorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, nonCriticalErrors_); - onChanged(); - } else { - nonCriticalErrorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder clearNonCriticalErrors() { - if (nonCriticalErrorsBuilder_ == null) { - nonCriticalErrors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - nonCriticalErrorsBuilder_.clear(); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public Builder removeNonCriticalErrors(int index) { - if (nonCriticalErrorsBuilder_ == null) { - ensureNonCriticalErrorsIsMutable(); - nonCriticalErrors_.remove(index); - onChanged(); - } else { - nonCriticalErrorsBuilder_.remove(index); - } - return this; - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getNonCriticalErrorsBuilder( - int index) { - return getNonCriticalErrorsFieldBuilder().getBuilder(index); - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( - int index) { - if (nonCriticalErrorsBuilder_ == null) { - return nonCriticalErrors_.get(index); } else { - return nonCriticalErrorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public java.util.List - getNonCriticalErrorsOrBuilderList() { - if (nonCriticalErrorsBuilder_ != null) { - return nonCriticalErrorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(nonCriticalErrors_); - } - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder addNonCriticalErrorsBuilder() { - return getNonCriticalErrorsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()); - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder addNonCriticalErrorsBuilder( - int index) { - return getNonCriticalErrorsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()); - } - /** - *
-       * A list of non-critical errors happened during the query handling.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; - */ - public java.util.List - getNonCriticalErrorsBuilderList() { - return getNonCriticalErrorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> - getNonCriticalErrorsFieldBuilder() { - if (nonCriticalErrorsBuilder_ == null) { - nonCriticalErrorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( - nonCriticalErrors_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - nonCriticalErrors_ = null; - } - return nonCriticalErrorsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) - private static final com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis(); - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicyAnalysis parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysis(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int MAIN_ANALYSIS_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis mainAnalysis_; - /** - *
-   * The main analysis that matches the original request.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - * @return Whether the mainAnalysis field is set. - */ - @java.lang.Override - public boolean hasMainAnalysis() { - return mainAnalysis_ != null; - } - /** - *
-   * The main analysis that matches the original request.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - * @return The mainAnalysis. - */ - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis() { - return mainAnalysis_ == null ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance() : mainAnalysis_; - } - /** - *
-   * The main analysis that matches the original request.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getMainAnalysisOrBuilder() { - return getMainAnalysis(); - } - - public static final int SERVICE_ACCOUNT_IMPERSONATION_ANALYSIS_FIELD_NUMBER = 2; - private java.util.List serviceAccountImpersonationAnalysis_; - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - @java.lang.Override - public java.util.List getServiceAccountImpersonationAnalysisList() { - return serviceAccountImpersonationAnalysis_; - } - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - @java.lang.Override - public java.util.List - getServiceAccountImpersonationAnalysisOrBuilderList() { - return serviceAccountImpersonationAnalysis_; - } - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - @java.lang.Override - public int getServiceAccountImpersonationAnalysisCount() { - return serviceAccountImpersonationAnalysis_.size(); - } - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getServiceAccountImpersonationAnalysis(int index) { - return serviceAccountImpersonationAnalysis_.get(index); - } - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getServiceAccountImpersonationAnalysisOrBuilder( - int index) { - return serviceAccountImpersonationAnalysis_.get(index); - } - - public static final int FULLY_EXPLORED_FIELD_NUMBER = 3; - private boolean fullyExplored_; - /** - *
-   * Represents whether all entries in the
-   * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
-   * and
-   * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
-   * have been fully explored to answer the query in the request.
-   * 
- * - * bool fully_explored = 3; - * @return The fullyExplored. - */ - @java.lang.Override - public boolean getFullyExplored() { - return fullyExplored_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (mainAnalysis_ != null) { - output.writeMessage(1, getMainAnalysis()); - } - for (int i = 0; i < serviceAccountImpersonationAnalysis_.size(); i++) { - output.writeMessage(2, serviceAccountImpersonationAnalysis_.get(i)); - } - if (fullyExplored_ != false) { - output.writeBool(3, fullyExplored_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (mainAnalysis_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMainAnalysis()); - } - for (int i = 0; i < serviceAccountImpersonationAnalysis_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, serviceAccountImpersonationAnalysis_.get(i)); - } - if (fullyExplored_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, fullyExplored_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse other = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) obj; - - if (hasMainAnalysis() != other.hasMainAnalysis()) return false; - if (hasMainAnalysis()) { - if (!getMainAnalysis() - .equals(other.getMainAnalysis())) return false; - } - if (!getServiceAccountImpersonationAnalysisList() - .equals(other.getServiceAccountImpersonationAnalysisList())) return false; - if (getFullyExplored() - != other.getFullyExplored()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMainAnalysis()) { - hash = (37 * hash) + MAIN_ANALYSIS_FIELD_NUMBER; - hash = (53 * hash) + getMainAnalysis().hashCode(); - } - if (getServiceAccountImpersonationAnalysisCount() > 0) { - hash = (37 * hash) + SERVICE_ACCOUNT_IMPERSONATION_ANALYSIS_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountImpersonationAnalysisList().hashCode(); - } - hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFullyExplored()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A response message for
-   * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse) - com.google.cloud.asset.v1.AnalyzeIamPolicyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getServiceAccountImpersonationAnalysisFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (mainAnalysisBuilder_ == null) { - mainAnalysis_ = null; - } else { - mainAnalysis_ = null; - mainAnalysisBuilder_ = null; - } - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - serviceAccountImpersonationAnalysisBuilder_.clear(); - } - fullyExplored_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse build() { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse buildPartial() { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse result = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse(this); - int from_bitField0_ = bitField0_; - if (mainAnalysisBuilder_ == null) { - result.mainAnalysis_ = mainAnalysis_; - } else { - result.mainAnalysis_ = mainAnalysisBuilder_.build(); - } - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - serviceAccountImpersonationAnalysis_ = java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.serviceAccountImpersonationAnalysis_ = serviceAccountImpersonationAnalysis_; - } else { - result.serviceAccountImpersonationAnalysis_ = serviceAccountImpersonationAnalysisBuilder_.build(); - } - result.fullyExplored_ = fullyExplored_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse other) { - if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance()) return this; - if (other.hasMainAnalysis()) { - mergeMainAnalysis(other.getMainAnalysis()); - } - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - if (!other.serviceAccountImpersonationAnalysis_.isEmpty()) { - if (serviceAccountImpersonationAnalysis_.isEmpty()) { - serviceAccountImpersonationAnalysis_ = other.serviceAccountImpersonationAnalysis_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.addAll(other.serviceAccountImpersonationAnalysis_); - } - onChanged(); - } - } else { - if (!other.serviceAccountImpersonationAnalysis_.isEmpty()) { - if (serviceAccountImpersonationAnalysisBuilder_.isEmpty()) { - serviceAccountImpersonationAnalysisBuilder_.dispose(); - serviceAccountImpersonationAnalysisBuilder_ = null; - serviceAccountImpersonationAnalysis_ = other.serviceAccountImpersonationAnalysis_; - bitField0_ = (bitField0_ & ~0x00000001); - serviceAccountImpersonationAnalysisBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getServiceAccountImpersonationAnalysisFieldBuilder() : null; - } else { - serviceAccountImpersonationAnalysisBuilder_.addAllMessages(other.serviceAccountImpersonationAnalysis_); - } - } - } - if (other.getFullyExplored() != false) { - setFullyExplored(other.getFullyExplored()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis mainAnalysis_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> mainAnalysisBuilder_; - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - * @return Whether the mainAnalysis field is set. - */ - public boolean hasMainAnalysis() { - return mainAnalysisBuilder_ != null || mainAnalysis_ != null; - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - * @return The mainAnalysis. - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis() { - if (mainAnalysisBuilder_ == null) { - return mainAnalysis_ == null ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance() : mainAnalysis_; - } else { - return mainAnalysisBuilder_.getMessage(); - } - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - public Builder setMainAnalysis(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { - if (mainAnalysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mainAnalysis_ = value; - onChanged(); - } else { - mainAnalysisBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - public Builder setMainAnalysis( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { - if (mainAnalysisBuilder_ == null) { - mainAnalysis_ = builderForValue.build(); - onChanged(); - } else { - mainAnalysisBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - public Builder mergeMainAnalysis(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { - if (mainAnalysisBuilder_ == null) { - if (mainAnalysis_ != null) { - mainAnalysis_ = - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder(mainAnalysis_).mergeFrom(value).buildPartial(); - } else { - mainAnalysis_ = value; - } - onChanged(); - } else { - mainAnalysisBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - public Builder clearMainAnalysis() { - if (mainAnalysisBuilder_ == null) { - mainAnalysis_ = null; - onChanged(); - } else { - mainAnalysis_ = null; - mainAnalysisBuilder_ = null; - } - - return this; - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder getMainAnalysisBuilder() { - - onChanged(); - return getMainAnalysisFieldBuilder().getBuilder(); - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getMainAnalysisOrBuilder() { - if (mainAnalysisBuilder_ != null) { - return mainAnalysisBuilder_.getMessageOrBuilder(); - } else { - return mainAnalysis_ == null ? - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance() : mainAnalysis_; - } - } - /** - *
-     * The main analysis that matches the original request.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> - getMainAnalysisFieldBuilder() { - if (mainAnalysisBuilder_ == null) { - mainAnalysisBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder>( - getMainAnalysis(), - getParentForChildren(), - isClean()); - mainAnalysis_ = null; - } - return mainAnalysisBuilder_; - } - - private java.util.List serviceAccountImpersonationAnalysis_ = - java.util.Collections.emptyList(); - private void ensureServiceAccountImpersonationAnalysisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - serviceAccountImpersonationAnalysis_ = new java.util.ArrayList(serviceAccountImpersonationAnalysis_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> serviceAccountImpersonationAnalysisBuilder_; - - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public java.util.List getServiceAccountImpersonationAnalysisList() { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - return java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); - } else { - return serviceAccountImpersonationAnalysisBuilder_.getMessageList(); - } - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public int getServiceAccountImpersonationAnalysisCount() { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - return serviceAccountImpersonationAnalysis_.size(); - } else { - return serviceAccountImpersonationAnalysisBuilder_.getCount(); - } - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getServiceAccountImpersonationAnalysis(int index) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - return serviceAccountImpersonationAnalysis_.get(index); - } else { - return serviceAccountImpersonationAnalysisBuilder_.getMessage(index); - } - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder setServiceAccountImpersonationAnalysis( - int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.set(index, value); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder setServiceAccountImpersonationAnalysis( - int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.set(index, builderForValue.build()); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder addServiceAccountImpersonationAnalysis(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.add(value); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder addServiceAccountImpersonationAnalysis( - int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.add(index, value); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder addServiceAccountImpersonationAnalysis( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.add(builderForValue.build()); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder addServiceAccountImpersonationAnalysis( - int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder builderForValue) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.add(index, builderForValue.build()); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder addAllServiceAccountImpersonationAnalysis( - java.lang.Iterable values) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - ensureServiceAccountImpersonationAnalysisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, serviceAccountImpersonationAnalysis_); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder clearServiceAccountImpersonationAnalysis() { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.clear(); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public Builder removeServiceAccountImpersonationAnalysis(int index) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - ensureServiceAccountImpersonationAnalysisIsMutable(); - serviceAccountImpersonationAnalysis_.remove(index); - onChanged(); - } else { - serviceAccountImpersonationAnalysisBuilder_.remove(index); - } - return this; - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder getServiceAccountImpersonationAnalysisBuilder( - int index) { - return getServiceAccountImpersonationAnalysisFieldBuilder().getBuilder(index); - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getServiceAccountImpersonationAnalysisOrBuilder( - int index) { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - return serviceAccountImpersonationAnalysis_.get(index); } else { - return serviceAccountImpersonationAnalysisBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public java.util.List - getServiceAccountImpersonationAnalysisOrBuilderList() { - if (serviceAccountImpersonationAnalysisBuilder_ != null) { - return serviceAccountImpersonationAnalysisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); - } - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder addServiceAccountImpersonationAnalysisBuilder() { - return getServiceAccountImpersonationAnalysisFieldBuilder().addBuilder( - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance()); - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder addServiceAccountImpersonationAnalysisBuilder( - int index) { - return getServiceAccountImpersonationAnalysisFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance()); - } - /** - *
-     * The service account impersonation analysis if
-     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-     * enabled.
-     * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - public java.util.List - getServiceAccountImpersonationAnalysisBuilderList() { - return getServiceAccountImpersonationAnalysisFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> - getServiceAccountImpersonationAnalysisFieldBuilder() { - if (serviceAccountImpersonationAnalysisBuilder_ == null) { - serviceAccountImpersonationAnalysisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder>( - serviceAccountImpersonationAnalysis_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - serviceAccountImpersonationAnalysis_ = null; - } - return serviceAccountImpersonationAnalysisBuilder_; - } - - private boolean fullyExplored_ ; - /** - *
-     * Represents whether all entries in the
-     * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
-     * and
-     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
-     * have been fully explored to answer the query in the request.
-     * 
- * - * bool fully_explored = 3; - * @return The fullyExplored. - */ - @java.lang.Override - public boolean getFullyExplored() { - return fullyExplored_; - } - /** - *
-     * Represents whether all entries in the
-     * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
-     * and
-     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
-     * have been fully explored to answer the query in the request.
-     * 
- * - * bool fully_explored = 3; - * @param value The fullyExplored to set. - * @return This builder for chaining. - */ - public Builder setFullyExplored(boolean value) { - - fullyExplored_ = value; - onChanged(); - return this; - } - /** - *
-     * Represents whether all entries in the
-     * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
-     * and
-     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
-     * have been fully explored to answer the query in the request.
-     * 
- * - * bool fully_explored = 3; - * @return This builder for chaining. - */ - public Builder clearFullyExplored() { - - fullyExplored_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse) - private static final com.google.cloud.asset.v1.AnalyzeIamPolicyResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse(); - } - - public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeIamPolicyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeIamPolicyResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java deleted file mode 100644 index 4eef1b0c3453..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface AnalyzeIamPolicyResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The main analysis that matches the original request.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - * @return Whether the mainAnalysis field is set. - */ - boolean hasMainAnalysis(); - /** - *
-   * The main analysis that matches the original request.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - * @return The mainAnalysis. - */ - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis(); - /** - *
-   * The main analysis that matches the original request.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; - */ - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getMainAnalysisOrBuilder(); - - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - java.util.List - getServiceAccountImpersonationAnalysisList(); - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getServiceAccountImpersonationAnalysis(int index); - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - int getServiceAccountImpersonationAnalysisCount(); - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - java.util.List - getServiceAccountImpersonationAnalysisOrBuilderList(); - /** - *
-   * The service account impersonation analysis if
-   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
-   * enabled.
-   * 
- * - * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; - */ - com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder getServiceAccountImpersonationAnalysisOrBuilder( - int index); - - /** - *
-   * Represents whether all entries in the
-   * [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis]
-   * and
-   * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]
-   * have been fully explored to answer the query in the request.
-   * 
- * - * bool fully_explored = 3; - * @return The fullyExplored. - */ - boolean getFullyExplored(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java deleted file mode 100644 index 2f6d86eb8117..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequest.java +++ /dev/null @@ -1,1092 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * The request message for performing resource move analysis.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveRequest} - */ -public final class AnalyzeMoveRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeMoveRequest) - AnalyzeMoveRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeMoveRequest.newBuilder() to construct. - private AnalyzeMoveRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeMoveRequest() { - resource_ = ""; - destinationParent_ = ""; - view_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeMoveRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeMoveRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - destinationParent_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - - view_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeMoveRequest.class, com.google.cloud.asset.v1.AnalyzeMoveRequest.Builder.class); - } - - /** - *
-   * View enum for supporting partial analysis responses.
-   * 
- * - * Protobuf enum {@code google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView} - */ - public enum AnalysisView - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * The default/unset value.
-     * The API will default to the FULL view.
-     * 
- * - * ANALYSIS_VIEW_UNSPECIFIED = 0; - */ - ANALYSIS_VIEW_UNSPECIFIED(0), - /** - *
-     * Full analysis including all level of impacts of the specified resource
-     * move.
-     * 
- * - * FULL = 1; - */ - FULL(1), - /** - *
-     * Basic analysis only including blockers which will prevent the specified
-     * resource move at runtime.
-     * 
- * - * BASIC = 2; - */ - BASIC(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * The default/unset value.
-     * The API will default to the FULL view.
-     * 
- * - * ANALYSIS_VIEW_UNSPECIFIED = 0; - */ - public static final int ANALYSIS_VIEW_UNSPECIFIED_VALUE = 0; - /** - *
-     * Full analysis including all level of impacts of the specified resource
-     * move.
-     * 
- * - * FULL = 1; - */ - public static final int FULL_VALUE = 1; - /** - *
-     * Basic analysis only including blockers which will prevent the specified
-     * resource move at runtime.
-     * 
- * - * BASIC = 2; - */ - public static final int BASIC_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AnalysisView valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AnalysisView forNumber(int value) { - switch (value) { - case 0: return ANALYSIS_VIEW_UNSPECIFIED; - case 1: return FULL; - case 2: return BASIC; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AnalysisView> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AnalysisView findValueByNumber(int number) { - return AnalysisView.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1.AnalyzeMoveRequest.getDescriptor().getEnumTypes().get(0); - } - - private static final AnalysisView[] VALUES = values(); - - public static AnalysisView valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AnalysisView(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView) - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object resource_; - /** - *
-   * Required. Name of the resource to perform the analysis against.
-   * Only GCP Project are supported as of today. Hence, this can only be Project
-   * ID (such as "projects/my-project-id") or a Project Number (such as
-   * "projects/12345").
-   * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - *
-   * Required. Name of the resource to perform the analysis against.
-   * Only GCP Project are supported as of today. Hence, this can only be Project
-   * ID (such as "projects/my-project-id") or a Project Number (such as
-   * "projects/12345").
-   * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESTINATION_PARENT_FIELD_NUMBER = 2; - private volatile java.lang.Object destinationParent_; - /** - *
-   * Required. Name of the GCP Folder or Organization to reparent the target
-   * resource. The analysis will be performed against hypothetically moving the
-   * resource to this specified desitination parent. This can only be a Folder
-   * number (such as "folders/123") or an Organization number (such as
-   * "organizations/123").
-   * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The destinationParent. - */ - @java.lang.Override - public java.lang.String getDestinationParent() { - java.lang.Object ref = destinationParent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationParent_ = s; - return s; - } - } - /** - *
-   * Required. Name of the GCP Folder or Organization to reparent the target
-   * resource. The analysis will be performed against hypothetically moving the
-   * resource to this specified desitination parent. This can only be a Folder
-   * number (such as "folders/123") or an Organization number (such as
-   * "organizations/123").
-   * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for destinationParent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDestinationParentBytes() { - java.lang.Object ref = destinationParent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - destinationParent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VIEW_FIELD_NUMBER = 3; - private int view_; - /** - *
-   * Analysis view indicating what information should be included in the
-   * analysis response. If unspecified, the default view is FULL.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @return The enum numeric value on the wire for view. - */ - @java.lang.Override public int getViewValue() { - return view_; - } - /** - *
-   * Analysis view indicating what information should be included in the
-   * analysis response. If unspecified, the default view is FULL.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @return The view. - */ - @java.lang.Override public com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView getView() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView result = com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.valueOf(view_); - return result == null ? com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationParent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, destinationParent_); - } - if (view_ != com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.ANALYSIS_VIEW_UNSPECIFIED.getNumber()) { - output.writeEnum(3, view_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationParent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, destinationParent_); - } - if (view_ != com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.ANALYSIS_VIEW_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, view_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeMoveRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeMoveRequest other = (com.google.cloud.asset.v1.AnalyzeMoveRequest) obj; - - if (!getResource() - .equals(other.getResource())) return false; - if (!getDestinationParent() - .equals(other.getDestinationParent())) return false; - if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - hash = (37 * hash) + DESTINATION_PARENT_FIELD_NUMBER; - hash = (53 * hash) + getDestinationParent().hashCode(); - hash = (37 * hash) + VIEW_FIELD_NUMBER; - hash = (53 * hash) + view_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeMoveRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeMoveRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The request message for performing resource move analysis.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeMoveRequest) - com.google.cloud.asset.v1.AnalyzeMoveRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeMoveRequest.class, com.google.cloud.asset.v1.AnalyzeMoveRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeMoveRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resource_ = ""; - - destinationParent_ = ""; - - view_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeMoveRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveRequest build() { - com.google.cloud.asset.v1.AnalyzeMoveRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveRequest buildPartial() { - com.google.cloud.asset.v1.AnalyzeMoveRequest result = new com.google.cloud.asset.v1.AnalyzeMoveRequest(this); - result.resource_ = resource_; - result.destinationParent_ = destinationParent_; - result.view_ = view_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeMoveRequest) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeMoveRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeMoveRequest other) { - if (other == com.google.cloud.asset.v1.AnalyzeMoveRequest.getDefaultInstance()) return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (!other.getDestinationParent().isEmpty()) { - destinationParent_ = other.destinationParent_; - onChanged(); - } - if (other.view_ != 0) { - setViewValue(other.getViewValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeMoveRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeMoveRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object resource_ = ""; - /** - *
-     * Required. Name of the resource to perform the analysis against.
-     * Only GCP Project are supported as of today. Hence, this can only be Project
-     * ID (such as "projects/my-project-id") or a Project Number (such as
-     * "projects/12345").
-     * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the resource to perform the analysis against.
-     * Only GCP Project are supported as of today. Hence, this can only be Project
-     * ID (such as "projects/my-project-id") or a Project Number (such as
-     * "projects/12345").
-     * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the resource to perform the analysis against.
-     * Only GCP Project are supported as of today. Hence, this can only be Project
-     * ID (such as "projects/my-project-id") or a Project Number (such as
-     * "projects/12345").
-     * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the resource to perform the analysis against.
-     * Only GCP Project are supported as of today. Hence, this can only be Project
-     * ID (such as "projects/my-project-id") or a Project Number (such as
-     * "projects/12345").
-     * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the resource to perform the analysis against.
-     * Only GCP Project are supported as of today. Hence, this can only be Project
-     * ID (such as "projects/my-project-id") or a Project Number (such as
-     * "projects/12345").
-     * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; - } - - private java.lang.Object destinationParent_ = ""; - /** - *
-     * Required. Name of the GCP Folder or Organization to reparent the target
-     * resource. The analysis will be performed against hypothetically moving the
-     * resource to this specified desitination parent. This can only be a Folder
-     * number (such as "folders/123") or an Organization number (such as
-     * "organizations/123").
-     * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The destinationParent. - */ - public java.lang.String getDestinationParent() { - java.lang.Object ref = destinationParent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - destinationParent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the GCP Folder or Organization to reparent the target
-     * resource. The analysis will be performed against hypothetically moving the
-     * resource to this specified desitination parent. This can only be a Folder
-     * number (such as "folders/123") or an Organization number (such as
-     * "organizations/123").
-     * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for destinationParent. - */ - public com.google.protobuf.ByteString - getDestinationParentBytes() { - java.lang.Object ref = destinationParent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - destinationParent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the GCP Folder or Organization to reparent the target
-     * resource. The analysis will be performed against hypothetically moving the
-     * resource to this specified desitination parent. This can only be a Folder
-     * number (such as "folders/123") or an Organization number (such as
-     * "organizations/123").
-     * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The destinationParent to set. - * @return This builder for chaining. - */ - public Builder setDestinationParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - destinationParent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the GCP Folder or Organization to reparent the target
-     * resource. The analysis will be performed against hypothetically moving the
-     * resource to this specified desitination parent. This can only be a Folder
-     * number (such as "folders/123") or an Organization number (such as
-     * "organizations/123").
-     * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearDestinationParent() { - - destinationParent_ = getDefaultInstance().getDestinationParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the GCP Folder or Organization to reparent the target
-     * resource. The analysis will be performed against hypothetically moving the
-     * resource to this specified desitination parent. This can only be a Folder
-     * number (such as "folders/123") or an Organization number (such as
-     * "organizations/123").
-     * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for destinationParent to set. - * @return This builder for chaining. - */ - public Builder setDestinationParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - destinationParent_ = value; - onChanged(); - return this; - } - - private int view_ = 0; - /** - *
-     * Analysis view indicating what information should be included in the
-     * analysis response. If unspecified, the default view is FULL.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @return The enum numeric value on the wire for view. - */ - @java.lang.Override public int getViewValue() { - return view_; - } - /** - *
-     * Analysis view indicating what information should be included in the
-     * analysis response. If unspecified, the default view is FULL.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @param value The enum numeric value on the wire for view to set. - * @return This builder for chaining. - */ - public Builder setViewValue(int value) { - - view_ = value; - onChanged(); - return this; - } - /** - *
-     * Analysis view indicating what information should be included in the
-     * analysis response. If unspecified, the default view is FULL.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @return The view. - */ - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView getView() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView result = com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.valueOf(view_); - return result == null ? com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView.UNRECOGNIZED : result; - } - /** - *
-     * Analysis view indicating what information should be included in the
-     * analysis response. If unspecified, the default view is FULL.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @param value The view to set. - * @return This builder for chaining. - */ - public Builder setView(com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView value) { - if (value == null) { - throw new NullPointerException(); - } - - view_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Analysis view indicating what information should be included in the
-     * analysis response. If unspecified, the default view is FULL.
-     * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @return This builder for chaining. - */ - public Builder clearView() { - - view_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeMoveRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeMoveRequest) - private static final com.google.cloud.asset.v1.AnalyzeMoveRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeMoveRequest(); - } - - public static com.google.cloud.asset.v1.AnalyzeMoveRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeMoveRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeMoveRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java deleted file mode 100644 index 9823f3719da8..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface AnalyzeMoveRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeMoveRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the resource to perform the analysis against.
-   * Only GCP Project are supported as of today. Hence, this can only be Project
-   * ID (such as "projects/my-project-id") or a Project Number (such as
-   * "projects/12345").
-   * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The resource. - */ - java.lang.String getResource(); - /** - *
-   * Required. Name of the resource to perform the analysis against.
-   * Only GCP Project are supported as of today. Hence, this can only be Project
-   * ID (such as "projects/my-project-id") or a Project Number (such as
-   * "projects/12345").
-   * 
- * - * string resource = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for resource. - */ - com.google.protobuf.ByteString - getResourceBytes(); - - /** - *
-   * Required. Name of the GCP Folder or Organization to reparent the target
-   * resource. The analysis will be performed against hypothetically moving the
-   * resource to this specified desitination parent. This can only be a Folder
-   * number (such as "folders/123") or an Organization number (such as
-   * "organizations/123").
-   * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The destinationParent. - */ - java.lang.String getDestinationParent(); - /** - *
-   * Required. Name of the GCP Folder or Organization to reparent the target
-   * resource. The analysis will be performed against hypothetically moving the
-   * resource to this specified desitination parent. This can only be a Folder
-   * number (such as "folders/123") or an Organization number (such as
-   * "organizations/123").
-   * 
- * - * string destination_parent = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for destinationParent. - */ - com.google.protobuf.ByteString - getDestinationParentBytes(); - - /** - *
-   * Analysis view indicating what information should be included in the
-   * analysis response. If unspecified, the default view is FULL.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @return The enum numeric value on the wire for view. - */ - int getViewValue(); - /** - *
-   * Analysis view indicating what information should be included in the
-   * analysis response. If unspecified, the default view is FULL.
-   * 
- * - * .google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView view = 3; - * @return The view. - */ - com.google.cloud.asset.v1.AnalyzeMoveRequest.AnalysisView getView(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java deleted file mode 100644 index ae20bed35f4b..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponse.java +++ /dev/null @@ -1,895 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * The response message for resource move analysis.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveResponse} - */ -public final class AnalyzeMoveResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeMoveResponse) - AnalyzeMoveResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use AnalyzeMoveResponse.newBuilder() to construct. - private AnalyzeMoveResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AnalyzeMoveResponse() { - moveAnalysis_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AnalyzeMoveResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeMoveResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - moveAnalysis_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - moveAnalysis_.add( - input.readMessage(com.google.cloud.asset.v1.MoveAnalysis.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - moveAnalysis_ = java.util.Collections.unmodifiableList(moveAnalysis_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeMoveResponse.class, com.google.cloud.asset.v1.AnalyzeMoveResponse.Builder.class); - } - - public static final int MOVE_ANALYSIS_FIELD_NUMBER = 1; - private java.util.List moveAnalysis_; - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - @java.lang.Override - public java.util.List getMoveAnalysisList() { - return moveAnalysis_; - } - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - @java.lang.Override - public java.util.List - getMoveAnalysisOrBuilderList() { - return moveAnalysis_; - } - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - @java.lang.Override - public int getMoveAnalysisCount() { - return moveAnalysis_.size(); - } - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysis getMoveAnalysis(int index) { - return moveAnalysis_.get(index); - } - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisOrBuilder getMoveAnalysisOrBuilder( - int index) { - return moveAnalysis_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < moveAnalysis_.size(); i++) { - output.writeMessage(1, moveAnalysis_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < moveAnalysis_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, moveAnalysis_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AnalyzeMoveResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AnalyzeMoveResponse other = (com.google.cloud.asset.v1.AnalyzeMoveResponse) obj; - - if (!getMoveAnalysisList() - .equals(other.getMoveAnalysisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getMoveAnalysisCount() > 0) { - hash = (37 * hash) + MOVE_ANALYSIS_FIELD_NUMBER; - hash = (53 * hash) + getMoveAnalysisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AnalyzeMoveResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AnalyzeMoveResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The response message for resource move analysis.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AnalyzeMoveResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeMoveResponse) - com.google.cloud.asset.v1.AnalyzeMoveResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AnalyzeMoveResponse.class, com.google.cloud.asset.v1.AnalyzeMoveResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AnalyzeMoveResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMoveAnalysisFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (moveAnalysisBuilder_ == null) { - moveAnalysis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - moveAnalysisBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AnalyzeMoveResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveResponse build() { - com.google.cloud.asset.v1.AnalyzeMoveResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveResponse buildPartial() { - com.google.cloud.asset.v1.AnalyzeMoveResponse result = new com.google.cloud.asset.v1.AnalyzeMoveResponse(this); - int from_bitField0_ = bitField0_; - if (moveAnalysisBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - moveAnalysis_ = java.util.Collections.unmodifiableList(moveAnalysis_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.moveAnalysis_ = moveAnalysis_; - } else { - result.moveAnalysis_ = moveAnalysisBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AnalyzeMoveResponse) { - return mergeFrom((com.google.cloud.asset.v1.AnalyzeMoveResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeMoveResponse other) { - if (other == com.google.cloud.asset.v1.AnalyzeMoveResponse.getDefaultInstance()) return this; - if (moveAnalysisBuilder_ == null) { - if (!other.moveAnalysis_.isEmpty()) { - if (moveAnalysis_.isEmpty()) { - moveAnalysis_ = other.moveAnalysis_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMoveAnalysisIsMutable(); - moveAnalysis_.addAll(other.moveAnalysis_); - } - onChanged(); - } - } else { - if (!other.moveAnalysis_.isEmpty()) { - if (moveAnalysisBuilder_.isEmpty()) { - moveAnalysisBuilder_.dispose(); - moveAnalysisBuilder_ = null; - moveAnalysis_ = other.moveAnalysis_; - bitField0_ = (bitField0_ & ~0x00000001); - moveAnalysisBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMoveAnalysisFieldBuilder() : null; - } else { - moveAnalysisBuilder_.addAllMessages(other.moveAnalysis_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AnalyzeMoveResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AnalyzeMoveResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List moveAnalysis_ = - java.util.Collections.emptyList(); - private void ensureMoveAnalysisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - moveAnalysis_ = new java.util.ArrayList(moveAnalysis_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveAnalysis, com.google.cloud.asset.v1.MoveAnalysis.Builder, com.google.cloud.asset.v1.MoveAnalysisOrBuilder> moveAnalysisBuilder_; - - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public java.util.List getMoveAnalysisList() { - if (moveAnalysisBuilder_ == null) { - return java.util.Collections.unmodifiableList(moveAnalysis_); - } else { - return moveAnalysisBuilder_.getMessageList(); - } - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public int getMoveAnalysisCount() { - if (moveAnalysisBuilder_ == null) { - return moveAnalysis_.size(); - } else { - return moveAnalysisBuilder_.getCount(); - } - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public com.google.cloud.asset.v1.MoveAnalysis getMoveAnalysis(int index) { - if (moveAnalysisBuilder_ == null) { - return moveAnalysis_.get(index); - } else { - return moveAnalysisBuilder_.getMessage(index); - } - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder setMoveAnalysis( - int index, com.google.cloud.asset.v1.MoveAnalysis value) { - if (moveAnalysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMoveAnalysisIsMutable(); - moveAnalysis_.set(index, value); - onChanged(); - } else { - moveAnalysisBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder setMoveAnalysis( - int index, com.google.cloud.asset.v1.MoveAnalysis.Builder builderForValue) { - if (moveAnalysisBuilder_ == null) { - ensureMoveAnalysisIsMutable(); - moveAnalysis_.set(index, builderForValue.build()); - onChanged(); - } else { - moveAnalysisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder addMoveAnalysis(com.google.cloud.asset.v1.MoveAnalysis value) { - if (moveAnalysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMoveAnalysisIsMutable(); - moveAnalysis_.add(value); - onChanged(); - } else { - moveAnalysisBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder addMoveAnalysis( - int index, com.google.cloud.asset.v1.MoveAnalysis value) { - if (moveAnalysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMoveAnalysisIsMutable(); - moveAnalysis_.add(index, value); - onChanged(); - } else { - moveAnalysisBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder addMoveAnalysis( - com.google.cloud.asset.v1.MoveAnalysis.Builder builderForValue) { - if (moveAnalysisBuilder_ == null) { - ensureMoveAnalysisIsMutable(); - moveAnalysis_.add(builderForValue.build()); - onChanged(); - } else { - moveAnalysisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder addMoveAnalysis( - int index, com.google.cloud.asset.v1.MoveAnalysis.Builder builderForValue) { - if (moveAnalysisBuilder_ == null) { - ensureMoveAnalysisIsMutable(); - moveAnalysis_.add(index, builderForValue.build()); - onChanged(); - } else { - moveAnalysisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder addAllMoveAnalysis( - java.lang.Iterable values) { - if (moveAnalysisBuilder_ == null) { - ensureMoveAnalysisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, moveAnalysis_); - onChanged(); - } else { - moveAnalysisBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder clearMoveAnalysis() { - if (moveAnalysisBuilder_ == null) { - moveAnalysis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - moveAnalysisBuilder_.clear(); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public Builder removeMoveAnalysis(int index) { - if (moveAnalysisBuilder_ == null) { - ensureMoveAnalysisIsMutable(); - moveAnalysis_.remove(index); - onChanged(); - } else { - moveAnalysisBuilder_.remove(index); - } - return this; - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public com.google.cloud.asset.v1.MoveAnalysis.Builder getMoveAnalysisBuilder( - int index) { - return getMoveAnalysisFieldBuilder().getBuilder(index); - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public com.google.cloud.asset.v1.MoveAnalysisOrBuilder getMoveAnalysisOrBuilder( - int index) { - if (moveAnalysisBuilder_ == null) { - return moveAnalysis_.get(index); } else { - return moveAnalysisBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public java.util.List - getMoveAnalysisOrBuilderList() { - if (moveAnalysisBuilder_ != null) { - return moveAnalysisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(moveAnalysis_); - } - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public com.google.cloud.asset.v1.MoveAnalysis.Builder addMoveAnalysisBuilder() { - return getMoveAnalysisFieldBuilder().addBuilder( - com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance()); - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public com.google.cloud.asset.v1.MoveAnalysis.Builder addMoveAnalysisBuilder( - int index) { - return getMoveAnalysisFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance()); - } - /** - *
-     * The list of analyses returned from performing the intended resource move
-     * analysis. The analysis is grouped by different Cloud services.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - public java.util.List - getMoveAnalysisBuilderList() { - return getMoveAnalysisFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveAnalysis, com.google.cloud.asset.v1.MoveAnalysis.Builder, com.google.cloud.asset.v1.MoveAnalysisOrBuilder> - getMoveAnalysisFieldBuilder() { - if (moveAnalysisBuilder_ == null) { - moveAnalysisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveAnalysis, com.google.cloud.asset.v1.MoveAnalysis.Builder, com.google.cloud.asset.v1.MoveAnalysisOrBuilder>( - moveAnalysis_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - moveAnalysis_ = null; - } - return moveAnalysisBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AnalyzeMoveResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeMoveResponse) - private static final com.google.cloud.asset.v1.AnalyzeMoveResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeMoveResponse(); - } - - public static com.google.cloud.asset.v1.AnalyzeMoveResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnalyzeMoveResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeMoveResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AnalyzeMoveResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java deleted file mode 100644 index 7fea545cedd3..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeMoveResponseOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface AnalyzeMoveResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeMoveResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - java.util.List - getMoveAnalysisList(); - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - com.google.cloud.asset.v1.MoveAnalysis getMoveAnalysis(int index); - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - int getMoveAnalysisCount(); - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - java.util.List - getMoveAnalysisOrBuilderList(); - /** - *
-   * The list of analyses returned from performing the intended resource move
-   * analysis. The analysis is grouped by different Cloud services.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveAnalysis move_analysis = 1; - */ - com.google.cloud.asset.v1.MoveAnalysisOrBuilder getMoveAnalysisOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java deleted file mode 100644 index fbb8226aca23..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java +++ /dev/null @@ -1,4158 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * An asset in Google Cloud. An asset can be any resource in the Google Cloud
- * [resource
- * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
- * a resource outside the Google Cloud resource hierarchy (such as Google
- * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy),
- * or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship).
- * See [Supported asset
- * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
- * for more information.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.Asset} - */ -public final class Asset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.Asset) - AssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use Asset.newBuilder() to construct. - private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Asset() { - name_ = ""; - assetType_ = ""; - orgPolicy_ = java.util.Collections.emptyList(); - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Asset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Asset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - com.google.cloud.asset.v1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = input.readMessage(com.google.cloud.asset.v1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - orgPolicy_.add( - input.readMessage(com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); - break; - } - case 58: { - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; - if (accessContextPolicyCase_ == 7) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 7; - break; - } - case 66: { - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; - if (accessContextPolicyCase_ == 8) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 8; - break; - } - case 74: { - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = null; - if (accessContextPolicyCase_ == 9) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 9; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ancestors_.add(s); - break; - } - case 90: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.cloud.osconfig.v1.Inventory.Builder subBuilder = null; - if (osInventory_ != null) { - subBuilder = osInventory_.toBuilder(); - } - osInventory_ = input.readMessage(com.google.cloud.osconfig.v1.Inventory.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(osInventory_); - osInventory_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - com.google.cloud.asset.v1.RelatedAssets.Builder subBuilder = null; - if (relatedAssets_ != null) { - subBuilder = relatedAssets_.toBuilder(); - } - relatedAssets_ = input.readMessage(com.google.cloud.asset.v1.RelatedAssets.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relatedAssets_); - relatedAssets_ = subBuilder.buildPartial(); - } - - break; - } - case 122: { - com.google.cloud.asset.v1.RelatedAsset.Builder subBuilder = null; - if (relatedAsset_ != null) { - subBuilder = relatedAsset_.toBuilder(); - } - relatedAsset_ = input.readMessage(com.google.cloud.asset.v1.RelatedAsset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relatedAsset_); - relatedAsset_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.Asset.class, com.google.cloud.asset.v1.Asset.Builder.class); - } - - private int accessContextPolicyCase_ = 0; - private java.lang.Object accessContextPolicy_; - public enum AccessContextPolicyCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ACCESS_POLICY(7), - ACCESS_LEVEL(8), - SERVICE_PERIMETER(9), - ACCESSCONTEXTPOLICY_NOT_SET(0); - private final int value; - private AccessContextPolicyCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AccessContextPolicyCase valueOf(int value) { - return forNumber(value); - } - - public static AccessContextPolicyCase forNumber(int value) { - switch (value) { - case 7: return ACCESS_POLICY; - case 8: return ACCESS_LEVEL; - case 9: return SERVICE_PERIMETER; - case 0: return ACCESSCONTEXTPOLICY_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public AccessContextPolicyCase - getAccessContextPolicyCase() { - return AccessContextPolicyCase.forNumber( - accessContextPolicyCase_); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 11; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1.Resource resource_; - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - * @return Whether the resource field is set. - */ - @java.lang.Override - public boolean hasResource() { - return resource_ != null; - } - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - * @return The resource. - */ - @java.lang.Override - public com.google.cloud.asset.v1.Resource getResource() { - return resource_ == null ? com.google.cloud.asset.v1.Resource.getDefaultInstance() : resource_; - } - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.ResourceOrBuilder getResourceOrBuilder() { - return getResource(); - } - - public static final int IAM_POLICY_FIELD_NUMBER = 4; - private com.google.iam.v1.Policy iamPolicy_; - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-   * for more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - @java.lang.Override - public boolean hasIamPolicy() { - return iamPolicy_ != null; - } - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-   * for more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getIamPolicy() { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-   * for more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - return getIamPolicy(); - } - - public static final int ORG_POLICY_FIELD_NUMBER = 6; - private java.util.List orgPolicy_; - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public java.util.List getOrgPolicyList() { - return orgPolicy_; - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public java.util.List - getOrgPolicyOrBuilderList() { - return orgPolicy_; - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public int getOrgPolicyCount() { - return orgPolicy_.size(); - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { - return orgPolicy_.get(index); - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index) { - return orgPolicy_.get(index); - } - - public static final int ACCESS_POLICY_FIELD_NUMBER = 7; - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - @java.lang.Override - public boolean hasAccessPolicy() { - return accessContextPolicyCase_ == 7; - } - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - - public static final int ACCESS_LEVEL_FIELD_NUMBER = 8; - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - @java.lang.Override - public boolean hasAccessLevel() { - return accessContextPolicyCase_ == 8; - } - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - - public static final int SERVICE_PERIMETER_FIELD_NUMBER = 9; - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - @java.lang.Override - public boolean hasServicePerimeter() { - return accessContextPolicyCase_ == 9; - } - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - - public static final int OS_INVENTORY_FIELD_NUMBER = 12; - private com.google.cloud.osconfig.v1.Inventory osInventory_; - /** - *
-   * A representation of runtime OS Inventory information. See [this
-   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-   * for more information.
-   * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - * @return Whether the osInventory field is set. - */ - @java.lang.Override - public boolean hasOsInventory() { - return osInventory_ != null; - } - /** - *
-   * A representation of runtime OS Inventory information. See [this
-   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-   * for more information.
-   * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - * @return The osInventory. - */ - @java.lang.Override - public com.google.cloud.osconfig.v1.Inventory getOsInventory() { - return osInventory_ == null ? com.google.cloud.osconfig.v1.Inventory.getDefaultInstance() : osInventory_; - } - /** - *
-   * A representation of runtime OS Inventory information. See [this
-   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-   * for more information.
-   * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - @java.lang.Override - public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() { - return getOsInventory(); - } - - public static final int RELATED_ASSETS_FIELD_NUMBER = 13; - private com.google.cloud.asset.v1.RelatedAssets relatedAssets_; - /** - *
-   * DEPRECATED. This field only presents for the purpose of
-   * backward-compatibility. The server will never generate responses with this
-   * field.
-   * The related assets of the asset of one relationship type. One asset
-   * only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. - * See google/cloud/asset/v1/assets.proto;l=166 - * @return Whether the relatedAssets field is set. - */ - @java.lang.Override - @java.lang.Deprecated public boolean hasRelatedAssets() { - return relatedAssets_ != null; - } - /** - *
-   * DEPRECATED. This field only presents for the purpose of
-   * backward-compatibility. The server will never generate responses with this
-   * field.
-   * The related assets of the asset of one relationship type. One asset
-   * only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. - * See google/cloud/asset/v1/assets.proto;l=166 - * @return The relatedAssets. - */ - @java.lang.Override - @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssets getRelatedAssets() { - return relatedAssets_ == null ? com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() : relatedAssets_; - } - /** - *
-   * DEPRECATED. This field only presents for the purpose of
-   * backward-compatibility. The server will never generate responses with this
-   * field.
-   * The related assets of the asset of one relationship type. One asset
-   * only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Override - @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { - return getRelatedAssets(); - } - - public static final int RELATED_ASSET_FIELD_NUMBER = 15; - private com.google.cloud.asset.v1.RelatedAsset relatedAsset_; - /** - *
-   * One related asset of the current asset.
-   * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - * @return Whether the relatedAsset field is set. - */ - @java.lang.Override - public boolean hasRelatedAsset() { - return relatedAsset_ != null; - } - /** - *
-   * One related asset of the current asset.
-   * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - * @return The relatedAsset. - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAsset getRelatedAsset() { - return relatedAsset_ == null ? com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance() : relatedAsset_; - } - /** - *
-   * One related asset of the current asset.
-   * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAssetOrBuilder getRelatedAssetOrBuilder() { - return getRelatedAsset(); - } - - public static final int ANCESTORS_FIELD_NUMBER = 10; - private com.google.protobuf.LazyStringList ancestors_; - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_; - } - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - if (resource_ != null) { - output.writeMessage(3, getResource()); - } - if (iamPolicy_ != null) { - output.writeMessage(4, getIamPolicy()); - } - for (int i = 0; i < orgPolicy_.size(); i++) { - output.writeMessage(6, orgPolicy_.get(i)); - } - if (accessContextPolicyCase_ == 7) { - output.writeMessage(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 8) { - output.writeMessage(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 9) { - output.writeMessage(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - } - for (int i = 0; i < ancestors_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i)); - } - if (updateTime_ != null) { - output.writeMessage(11, getUpdateTime()); - } - if (osInventory_ != null) { - output.writeMessage(12, getOsInventory()); - } - if (relatedAssets_ != null) { - output.writeMessage(13, getRelatedAssets()); - } - if (relatedAsset_ != null) { - output.writeMessage(15, getRelatedAsset()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - if (resource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getResource()); - } - if (iamPolicy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIamPolicy()); - } - for (int i = 0; i < orgPolicy_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, orgPolicy_.get(i)); - } - if (accessContextPolicyCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - } - { - int dataSize = 0; - for (int i = 0; i < ancestors_.size(); i++) { - dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); - } - size += dataSize; - size += 1 * getAncestorsList().size(); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getUpdateTime()); - } - if (osInventory_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getOsInventory()); - } - if (relatedAssets_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getRelatedAssets()); - } - if (relatedAsset_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, getRelatedAsset()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.Asset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.Asset other = (com.google.cloud.asset.v1.Asset) obj; - - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (hasResource() != other.hasResource()) return false; - if (hasResource()) { - if (!getResource() - .equals(other.getResource())) return false; - } - if (hasIamPolicy() != other.hasIamPolicy()) return false; - if (hasIamPolicy()) { - if (!getIamPolicy() - .equals(other.getIamPolicy())) return false; - } - if (!getOrgPolicyList() - .equals(other.getOrgPolicyList())) return false; - if (hasOsInventory() != other.hasOsInventory()) return false; - if (hasOsInventory()) { - if (!getOsInventory() - .equals(other.getOsInventory())) return false; - } - if (hasRelatedAssets() != other.hasRelatedAssets()) return false; - if (hasRelatedAssets()) { - if (!getRelatedAssets() - .equals(other.getRelatedAssets())) return false; - } - if (hasRelatedAsset() != other.hasRelatedAsset()) return false; - if (hasRelatedAsset()) { - if (!getRelatedAsset() - .equals(other.getRelatedAsset())) return false; - } - if (!getAncestorsList() - .equals(other.getAncestorsList())) return false; - if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false; - switch (accessContextPolicyCase_) { - case 7: - if (!getAccessPolicy() - .equals(other.getAccessPolicy())) return false; - break; - case 8: - if (!getAccessLevel() - .equals(other.getAccessLevel())) return false; - break; - case 9: - if (!getServicePerimeter() - .equals(other.getServicePerimeter())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (hasResource()) { - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - } - if (hasIamPolicy()) { - hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicy().hashCode(); - } - if (getOrgPolicyCount() > 0) { - hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getOrgPolicyList().hashCode(); - } - if (hasOsInventory()) { - hash = (37 * hash) + OS_INVENTORY_FIELD_NUMBER; - hash = (53 * hash) + getOsInventory().hashCode(); - } - if (hasRelatedAssets()) { - hash = (37 * hash) + RELATED_ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getRelatedAssets().hashCode(); - } - if (hasRelatedAsset()) { - hash = (37 * hash) + RELATED_ASSET_FIELD_NUMBER; - hash = (53 * hash) + getRelatedAsset().hashCode(); - } - if (getAncestorsCount() > 0) { - hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAncestorsList().hashCode(); - } - switch (accessContextPolicyCase_) { - case 7: - hash = (37 * hash) + ACCESS_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getAccessPolicy().hashCode(); - break; - case 8: - hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + getAccessLevel().hashCode(); - break; - case 9: - hash = (37 * hash) + SERVICE_PERIMETER_FIELD_NUMBER; - hash = (53 * hash) + getServicePerimeter().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.Asset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Asset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Asset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Asset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Asset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Asset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Asset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Asset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.Asset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Asset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.Asset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Asset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.Asset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An asset in Google Cloud. An asset can be any resource in the Google Cloud
-   * [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * a resource outside the Google Cloud resource hierarchy (such as Google
-   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy),
-   * or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship).
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.Asset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.Asset) - com.google.cloud.asset.v1.AssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.Asset.class, com.google.cloud.asset.v1.Asset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.Asset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getOrgPolicyFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - name_ = ""; - - assetType_ = ""; - - if (resourceBuilder_ == null) { - resource_ = null; - } else { - resource_ = null; - resourceBuilder_ = null; - } - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - if (orgPolicyBuilder_ == null) { - orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - orgPolicyBuilder_.clear(); - } - if (osInventoryBuilder_ == null) { - osInventory_ = null; - } else { - osInventory_ = null; - osInventoryBuilder_ = null; - } - if (relatedAssetsBuilder_ == null) { - relatedAssets_ = null; - } else { - relatedAssets_ = null; - relatedAssetsBuilder_ = null; - } - if (relatedAssetBuilder_ == null) { - relatedAsset_ = null; - } else { - relatedAsset_ = null; - relatedAssetBuilder_ = null; - } - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Asset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Asset getDefaultInstanceForType() { - return com.google.cloud.asset.v1.Asset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.Asset build() { - com.google.cloud.asset.v1.Asset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Asset buildPartial() { - com.google.cloud.asset.v1.Asset result = new com.google.cloud.asset.v1.Asset(this); - int from_bitField0_ = bitField0_; - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.name_ = name_; - result.assetType_ = assetType_; - if (resourceBuilder_ == null) { - result.resource_ = resource_; - } else { - result.resource_ = resourceBuilder_.build(); - } - if (iamPolicyBuilder_ == null) { - result.iamPolicy_ = iamPolicy_; - } else { - result.iamPolicy_ = iamPolicyBuilder_.build(); - } - if (orgPolicyBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.orgPolicy_ = orgPolicy_; - } else { - result.orgPolicy_ = orgPolicyBuilder_.build(); - } - if (accessContextPolicyCase_ == 7) { - if (accessPolicyBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = accessPolicyBuilder_.build(); - } - } - if (accessContextPolicyCase_ == 8) { - if (accessLevelBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = accessLevelBuilder_.build(); - } - } - if (accessContextPolicyCase_ == 9) { - if (servicePerimeterBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = servicePerimeterBuilder_.build(); - } - } - if (osInventoryBuilder_ == null) { - result.osInventory_ = osInventory_; - } else { - result.osInventory_ = osInventoryBuilder_.build(); - } - if (relatedAssetsBuilder_ == null) { - result.relatedAssets_ = relatedAssets_; - } else { - result.relatedAssets_ = relatedAssetsBuilder_.build(); - } - if (relatedAssetBuilder_ == null) { - result.relatedAsset_ = relatedAsset_; - } else { - result.relatedAsset_ = relatedAssetBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.ancestors_ = ancestors_; - result.accessContextPolicyCase_ = accessContextPolicyCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.Asset) { - return mergeFrom((com.google.cloud.asset.v1.Asset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.Asset other) { - if (other == com.google.cloud.asset.v1.Asset.getDefaultInstance()) return this; - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (other.hasResource()) { - mergeResource(other.getResource()); - } - if (other.hasIamPolicy()) { - mergeIamPolicy(other.getIamPolicy()); - } - if (orgPolicyBuilder_ == null) { - if (!other.orgPolicy_.isEmpty()) { - if (orgPolicy_.isEmpty()) { - orgPolicy_ = other.orgPolicy_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOrgPolicyIsMutable(); - orgPolicy_.addAll(other.orgPolicy_); - } - onChanged(); - } - } else { - if (!other.orgPolicy_.isEmpty()) { - if (orgPolicyBuilder_.isEmpty()) { - orgPolicyBuilder_.dispose(); - orgPolicyBuilder_ = null; - orgPolicy_ = other.orgPolicy_; - bitField0_ = (bitField0_ & ~0x00000001); - orgPolicyBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOrgPolicyFieldBuilder() : null; - } else { - orgPolicyBuilder_.addAllMessages(other.orgPolicy_); - } - } - } - if (other.hasOsInventory()) { - mergeOsInventory(other.getOsInventory()); - } - if (other.hasRelatedAssets()) { - mergeRelatedAssets(other.getRelatedAssets()); - } - if (other.hasRelatedAsset()) { - mergeRelatedAsset(other.getRelatedAsset()); - } - if (!other.ancestors_.isEmpty()) { - if (ancestors_.isEmpty()) { - ancestors_ = other.ancestors_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAncestorsIsMutable(); - ancestors_.addAll(other.ancestors_); - } - onChanged(); - } - switch (other.getAccessContextPolicyCase()) { - case ACCESS_POLICY: { - mergeAccessPolicy(other.getAccessPolicy()); - break; - } - case ACCESS_LEVEL: { - mergeAccessLevel(other.getAccessLevel()); - break; - } - case SERVICE_PERIMETER: { - mergeServicePerimeter(other.getServicePerimeter()); - break; - } - case ACCESSCONTEXTPOLICY_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.Asset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.Asset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int accessContextPolicyCase_ = 0; - private java.lang.Object accessContextPolicy_; - public AccessContextPolicyCase - getAccessContextPolicyCase() { - return AccessContextPolicyCase.forNumber( - accessContextPolicyCase_); - } - - public Builder clearAccessContextPolicy() { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.Resource resource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Resource, com.google.cloud.asset.v1.Resource.Builder, com.google.cloud.asset.v1.ResourceOrBuilder> resourceBuilder_; - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - * @return Whether the resource field is set. - */ - public boolean hasResource() { - return resourceBuilder_ != null || resource_ != null; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - * @return The resource. - */ - public com.google.cloud.asset.v1.Resource getResource() { - if (resourceBuilder_ == null) { - return resource_ == null ? com.google.cloud.asset.v1.Resource.getDefaultInstance() : resource_; - } else { - return resourceBuilder_.getMessage(); - } - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - public Builder setResource(com.google.cloud.asset.v1.Resource value) { - if (resourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - onChanged(); - } else { - resourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - public Builder setResource( - com.google.cloud.asset.v1.Resource.Builder builderForValue) { - if (resourceBuilder_ == null) { - resource_ = builderForValue.build(); - onChanged(); - } else { - resourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - public Builder mergeResource(com.google.cloud.asset.v1.Resource value) { - if (resourceBuilder_ == null) { - if (resource_ != null) { - resource_ = - com.google.cloud.asset.v1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); - } else { - resource_ = value; - } - onChanged(); - } else { - resourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - public Builder clearResource() { - if (resourceBuilder_ == null) { - resource_ = null; - onChanged(); - } else { - resource_ = null; - resourceBuilder_ = null; - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - public com.google.cloud.asset.v1.Resource.Builder getResourceBuilder() { - - onChanged(); - return getResourceFieldBuilder().getBuilder(); - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - public com.google.cloud.asset.v1.ResourceOrBuilder getResourceOrBuilder() { - if (resourceBuilder_ != null) { - return resourceBuilder_.getMessageOrBuilder(); - } else { - return resource_ == null ? - com.google.cloud.asset.v1.Resource.getDefaultInstance() : resource_; - } - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Resource, com.google.cloud.asset.v1.Resource.Builder, com.google.cloud.asset.v1.ResourceOrBuilder> - getResourceFieldBuilder() { - if (resourceBuilder_ == null) { - resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Resource, com.google.cloud.asset.v1.Resource.Builder, com.google.cloud.asset.v1.ResourceOrBuilder>( - getResource(), - getParentForChildren(), - isClean()); - resource_ = null; - } - return resourceBuilder_; - } - - private com.google.iam.v1.Policy iamPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - public boolean hasIamPolicy() { - return iamPolicyBuilder_ != null || iamPolicy_ != null; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - public com.google.iam.v1.Policy getIamPolicy() { - if (iamPolicyBuilder_ == null) { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } else { - return iamPolicyBuilder_.getMessage(); - } - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - iamPolicy_ = value; - onChanged(); - } else { - iamPolicyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy( - com.google.iam.v1.Policy.Builder builderForValue) { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = builderForValue.build(); - onChanged(); - } else { - iamPolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (iamPolicy_ != null) { - iamPolicy_ = - com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); - } else { - iamPolicy_ = value; - } - onChanged(); - } else { - iamPolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder clearIamPolicy() { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - onChanged(); - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { - - onChanged(); - return getIamPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - if (iamPolicyBuilder_ != null) { - return iamPolicyBuilder_.getMessageOrBuilder(); - } else { - return iamPolicy_ == null ? - com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-     * for more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> - getIamPolicyFieldBuilder() { - if (iamPolicyBuilder_ == null) { - iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( - getIamPolicy(), - getParentForChildren(), - isClean()); - iamPolicy_ = null; - } - return iamPolicyBuilder_; - } - - private java.util.List orgPolicy_ = - java.util.Collections.emptyList(); - private void ensureOrgPolicyIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(orgPolicy_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> orgPolicyBuilder_; - - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List getOrgPolicyList() { - if (orgPolicyBuilder_ == null) { - return java.util.Collections.unmodifiableList(orgPolicy_); - } else { - return orgPolicyBuilder_.getMessageList(); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public int getOrgPolicyCount() { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.size(); - } else { - return orgPolicyBuilder_.getCount(); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.get(index); - } else { - return orgPolicyBuilder_.getMessage(index); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder setOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.set(index, value); - onChanged(); - } else { - orgPolicyBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder setOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.set(index, builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.add(value); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.add(index, value); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.add(builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.add(index, builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addAllOrgPolicy( - java.lang.Iterable values) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, orgPolicy_); - onChanged(); - } else { - orgPolicyBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder clearOrgPolicy() { - if (orgPolicyBuilder_ == null) { - orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - orgPolicyBuilder_.clear(); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder removeOrgPolicy(int index) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.remove(index); - onChanged(); - } else { - orgPolicyBuilder_.remove(index); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder getOrgPolicyBuilder( - int index) { - return getOrgPolicyFieldBuilder().getBuilder(index); - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index) { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.get(index); } else { - return orgPolicyBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List - getOrgPolicyOrBuilderList() { - if (orgPolicyBuilder_ != null) { - return orgPolicyBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(orgPolicy_); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder() { - return getOrgPolicyFieldBuilder().addBuilder( - com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder( - int index) { - return getOrgPolicyFieldBuilder().addBuilder( - index, com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List - getOrgPolicyBuilderList() { - return getOrgPolicyFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> - getOrgPolicyFieldBuilder() { - if (orgPolicyBuilder_ == null) { - orgPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder>( - orgPolicy_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - orgPolicy_ = null; - } - return orgPolicyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> accessPolicyBuilder_; - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - @java.lang.Override - public boolean hasAccessPolicy() { - return accessContextPolicyCase_ == 7; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 7) { - return accessPolicyBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder setAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { - if (accessPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - accessPolicyBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 7; - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder setAccessPolicy( - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder builderForValue) { - if (accessPolicyBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - accessPolicyBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 7; - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder mergeAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.newBuilder((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 7) { - accessPolicyBuilder_.mergeFrom(value); - } else { - accessPolicyBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 7; - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder clearAccessPolicy() { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 7) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - accessPolicyBuilder_.clear(); - } - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder getAccessPolicyBuilder() { - return getAccessPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { - if ((accessContextPolicyCase_ == 7) && (accessPolicyBuilder_ != null)) { - return accessPolicyBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> - getAccessPolicyFieldBuilder() { - if (accessPolicyBuilder_ == null) { - if (!(accessContextPolicyCase_ == 7)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - accessPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>( - (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 7; - onChanged();; - return accessPolicyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> accessLevelBuilder_; - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - @java.lang.Override - public boolean hasAccessLevel() { - return accessContextPolicyCase_ == 8; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 8) { - return accessLevelBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder setAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { - if (accessLevelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - accessLevelBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 8; - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder setAccessLevel( - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder builderForValue) { - if (accessLevelBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - accessLevelBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 8; - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder mergeAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.newBuilder((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 8) { - accessLevelBuilder_.mergeFrom(value); - } else { - accessLevelBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 8; - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder clearAccessLevel() { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 8) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - accessLevelBuilder_.clear(); - } - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public com.google.identity.accesscontextmanager.v1.AccessLevel.Builder getAccessLevelBuilder() { - return getAccessLevelFieldBuilder().getBuilder(); - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { - if ((accessContextPolicyCase_ == 8) && (accessLevelBuilder_ != null)) { - return accessLevelBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> - getAccessLevelFieldBuilder() { - if (accessLevelBuilder_ == null) { - if (!(accessContextPolicyCase_ == 8)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - accessLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>( - (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 8; - onChanged();; - return accessLevelBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> servicePerimeterBuilder_; - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - @java.lang.Override - public boolean hasServicePerimeter() { - return accessContextPolicyCase_ == 9; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 9) { - return servicePerimeterBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder setServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { - if (servicePerimeterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - servicePerimeterBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 9; - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder setServicePerimeter( - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder builderForValue) { - if (servicePerimeterBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - servicePerimeterBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 9; - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder mergeServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.newBuilder((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 9) { - servicePerimeterBuilder_.mergeFrom(value); - } else { - servicePerimeterBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 9; - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder clearServicePerimeter() { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 9) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - servicePerimeterBuilder_.clear(); - } - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder getServicePerimeterBuilder() { - return getServicePerimeterFieldBuilder().getBuilder(); - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { - if ((accessContextPolicyCase_ == 9) && (servicePerimeterBuilder_ != null)) { - return servicePerimeterBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> - getServicePerimeterFieldBuilder() { - if (servicePerimeterBuilder_ == null) { - if (!(accessContextPolicyCase_ == 9)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - servicePerimeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>( - (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 9; - onChanged();; - return servicePerimeterBuilder_; - } - - private com.google.cloud.osconfig.v1.Inventory osInventory_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.osconfig.v1.Inventory, com.google.cloud.osconfig.v1.Inventory.Builder, com.google.cloud.osconfig.v1.InventoryOrBuilder> osInventoryBuilder_; - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - * @return Whether the osInventory field is set. - */ - public boolean hasOsInventory() { - return osInventoryBuilder_ != null || osInventory_ != null; - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - * @return The osInventory. - */ - public com.google.cloud.osconfig.v1.Inventory getOsInventory() { - if (osInventoryBuilder_ == null) { - return osInventory_ == null ? com.google.cloud.osconfig.v1.Inventory.getDefaultInstance() : osInventory_; - } else { - return osInventoryBuilder_.getMessage(); - } - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - public Builder setOsInventory(com.google.cloud.osconfig.v1.Inventory value) { - if (osInventoryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - osInventory_ = value; - onChanged(); - } else { - osInventoryBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - public Builder setOsInventory( - com.google.cloud.osconfig.v1.Inventory.Builder builderForValue) { - if (osInventoryBuilder_ == null) { - osInventory_ = builderForValue.build(); - onChanged(); - } else { - osInventoryBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - public Builder mergeOsInventory(com.google.cloud.osconfig.v1.Inventory value) { - if (osInventoryBuilder_ == null) { - if (osInventory_ != null) { - osInventory_ = - com.google.cloud.osconfig.v1.Inventory.newBuilder(osInventory_).mergeFrom(value).buildPartial(); - } else { - osInventory_ = value; - } - onChanged(); - } else { - osInventoryBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - public Builder clearOsInventory() { - if (osInventoryBuilder_ == null) { - osInventory_ = null; - onChanged(); - } else { - osInventory_ = null; - osInventoryBuilder_ = null; - } - - return this; - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - public com.google.cloud.osconfig.v1.Inventory.Builder getOsInventoryBuilder() { - - onChanged(); - return getOsInventoryFieldBuilder().getBuilder(); - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() { - if (osInventoryBuilder_ != null) { - return osInventoryBuilder_.getMessageOrBuilder(); - } else { - return osInventory_ == null ? - com.google.cloud.osconfig.v1.Inventory.getDefaultInstance() : osInventory_; - } - } - /** - *
-     * A representation of runtime OS Inventory information. See [this
-     * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-     * for more information.
-     * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.osconfig.v1.Inventory, com.google.cloud.osconfig.v1.Inventory.Builder, com.google.cloud.osconfig.v1.InventoryOrBuilder> - getOsInventoryFieldBuilder() { - if (osInventoryBuilder_ == null) { - osInventoryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.osconfig.v1.Inventory, com.google.cloud.osconfig.v1.Inventory.Builder, com.google.cloud.osconfig.v1.InventoryOrBuilder>( - getOsInventory(), - getParentForChildren(), - isClean()); - osInventory_ = null; - } - return osInventoryBuilder_; - } - - private com.google.cloud.asset.v1.RelatedAssets relatedAssets_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAssets, com.google.cloud.asset.v1.RelatedAssets.Builder, com.google.cloud.asset.v1.RelatedAssetsOrBuilder> relatedAssetsBuilder_; - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. - * See google/cloud/asset/v1/assets.proto;l=166 - * @return Whether the relatedAssets field is set. - */ - @java.lang.Deprecated public boolean hasRelatedAssets() { - return relatedAssetsBuilder_ != null || relatedAssets_ != null; - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. - * See google/cloud/asset/v1/assets.proto;l=166 - * @return The relatedAssets. - */ - @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssets getRelatedAssets() { - if (relatedAssetsBuilder_ == null) { - return relatedAssets_ == null ? com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() : relatedAssets_; - } else { - return relatedAssetsBuilder_.getMessage(); - } - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Deprecated public Builder setRelatedAssets(com.google.cloud.asset.v1.RelatedAssets value) { - if (relatedAssetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - relatedAssets_ = value; - onChanged(); - } else { - relatedAssetsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Deprecated public Builder setRelatedAssets( - com.google.cloud.asset.v1.RelatedAssets.Builder builderForValue) { - if (relatedAssetsBuilder_ == null) { - relatedAssets_ = builderForValue.build(); - onChanged(); - } else { - relatedAssetsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Deprecated public Builder mergeRelatedAssets(com.google.cloud.asset.v1.RelatedAssets value) { - if (relatedAssetsBuilder_ == null) { - if (relatedAssets_ != null) { - relatedAssets_ = - com.google.cloud.asset.v1.RelatedAssets.newBuilder(relatedAssets_).mergeFrom(value).buildPartial(); - } else { - relatedAssets_ = value; - } - onChanged(); - } else { - relatedAssetsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Deprecated public Builder clearRelatedAssets() { - if (relatedAssetsBuilder_ == null) { - relatedAssets_ = null; - onChanged(); - } else { - relatedAssets_ = null; - relatedAssetsBuilder_ = null; - } - - return this; - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssets.Builder getRelatedAssetsBuilder() { - - onChanged(); - return getRelatedAssetsFieldBuilder().getBuilder(); - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Deprecated public com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { - if (relatedAssetsBuilder_ != null) { - return relatedAssetsBuilder_.getMessageOrBuilder(); - } else { - return relatedAssets_ == null ? - com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() : relatedAssets_; - } - } - /** - *
-     * DEPRECATED. This field only presents for the purpose of
-     * backward-compatibility. The server will never generate responses with this
-     * field.
-     * The related assets of the asset of one relationship type. One asset
-     * only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAssets, com.google.cloud.asset.v1.RelatedAssets.Builder, com.google.cloud.asset.v1.RelatedAssetsOrBuilder> - getRelatedAssetsFieldBuilder() { - if (relatedAssetsBuilder_ == null) { - relatedAssetsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAssets, com.google.cloud.asset.v1.RelatedAssets.Builder, com.google.cloud.asset.v1.RelatedAssetsOrBuilder>( - getRelatedAssets(), - getParentForChildren(), - isClean()); - relatedAssets_ = null; - } - return relatedAssetsBuilder_; - } - - private com.google.cloud.asset.v1.RelatedAsset relatedAsset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> relatedAssetBuilder_; - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - * @return Whether the relatedAsset field is set. - */ - public boolean hasRelatedAsset() { - return relatedAssetBuilder_ != null || relatedAsset_ != null; - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - * @return The relatedAsset. - */ - public com.google.cloud.asset.v1.RelatedAsset getRelatedAsset() { - if (relatedAssetBuilder_ == null) { - return relatedAsset_ == null ? com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance() : relatedAsset_; - } else { - return relatedAssetBuilder_.getMessage(); - } - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - public Builder setRelatedAsset(com.google.cloud.asset.v1.RelatedAsset value) { - if (relatedAssetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - relatedAsset_ = value; - onChanged(); - } else { - relatedAssetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - public Builder setRelatedAsset( - com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { - if (relatedAssetBuilder_ == null) { - relatedAsset_ = builderForValue.build(); - onChanged(); - } else { - relatedAssetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - public Builder mergeRelatedAsset(com.google.cloud.asset.v1.RelatedAsset value) { - if (relatedAssetBuilder_ == null) { - if (relatedAsset_ != null) { - relatedAsset_ = - com.google.cloud.asset.v1.RelatedAsset.newBuilder(relatedAsset_).mergeFrom(value).buildPartial(); - } else { - relatedAsset_ = value; - } - onChanged(); - } else { - relatedAssetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - public Builder clearRelatedAsset() { - if (relatedAssetBuilder_ == null) { - relatedAsset_ = null; - onChanged(); - } else { - relatedAsset_ = null; - relatedAssetBuilder_ = null; - } - - return this; - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - public com.google.cloud.asset.v1.RelatedAsset.Builder getRelatedAssetBuilder() { - - onChanged(); - return getRelatedAssetFieldBuilder().getBuilder(); - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - public com.google.cloud.asset.v1.RelatedAssetOrBuilder getRelatedAssetOrBuilder() { - if (relatedAssetBuilder_ != null) { - return relatedAssetBuilder_.getMessageOrBuilder(); - } else { - return relatedAsset_ == null ? - com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance() : relatedAsset_; - } - } - /** - *
-     * One related asset of the current asset.
-     * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> - getRelatedAssetFieldBuilder() { - if (relatedAssetBuilder_ == null) { - relatedAssetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder>( - getRelatedAsset(), - getParentForChildren(), - isClean()); - relatedAsset_ = null; - } - return relatedAssetBuilder_; - } - - private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAncestorsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_.getUnmodifiableView(); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param index The index to set the value at. - * @param value The ancestors to set. - * @return This builder for chaining. - */ - public Builder setAncestors( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param value The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestors( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param values The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAllAncestors( - java.lang.Iterable values) { - ensureAncestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ancestors_); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @return This builder for chaining. - */ - public Builder clearAncestors() { - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param value The bytes of the ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestorsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.Asset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Asset) - private static final com.google.cloud.asset.v1.Asset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.Asset(); - } - - public static com.google.cloud.asset.v1.Asset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Asset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Asset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java deleted file mode 100644 index 24d40ac71917..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java +++ /dev/null @@ -1,490 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface AssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.Asset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - * @return Whether the resource field is set. - */ - boolean hasResource(); - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - * @return The resource. - */ - com.google.cloud.asset.v1.Resource getResource(); - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1.Resource resource = 3; - */ - com.google.cloud.asset.v1.ResourceOrBuilder getResourceOrBuilder(); - - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-   * for more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - boolean hasIamPolicy(); - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-   * for more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - com.google.iam.v1.Policy getIamPolicy(); - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
-   * for more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); - - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - java.util.List - getOrgPolicyList(); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - int getOrgPolicyCount(); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - java.util.List - getOrgPolicyOrBuilderList(); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index); - - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - boolean hasAccessPolicy(); - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy(); - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder(); - - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - boolean hasAccessLevel(); - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel(); - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder(); - - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - boolean hasServicePerimeter(); - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter(); - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder(); - - /** - *
-   * A representation of runtime OS Inventory information. See [this
-   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-   * for more information.
-   * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - * @return Whether the osInventory field is set. - */ - boolean hasOsInventory(); - /** - *
-   * A representation of runtime OS Inventory information. See [this
-   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-   * for more information.
-   * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - * @return The osInventory. - */ - com.google.cloud.osconfig.v1.Inventory getOsInventory(); - /** - *
-   * A representation of runtime OS Inventory information. See [this
-   * topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
-   * for more information.
-   * 
- * - * .google.cloud.osconfig.v1.Inventory os_inventory = 12; - */ - com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder(); - - /** - *
-   * DEPRECATED. This field only presents for the purpose of
-   * backward-compatibility. The server will never generate responses with this
-   * field.
-   * The related assets of the asset of one relationship type. One asset
-   * only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. - * See google/cloud/asset/v1/assets.proto;l=166 - * @return Whether the relatedAssets field is set. - */ - @java.lang.Deprecated boolean hasRelatedAssets(); - /** - *
-   * DEPRECATED. This field only presents for the purpose of
-   * backward-compatibility. The server will never generate responses with this
-   * field.
-   * The related assets of the asset of one relationship type. One asset
-   * only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - * @deprecated google.cloud.asset.v1.Asset.related_assets is deprecated. - * See google/cloud/asset/v1/assets.proto;l=166 - * @return The relatedAssets. - */ - @java.lang.Deprecated com.google.cloud.asset.v1.RelatedAssets getRelatedAssets(); - /** - *
-   * DEPRECATED. This field only presents for the purpose of
-   * backward-compatibility. The server will never generate responses with this
-   * field.
-   * The related assets of the asset of one relationship type. One asset
-   * only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1.RelatedAssets related_assets = 13 [deprecated = true]; - */ - @java.lang.Deprecated com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder(); - - /** - *
-   * One related asset of the current asset.
-   * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - * @return Whether the relatedAsset field is set. - */ - boolean hasRelatedAsset(); - /** - *
-   * One related asset of the current asset.
-   * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - * @return The relatedAsset. - */ - com.google.cloud.asset.v1.RelatedAsset getRelatedAsset(); - /** - *
-   * One related asset of the current asset.
-   * 
- * - * .google.cloud.asset.v1.RelatedAsset related_asset = 15; - */ - com.google.cloud.asset.v1.RelatedAssetOrBuilder getRelatedAssetOrBuilder(); - - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - java.util.List - getAncestorsList(); - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - int getAncestorsCount(); - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - java.lang.String getAncestors(int index); - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - com.google.protobuf.ByteString - getAncestorsBytes(int index); - - public com.google.cloud.asset.v1.Asset.AccessContextPolicyCase getAccessContextPolicyCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java deleted file mode 100644 index 62f475b01a6e..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java +++ /dev/null @@ -1,502 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public final class AssetProto { - private AssetProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_TimeWindow_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_Asset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_Resource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_VersionedResource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AttachedResource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_RelatedResources_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_RelatedResource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\"google/cloud/asset/v1/assets.proto\022\025go" + - "ogle.cloud.asset.v1\032\031google/api/resource" + - ".proto\032)google/cloud/orgpolicy/v1/orgpol" + - "icy.proto\032(google/cloud/osconfig/v1/inve" + - "ntory.proto\032\032google/iam/v1/policy.proto\032" + - ":google/identity/accesscontextmanager/v1" + - "/access_level.proto\032;google/identity/acc" + - "esscontextmanager/v1/access_policy.proto" + - "\032?google/identity/accesscontextmanager/v" + - "1/service_perimeter.proto\032\034google/protob" + - "uf/struct.proto\032\037google/protobuf/timesta" + - "mp.proto\032\025google/rpc/code.proto\"\365\002\n\rTemp" + - "oralAsset\0221\n\006window\030\001 \001(\0132!.google.cloud" + - ".asset.v1.TimeWindow\022\017\n\007deleted\030\002 \001(\010\022+\n" + - "\005asset\030\003 \001(\0132\034.google.cloud.asset.v1.Ass" + - "et\022O\n\021prior_asset_state\030\004 \001(\01624.google.c" + - "loud.asset.v1.TemporalAsset.PriorAssetSt" + - "ate\0221\n\013prior_asset\030\005 \001(\0132\034.google.cloud." + - "asset.v1.Asset\"o\n\017PriorAssetState\022!\n\035PRI" + - "OR_ASSET_STATE_UNSPECIFIED\020\000\022\013\n\007PRESENT\020" + - "\001\022\013\n\007INVALID\020\002\022\022\n\016DOES_NOT_EXIST\020\003\022\013\n\007DE" + - "LETED\020\004\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(" + - "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + - "e\030\002 \001(\0132\032.google.protobuf.Timestamp\"\363\005\n\005" + - "Asset\022/\n\013update_time\030\013 \001(\0132\032.google.prot" + - "obuf.Timestamp\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_ty" + - "pe\030\002 \001(\t\0221\n\010resource\030\003 \001(\0132\037.google.clou" + - "d.asset.v1.Resource\022)\n\niam_policy\030\004 \001(\0132" + - "\025.google.iam.v1.Policy\0225\n\norg_policy\030\006 \003" + - "(\0132!.google.cloud.orgpolicy.v1.Policy\022N\n" + - "\raccess_policy\030\007 \001(\01325.google.identity.a" + - "ccesscontextmanager.v1.AccessPolicyH\000\022L\n" + - "\014access_level\030\010 \001(\01324.google.identity.ac" + - "cesscontextmanager.v1.AccessLevelH\000\022V\n\021s" + - "ervice_perimeter\030\t \001(\01329.google.identity" + - ".accesscontextmanager.v1.ServicePerimete" + - "rH\000\0229\n\014os_inventory\030\014 \001(\0132#.google.cloud" + - ".osconfig.v1.Inventory\022@\n\016related_assets" + - "\030\r \001(\0132$.google.cloud.asset.v1.RelatedAs" + - "setsB\002\030\001\022:\n\rrelated_asset\030\017 \001(\0132#.google" + - ".cloud.asset.v1.RelatedAsset\022\021\n\tancestor" + - "s\030\n \003(\t:\'\352A$\n\037cloudasset.googleapis.com/" + - "Asset\022\001*B\027\n\025access_context_policy\"\262\001\n\010Re" + - "source\022\017\n\007version\030\001 \001(\t\022\036\n\026discovery_doc" + - "ument_uri\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022" + - "\024\n\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n" + - "\004data\030\006 \001(\0132\027.google.protobuf.Struct\022\020\n\010" + - "location\030\010 \001(\t\"\230\001\n\rRelatedAssets\022N\n\027rela" + - "tionship_attributes\030\001 \001(\0132-.google.cloud" + - ".asset.v1.RelationshipAttributes\0223\n\006asse" + - "ts\030\002 \003(\0132#.google.cloud.asset.v1.Related" + - "Asset:\002\030\001\"v\n\026RelationshipAttributes\022\014\n\004t" + - "ype\030\004 \001(\t\022\034\n\024source_resource_type\030\001 \001(\t\022" + - "\034\n\024target_resource_type\030\002 \001(\t\022\016\n\006action\030" + - "\003 \001(\t:\002\030\001\"\205\001\n\014RelatedAsset\0223\n\005asset\030\001 \001(" + - "\tB$\372A!\n\037cloudasset.googleapis.com/Asset\022" + - "\022\n\nasset_type\030\002 \001(\t\022\021\n\tancestors\030\003 \003(\t\022\031" + - "\n\021relationship_type\030\004 \001(\t\"\262\007\n\024ResourceSe" + - "archResult\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002" + - " \001(\t\022\017\n\007project\030\003 \001(\t\022\017\n\007folders\030\021 \003(\t\022\024" + - "\n\014organization\030\022 \001(\t\022\024\n\014display_name\030\004 \001" + - "(\t\022\023\n\013description\030\005 \001(\t\022\020\n\010location\030\006 \001(" + - "\t\022G\n\006labels\030\007 \003(\01327.google.cloud.asset.v" + - "1.ResourceSearchResult.LabelsEntry\022\024\n\014ne" + - "twork_tags\030\010 \003(\t\022\017\n\007kms_key\030\n \001(\t\022/\n\013cre" + - "ate_time\030\013 \001(\0132\032.google.protobuf.Timesta" + - "mp\022/\n\013update_time\030\014 \001(\0132\032.google.protobu" + - "f.Timestamp\022\r\n\005state\030\r \001(\t\0226\n\025additional" + - "_attributes\030\t \001(\0132\027.google.protobuf.Stru" + - "ct\022!\n\031parent_full_resource_name\030\023 \001(\t\022E\n" + - "\023versioned_resources\030\020 \003(\0132(.google.clou" + - "d.asset.v1.VersionedResource\022C\n\022attached" + - "_resources\030\024 \003(\0132\'.google.cloud.asset.v1" + - ".AttachedResource\022U\n\rrelationships\030\025 \003(\013" + - "2>.google.cloud.asset.v1.ResourceSearchR" + - "esult.RelationshipsEntry\022\020\n\010tag_keys\030\027 \003" + - "(\t\022\022\n\ntag_values\030\031 \003(\t\022\025\n\rtag_value_ids\030" + - "\032 \003(\t\022\031\n\021parent_asset_type\030g \001(\t\032-\n\013Labe" + - "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032" + - "]\n\022RelationshipsEntry\022\013\n\003key\030\001 \001(\t\0226\n\005va" + - "lue\030\002 \001(\0132\'.google.cloud.asset.v1.Relate" + - "dResources:\0028\001\"O\n\021VersionedResource\022\017\n\007v" + - "ersion\030\001 \001(\t\022)\n\010resource\030\002 \001(\0132\027.google." + - "protobuf.Struct\"m\n\020AttachedResource\022\022\n\na" + - "sset_type\030\001 \001(\t\022E\n\023versioned_resources\030\003" + - " \003(\0132(.google.cloud.asset.v1.VersionedRe" + - "source\"U\n\020RelatedResources\022A\n\021related_re" + - "sources\030\001 \003(\0132&.google.cloud.asset.v1.Re" + - "latedResource\"A\n\017RelatedResource\022\022\n\nasse" + - "t_type\030\001 \001(\t\022\032\n\022full_resource_name\030\002 \001(\t" + - "\"\217\004\n\025IamPolicySearchResult\022\020\n\010resource\030\001" + - " \001(\t\022\022\n\nasset_type\030\005 \001(\t\022\017\n\007project\030\002 \001(" + - "\t\022\017\n\007folders\030\006 \003(\t\022\024\n\014organization\030\007 \001(\t" + - "\022%\n\006policy\030\003 \001(\0132\025.google.iam.v1.Policy\022" + - "M\n\013explanation\030\004 \001(\01328.google.cloud.asse" + - "t.v1.IamPolicySearchResult.Explanation\032\241" + - "\002\n\013Explanation\022m\n\023matched_permissions\030\001 " + - "\003(\0132P.google.cloud.asset.v1.IamPolicySea" + - "rchResult.Explanation.MatchedPermissions" + - "Entry\032\"\n\013Permissions\022\023\n\013permissions\030\001 \003(" + - "\t\032\177\n\027MatchedPermissionsEntry\022\013\n\003key\030\001 \001(" + - "\t\022S\n\005value\030\002 \001(\0132D.google.cloud.asset.v1" + - ".IamPolicySearchResult.Explanation.Permi" + - "ssions:\0028\001\"G\n\026IamPolicyAnalysisState\022\036\n\004" + - "code\030\001 \001(\0162\020.google.rpc.Code\022\r\n\005cause\030\002 " + - "\001(\t\"\306\001\n\023ConditionEvaluation\022T\n\020evaluatio" + - "n_value\030\001 \001(\0162:.google.cloud.asset.v1.Co" + - "nditionEvaluation.EvaluationValue\"Y\n\017Eva" + - "luationValue\022 \n\034EVALUATION_VALUE_UNSPECI" + - "FIED\020\000\022\010\n\004TRUE\020\001\022\t\n\005FALSE\020\002\022\017\n\013CONDITION" + - "AL\020\003\"\253\t\n\027IamPolicyAnalysisResult\022#\n\033atta" + - "ched_resource_full_name\030\001 \001(\t\022+\n\013iam_bin" + - "ding\030\002 \001(\0132\026.google.iam.v1.Binding\022^\n\024ac" + - "cess_control_lists\030\003 \003(\0132@.google.cloud." + - "asset.v1.IamPolicyAnalysisResult.AccessC" + - "ontrolList\022R\n\ridentity_list\030\004 \001(\0132;.goog" + - "le.cloud.asset.v1.IamPolicyAnalysisResul" + - "t.IdentityList\022\026\n\016fully_explored\030\005 \001(\010\032m" + - "\n\010Resource\022\032\n\022full_resource_name\030\001 \001(\t\022E" + - "\n\016analysis_state\030\002 \001(\0132-.google.cloud.as" + - "set.v1.IamPolicyAnalysisState\032\205\001\n\006Access" + - "\022\016\n\004role\030\001 \001(\tH\000\022\024\n\npermission\030\002 \001(\tH\000\022E" + - "\n\016analysis_state\030\003 \001(\0132-.google.cloud.as" + - "set.v1.IamPolicyAnalysisStateB\016\n\014oneof_a" + - "ccess\032_\n\010Identity\022\014\n\004name\030\001 \001(\t\022E\n\016analy" + - "sis_state\030\002 \001(\0132-.google.cloud.asset.v1." + - "IamPolicyAnalysisState\0320\n\004Edge\022\023\n\013source" + - "_node\030\001 \001(\t\022\023\n\013target_node\030\002 \001(\t\032\277\002\n\021Acc" + - "essControlList\022J\n\tresources\030\001 \003(\01327.goog" + - "le.cloud.asset.v1.IamPolicyAnalysisResul" + - "t.Resource\022G\n\010accesses\030\002 \003(\01325.google.cl" + - "oud.asset.v1.IamPolicyAnalysisResult.Acc" + - "ess\022K\n\016resource_edges\030\003 \003(\01323.google.clo" + - "ud.asset.v1.IamPolicyAnalysisResult.Edge" + - "\022H\n\024condition_evaluation\030\004 \001(\0132*.google." + - "cloud.asset.v1.ConditionEvaluation\032\245\001\n\014I" + - "dentityList\022K\n\nidentities\030\001 \003(\01327.google" + - ".cloud.asset.v1.IamPolicyAnalysisResult." + - "Identity\022H\n\013group_edges\030\002 \003(\01323.google.c" + - "loud.asset.v1.IamPolicyAnalysisResult.Ed" + - "geB\230\001\n\031com.google.cloud.asset.v1B\nAssetP" + - "rotoP\001Z:google.golang.org/genproto/googl" + - "eapis/cloud/asset/v1;asset\370\001\001\252\002\025Google.C" + - "loud.Asset.V1\312\002\025Google\\Cloud\\Asset\\V1b\006p" + - "roto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(), - com.google.cloud.osconfig.v1.Inventories.getDescriptor(), - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.CodeProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1_TemporalAsset_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_TemporalAsset_descriptor, - new java.lang.String[] { "Window", "Deleted", "Asset", "PriorAssetState", "PriorAsset", }); - internal_static_google_cloud_asset_v1_TimeWindow_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_TimeWindow_descriptor, - new java.lang.String[] { "StartTime", "EndTime", }); - internal_static_google_cloud_asset_v1_Asset_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1_Asset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_Asset_descriptor, - new java.lang.String[] { "UpdateTime", "Name", "AssetType", "Resource", "IamPolicy", "OrgPolicy", "AccessPolicy", "AccessLevel", "ServicePerimeter", "OsInventory", "RelatedAssets", "RelatedAsset", "Ancestors", "AccessContextPolicy", }); - internal_static_google_cloud_asset_v1_Resource_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_Resource_descriptor, - new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", "Location", }); - internal_static_google_cloud_asset_v1_RelatedAssets_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_RelatedAssets_descriptor, - new java.lang.String[] { "RelationshipAttributes", "Assets", }); - internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor, - new java.lang.String[] { "Type", "SourceResourceType", "TargetResourceType", "Action", }); - internal_static_google_cloud_asset_v1_RelatedAsset_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_RelatedAsset_descriptor, - new java.lang.String[] { "Asset", "AssetType", "Ancestors", "RelationshipType", }); - internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor, - new java.lang.String[] { "Name", "AssetType", "Project", "Folders", "Organization", "DisplayName", "Description", "Location", "Labels", "NetworkTags", "KmsKey", "CreateTime", "UpdateTime", "State", "AdditionalAttributes", "ParentFullResourceName", "VersionedResources", "AttachedResources", "Relationships", "TagKeys", "TagValues", "TagValueIds", "ParentAssetType", }); - internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor = - internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor = - internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_asset_v1_VersionedResource_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_VersionedResource_descriptor, - new java.lang.String[] { "Version", "Resource", }); - internal_static_google_cloud_asset_v1_AttachedResource_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AttachedResource_descriptor, - new java.lang.String[] { "AssetType", "VersionedResources", }); - internal_static_google_cloud_asset_v1_RelatedResources_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_RelatedResources_descriptor, - new java.lang.String[] { "RelatedResources", }); - internal_static_google_cloud_asset_v1_RelatedResource_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_RelatedResource_descriptor, - new java.lang.String[] { "AssetType", "FullResourceName", }); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor, - new java.lang.String[] { "Resource", "AssetType", "Project", "Folders", "Organization", "Policy", "Explanation", }); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor = - internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor, - new java.lang.String[] { "MatchedPermissions", }); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor = - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor, - new java.lang.String[] { "Permissions", }); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor = - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor, - new java.lang.String[] { "Code", "Cause", }); - internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor, - new java.lang.String[] { "EvaluationValue", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor, - new java.lang.String[] { "AttachedResourceFullName", "IamBinding", "AccessControlLists", "IdentityList", "FullyExplored", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor, - new java.lang.String[] { "FullResourceName", "AnalysisState", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor, - new java.lang.String[] { "Role", "Permission", "AnalysisState", "OneofAccess", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor, - new java.lang.String[] { "Name", "AnalysisState", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(3); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor, - new java.lang.String[] { "SourceNode", "TargetNode", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(4); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor, - new java.lang.String[] { "Resources", "Accesses", "ResourceEdges", "ConditionEvaluation", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor.getNestedTypes().get(5); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor, - new java.lang.String[] { "Identities", "GroupEdges", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(); - com.google.cloud.osconfig.v1.Inventories.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.CodeProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java deleted file mode 100644 index 57cad7816d2c..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java +++ /dev/null @@ -1,1149 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public final class AssetServiceProto { - private AssetServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_OutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_OutputResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_Feed_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_SavedQuery_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_MoveImpact_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_QueryResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_TableSchema_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/asset/v1/asset_service.pr" + - "oto\022\025google.cloud.asset.v1\032\034google/api/a" + - "nnotations.proto\032\027google/api/client.prot" + - "o\032\037google/api/field_behavior.proto\032\031goog" + - "le/api/resource.proto\032\"google/cloud/asse" + - "t/v1/assets.proto\032\032google/iam/v1/policy." + - "proto\032#google/longrunning/operations.pro" + - "to\032\036google/protobuf/duration.proto\032\033goog" + - "le/protobuf/empty.proto\032 google/protobuf" + - "/field_mask.proto\032\034google/protobuf/struc" + - "t.proto\032\037google/protobuf/timestamp.proto" + - "\032\027google/rpc/status.proto\032\026google/type/e" + - "xpr.proto\"[\n#AnalyzeIamPolicyLongrunning" + - "Metadata\0224\n\013create_time\030\001 \001(\0132\032.google.p" + - "rotobuf.TimestampB\003\340A\003\"\251\002\n\023ExportAssetsR" + - "equest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudass" + - "et.googleapis.com/Asset\022-\n\tread_time\030\002 \001" + - "(\0132\032.google.protobuf.Timestamp\022\023\n\013asset_" + - "types\030\003 \003(\t\0228\n\014content_type\030\004 \001(\0162\".goog" + - "le.cloud.asset.v1.ContentType\022?\n\routput_" + - "config\030\005 \001(\0132#.google.cloud.asset.v1.Out" + - "putConfigB\003\340A\002\022\032\n\022relationship_types\030\006 \003" + - "(\t\"\275\001\n\024ExportAssetsResponse\022-\n\tread_time" + - "\030\001 \001(\0132\032.google.protobuf.Timestamp\022:\n\rou" + - "tput_config\030\002 \001(\0132#.google.cloud.asset.v" + - "1.OutputConfig\022:\n\routput_result\030\003 \001(\0132#." + - "google.cloud.asset.v1.OutputResult\"\215\002\n\021L" + - "istAssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!" + - "\022\037cloudasset.googleapis.com/Asset\022-\n\trea" + - "d_time\030\002 \001(\0132\032.google.protobuf.Timestamp" + - "\022\023\n\013asset_types\030\003 \003(\t\0228\n\014content_type\030\004 " + - "\001(\0162\".google.cloud.asset.v1.ContentType\022" + - "\021\n\tpage_size\030\005 \001(\005\022\022\n\npage_token\030\006 \001(\t\022\032" + - "\n\022relationship_types\030\007 \003(\t\"\212\001\n\022ListAsset" + - "sResponse\022-\n\tread_time\030\001 \001(\0132\032.google.pr" + - "otobuf.Timestamp\022,\n\006assets\030\002 \003(\0132\034.googl" + - "e.cloud.asset.v1.Asset\022\027\n\017next_page_toke" + - "n\030\003 \001(\t\"\216\002\n\034BatchGetAssetsHistoryRequest" + - "\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.goo" + - "gleapis.com/Asset\022\023\n\013asset_names\030\002 \003(\t\022=" + - "\n\014content_type\030\003 \001(\0162\".google.cloud.asse" + - "t.v1.ContentTypeB\003\340A\001\022@\n\020read_time_windo" + - "w\030\004 \001(\0132!.google.cloud.asset.v1.TimeWind" + - "owB\003\340A\001\022\037\n\022relationship_types\030\005 \003(\tB\003\340A\001" + - "\"U\n\035BatchGetAssetsHistoryResponse\0224\n\006ass" + - "ets\030\001 \003(\0132$.google.cloud.asset.v1.Tempor" + - "alAsset\"n\n\021CreateFeedRequest\022\023\n\006parent\030\001" + - " \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\tB\003\340A\002\022.\n\004feed\030" + - "\003 \001(\0132\033.google.cloud.asset.v1.FeedB\003\340A\002\"" + - "F\n\016GetFeedRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n" + - "\036cloudasset.googleapis.com/Feed\"\'\n\020ListF" + - "eedsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\"?\n\021List" + - "FeedsResponse\022*\n\005feeds\030\001 \003(\0132\033.google.cl" + - "oud.asset.v1.Feed\"y\n\021UpdateFeedRequest\022." + - "\n\004feed\030\001 \001(\0132\033.google.cloud.asset.v1.Fee" + - "dB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.pro" + - "tobuf.FieldMaskB\003\340A\002\"I\n\021DeleteFeedReques" + - "t\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset.goog" + - "leapis.com/Feed\"\253\001\n\014OutputConfig\022@\n\017gcs_" + - "destination\030\001 \001(\0132%.google.cloud.asset.v" + - "1.GcsDestinationH\000\022J\n\024bigquery_destinati" + - "on\030\002 \001(\0132*.google.cloud.asset.v1.BigQuer" + - "yDestinationH\000B\r\n\013destination\"V\n\014OutputR" + - "esult\022<\n\ngcs_result\030\001 \001(\0132&.google.cloud" + - ".asset.v1.GcsOutputResultH\000B\010\n\006result\"\037\n" + - "\017GcsOutputResult\022\014\n\004uris\030\001 \003(\t\"C\n\016GcsDes" + - "tination\022\r\n\003uri\030\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 " + - "\001(\tH\000B\014\n\nobject_uri\"\264\001\n\023BigQueryDestinat" + - "ion\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\t" + - "B\003\340A\002\022\r\n\005force\030\003 \001(\010\022<\n\016partition_spec\030\004" + - " \001(\0132$.google.cloud.asset.v1.PartitionSp" + - "ec\022&\n\036separate_tables_per_asset_type\030\005 \001" + - "(\010\"\251\001\n\rPartitionSpec\022H\n\rpartition_key\030\001 " + - "\001(\01621.google.cloud.asset.v1.PartitionSpe" + - "c.PartitionKey\"N\n\014PartitionKey\022\035\n\031PARTIT" + - "ION_KEY_UNSPECIFIED\020\000\022\r\n\tREAD_TIME\020\001\022\020\n\014" + - "REQUEST_TIME\020\002\"\"\n\021PubsubDestination\022\r\n\005t" + - "opic\030\001 \001(\t\"i\n\020FeedOutputConfig\022F\n\022pubsub" + - "_destination\030\001 \001(\0132(.google.cloud.asset." + - "v1.PubsubDestinationH\000B\r\n\013destination\"\235\003" + - "\n\004Feed\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013asset_names" + - "\030\002 \003(\t\022\023\n\013asset_types\030\003 \003(\t\0228\n\014content_t" + - "ype\030\004 \001(\0162\".google.cloud.asset.v1.Conten" + - "tType\022H\n\022feed_output_config\030\005 \001(\0132\'.goog" + - "le.cloud.asset.v1.FeedOutputConfigB\003\340A\002\022" + - "$\n\tcondition\030\006 \001(\0132\021.google.type.Expr\022\032\n" + - "\022relationship_types\030\007 \003(\t:\221\001\352A\215\001\n\036clouda" + - "sset.googleapis.com/Feed\022\037projects/{proj" + - "ect}/feeds/{feed}\022\035folders/{folder}/feed" + - "s/{feed}\022)organizations/{organization}/f" + - "eeds/{feed} \001\"\331\001\n\031SearchAllResourcesRequ" + - "est\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003" + - "\340A\001\022\030\n\013asset_types\030\003 \003(\tB\003\340A\001\022\026\n\tpage_si" + - "ze\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\022\025" + - "\n\010order_by\030\006 \001(\tB\003\340A\001\0222\n\tread_mask\030\010 \001(\013" + - "2\032.google.protobuf.FieldMaskB\003\340A\001\"s\n\032Sea" + - "rchAllResourcesResponse\022<\n\007results\030\001 \003(\013" + - "2+.google.cloud.asset.v1.ResourceSearchR" + - "esult\022\027\n\017next_page_token\030\002 \001(\t\"\247\001\n\033Searc" + - "hAllIamPoliciesRequest\022\022\n\005scope\030\001 \001(\tB\003\340" + - "A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(" + - "\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\022\030\n\013asset" + - "_types\030\005 \003(\tB\003\340A\001\022\025\n\010order_by\030\007 \001(\tB\003\340A\001" + - "\"v\n\034SearchAllIamPoliciesResponse\022=\n\007resu" + - "lts\030\001 \003(\0132,.google.cloud.asset.v1.IamPol" + - "icySearchResult\022\027\n\017next_page_token\030\002 \001(\t" + - "\"\306\007\n\026IamPolicyAnalysisQuery\022\022\n\005scope\030\001 \001" + - "(\tB\003\340A\002\022^\n\021resource_selector\030\002 \001(\0132>.goo" + - "gle.cloud.asset.v1.IamPolicyAnalysisQuer" + - "y.ResourceSelectorB\003\340A\001\022^\n\021identity_sele" + - "ctor\030\003 \001(\0132>.google.cloud.asset.v1.IamPo" + - "licyAnalysisQuery.IdentitySelectorB\003\340A\001\022" + - "Z\n\017access_selector\030\004 \001(\0132<.google.cloud." + - "asset.v1.IamPolicyAnalysisQuery.AccessSe" + - "lectorB\003\340A\001\022K\n\007options\030\005 \001(\01325.google.cl" + - "oud.asset.v1.IamPolicyAnalysisQuery.Opti" + - "onsB\003\340A\001\022^\n\021condition_context\030\006 \001(\0132>.go" + - "ogle.cloud.asset.v1.IamPolicyAnalysisQue" + - "ry.ConditionContextB\003\340A\001\0323\n\020ResourceSele" + - "ctor\022\037\n\022full_resource_name\030\001 \001(\tB\003\340A\002\032)\n" + - "\020IdentitySelector\022\025\n\010identity\030\001 \001(\tB\003\340A\002" + - "\032>\n\016AccessSelector\022\022\n\005roles\030\001 \003(\tB\003\340A\001\022\030" + - "\n\013permissions\030\002 \003(\tB\003\340A\001\032\330\001\n\007Options\022\032\n\r" + - "expand_groups\030\001 \001(\010B\003\340A\001\022\031\n\014expand_roles" + - "\030\002 \001(\010B\003\340A\001\022\035\n\020expand_resources\030\003 \001(\010B\003\340" + - "A\001\022\"\n\025output_resource_edges\030\004 \001(\010B\003\340A\001\022\037" + - "\n\022output_group_edges\030\005 \001(\010B\003\340A\001\0222\n%analy" + - "ze_service_account_impersonation\030\006 \001(\010B\003" + - "\340A\001\032T\n\020ConditionContext\0221\n\013access_time\030\001" + - " \001(\0132\032.google.protobuf.TimestampH\000B\r\n\013Ti" + - "meContext\"\303\001\n\027AnalyzeIamPolicyRequest\022J\n" + - "\016analysis_query\030\001 \001(\0132-.google.cloud.ass" + - "et.v1.IamPolicyAnalysisQueryB\003\340A\002\022!\n\024sav" + - "ed_analysis_query\030\003 \001(\tB\003\340A\001\0229\n\021executio" + - "n_timeout\030\002 \001(\0132\031.google.protobuf.Durati" + - "onB\003\340A\001\"\212\004\n\030AnalyzeIamPolicyResponse\022X\n\r" + - "main_analysis\030\001 \001(\0132A.google.cloud.asset" + - ".v1.AnalyzeIamPolicyResponse.IamPolicyAn" + - "alysis\022q\n&service_account_impersonation_" + - "analysis\030\002 \003(\0132A.google.cloud.asset.v1.A" + - "nalyzeIamPolicyResponse.IamPolicyAnalysi" + - "s\022\026\n\016fully_explored\030\003 \001(\010\032\210\002\n\021IamPolicyA" + - "nalysis\022E\n\016analysis_query\030\001 \001(\0132-.google" + - ".cloud.asset.v1.IamPolicyAnalysisQuery\022H" + - "\n\020analysis_results\030\002 \003(\0132..google.cloud." + - "asset.v1.IamPolicyAnalysisResult\022\026\n\016full" + - "y_explored\030\003 \001(\010\022J\n\023non_critical_errors\030" + - "\005 \003(\0132-.google.cloud.asset.v1.IamPolicyA" + - "nalysisState\"\264\004\n\035IamPolicyAnalysisOutput" + - "Config\022^\n\017gcs_destination\030\001 \001(\0132C.google" + - ".cloud.asset.v1.IamPolicyAnalysisOutputC" + - "onfig.GcsDestinationH\000\022h\n\024bigquery_desti" + - "nation\030\002 \001(\0132H.google.cloud.asset.v1.Iam" + - "PolicyAnalysisOutputConfig.BigQueryDesti" + - "nationH\000\032\"\n\016GcsDestination\022\020\n\003uri\030\001 \001(\tB" + - "\003\340A\002\032\225\002\n\023BigQueryDestination\022\024\n\007dataset\030" + - "\001 \001(\tB\003\340A\002\022\031\n\014table_prefix\030\002 \001(\tB\003\340A\002\022l\n" + - "\rpartition_key\030\003 \001(\0162U.google.cloud.asse" + - "t.v1.IamPolicyAnalysisOutputConfig.BigQu" + - "eryDestination.PartitionKey\022\036\n\021write_dis" + - "position\030\004 \001(\tB\003\340A\001\"?\n\014PartitionKey\022\035\n\031P" + - "ARTITION_KEY_UNSPECIFIED\020\000\022\020\n\014REQUEST_TI" + - "ME\020\001B\r\n\013destination\"\345\001\n\"AnalyzeIamPolicy" + - "LongrunningRequest\022J\n\016analysis_query\030\001 \001" + - "(\0132-.google.cloud.asset.v1.IamPolicyAnal" + - "ysisQueryB\003\340A\002\022!\n\024saved_analysis_query\030\003" + - " \001(\tB\003\340A\001\022P\n\routput_config\030\002 \001(\01324.googl" + - "e.cloud.asset.v1.IamPolicyAnalysisOutput" + - "ConfigB\003\340A\002\"%\n#AnalyzeIamPolicyLongrunni" + - "ngResponse\"\267\005\n\nSavedQuery\022\014\n\004name\030\001 \001(\t\022" + - "\023\n\013description\030\002 \001(\t\0224\n\013create_time\030\003 \001(" + - "\0132\032.google.protobuf.TimestampB\003\340A\003\022\024\n\007cr" + - "eator\030\004 \001(\tB\003\340A\003\0229\n\020last_update_time\030\005 \001" + - "(\0132\032.google.protobuf.TimestampB\003\340A\003\022\031\n\014l" + - "ast_updater\030\006 \001(\tB\003\340A\003\022=\n\006labels\030\007 \003(\0132-" + - ".google.cloud.asset.v1.SavedQuery.Labels" + - "Entry\022?\n\007content\030\010 \001(\0132..google.cloud.as" + - "set.v1.SavedQuery.QueryContent\032s\n\014QueryC" + - "ontent\022R\n\031iam_policy_analysis_query\030\001 \001(" + - "\0132-.google.cloud.asset.v1.IamPolicyAnaly" + - "sisQueryH\000B\017\n\rquery_content\032-\n\013LabelsEnt" + - "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\277\001\352A\273" + - "\001\n$cloudasset.googleapis.com/SavedQuery\022" + - "-projects/{project}/savedQueries/{saved_" + - "query}\022+folders/{folder}/savedQueries/{s" + - "aved_query}\0227organizations/{organization" + - "}/savedQueries/{saved_query}\"\261\001\n\027CreateS" + - "avedQueryRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&" + - "\022$cloudasset.googleapis.com/SavedQuery\022;" + - "\n\013saved_query\030\002 \001(\0132!.google.cloud.asset" + - ".v1.SavedQueryB\003\340A\002\022\033\n\016saved_query_id\030\003 " + - "\001(\tB\003\340A\002\"R\n\024GetSavedQueryRequest\022:\n\004name" + - "\030\001 \001(\tB,\340A\002\372A&\n$cloudasset.googleapis.co" + - "m/SavedQuery\"\235\001\n\027ListSavedQueriesRequest" + - "\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$cloudasset.goo" + - "gleapis.com/SavedQuery\022\023\n\006filter\030\004 \001(\tB\003" + - "\340A\001\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_toke" + - "n\030\003 \001(\tB\003\340A\001\"m\n\030ListSavedQueriesResponse" + - "\0228\n\rsaved_queries\030\001 \003(\0132!.google.cloud.a" + - "sset.v1.SavedQuery\022\027\n\017next_page_token\030\002 " + - "\001(\t\"\214\001\n\027UpdateSavedQueryRequest\022;\n\013saved" + - "_query\030\001 \001(\0132!.google.cloud.asset.v1.Sav" + - "edQueryB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.goog" + - "le.protobuf.FieldMaskB\003\340A\002\"U\n\027DeleteSave" + - "dQueryRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$clo" + - "udasset.googleapis.com/SavedQuery\"\326\001\n\022An" + - "alyzeMoveRequest\022\025\n\010resource\030\001 \001(\tB\003\340A\002\022" + - "\037\n\022destination_parent\030\002 \001(\tB\003\340A\002\022D\n\004view" + - "\030\003 \001(\01626.google.cloud.asset.v1.AnalyzeMo" + - "veRequest.AnalysisView\"B\n\014AnalysisView\022\035" + - "\n\031ANALYSIS_VIEW_UNSPECIFIED\020\000\022\010\n\004FULL\020\001\022" + - "\t\n\005BASIC\020\002\"Q\n\023AnalyzeMoveResponse\022:\n\rmov" + - "e_analysis\030\001 \003(\0132#.google.cloud.asset.v1" + - ".MoveAnalysis\"\222\001\n\014MoveAnalysis\022\024\n\014displa" + - "y_name\030\001 \001(\t\022=\n\010analysis\030\002 \001(\0132).google." + - "cloud.asset.v1.MoveAnalysisResultH\000\022#\n\005e" + - "rror\030\003 \001(\0132\022.google.rpc.StatusH\000B\010\n\006resu" + - "lt\"~\n\022MoveAnalysisResult\0223\n\010blockers\030\001 \003" + - "(\0132!.google.cloud.asset.v1.MoveImpact\0223\n" + - "\010warnings\030\002 \003(\0132!.google.cloud.asset.v1." + - "MoveImpact\"\034\n\nMoveImpact\022\016\n\006detail\030\001 \001(\t" + - "\"\327\001\n\027QueryAssetsOutputConfig\022`\n\024bigquery" + - "_destination\030\001 \001(\0132B.google.cloud.asset." + - "v1.QueryAssetsOutputConfig.BigQueryDesti" + - "nation\032Z\n\023BigQueryDestination\022\024\n\007dataset" + - "\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\tB\003\340A\002\022\031\n\021write" + - "_disposition\030\003 \001(\t\"\276\003\n\022QueryAssetsReques" + - "t\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.go" + - "ogleapis.com/Asset\022\030\n\tstatement\030\002 \001(\tB\003\340" + - "A\001H\000\022\034\n\rjob_reference\030\003 \001(\tB\003\340A\001H\000\022\026\n\tpa" + - "ge_size\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003" + - "\340A\001\022/\n\007timeout\030\006 \001(\0132\031.google.protobuf.D" + - "urationB\003\340A\001\022B\n\020read_time_window\030\007 \001(\0132!" + - ".google.cloud.asset.v1.TimeWindowB\003\340A\001H\001" + - "\0224\n\tread_time\030\010 \001(\0132\032.google.protobuf.Ti" + - "mestampB\003\340A\001H\001\022J\n\routput_config\030\t \001(\0132.." + - "google.cloud.asset.v1.QueryAssetsOutputC" + - "onfigB\003\340A\001B\007\n\005queryB\006\n\004time\"\360\001\n\023QueryAss" + - "etsResponse\022\025\n\rjob_reference\030\001 \001(\t\022\014\n\004do" + - "ne\030\002 \001(\010\022#\n\005error\030\003 \001(\0132\022.google.rpc.Sta" + - "tusH\000\022:\n\014query_result\030\004 \001(\0132\".google.clo" + - "ud.asset.v1.QueryResultH\000\022G\n\routput_conf" + - "ig\030\005 \001(\0132..google.cloud.asset.v1.QueryAs" + - "setsOutputConfigH\000B\n\n\010response\"\225\001\n\013Query" + - "Result\022%\n\004rows\030\001 \003(\0132\027.google.protobuf.S" + - "truct\0222\n\006schema\030\002 \001(\0132\".google.cloud.ass" + - "et.v1.TableSchema\022\027\n\017next_page_token\030\003 \001" + - "(\t\022\022\n\ntotal_rows\030\004 \001(\003\"F\n\013TableSchema\0227\n" + - "\006fields\030\001 \003(\0132\'.google.cloud.asset.v1.Ta" + - "bleFieldSchema\"v\n\020TableFieldSchema\022\r\n\005fi" + - "eld\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\014\n\004mode\030\003 \001(\t\0227\n" + - "\006fields\030\004 \003(\0132\'.google.cloud.asset.v1.Ta" + - "bleFieldSchema\"Y\n#BatchGetEffectiveIamPo" + - "liciesRequest\022\030\n\005scope\030\001 \001(\tB\t\340A\002\372A\003\022\001*\022" + - "\030\n\005names\030\003 \003(\tB\t\340A\002\372A\003\n\001*\"\376\002\n$BatchGetEf" + - "fectiveIamPoliciesResponse\022f\n\016policy_res" + - "ults\030\002 \003(\0132N.google.cloud.asset.v1.Batch" + - "GetEffectiveIamPoliciesResponse.Effectiv" + - "eIamPolicy\032\355\001\n\022EffectiveIamPolicy\022\032\n\022ful" + - "l_resource_name\030\001 \001(\t\022k\n\010policies\030\002 \003(\0132" + - "Y.google.cloud.asset.v1.BatchGetEffectiv" + - "eIamPoliciesResponse.EffectiveIamPolicy." + - "PolicyInfo\032N\n\nPolicyInfo\022\031\n\021attached_res" + - "ource\030\001 \001(\t\022%\n\006policy\030\002 \001(\0132\025.google.iam" + - ".v1.Policy*\220\001\n\013ContentType\022\034\n\030CONTENT_TY" + - "PE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_PO" + - "LICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020" + - "\005\022\020\n\014OS_INVENTORY\020\006\022\020\n\014RELATIONSHIP\020\0072\233\033" + - "\n\014AssetService\022\336\001\n\014ExportAssets\022*.google" + - ".cloud.asset.v1.ExportAssetsRequest\032\035.go" + - "ogle.longrunning.Operation\"\202\001\202\323\344\223\002\"\"\035/v1" + - "/{parent=*/*}:exportAssets:\001*\312AW\n*google" + - ".cloud.asset.v1.ExportAssetsResponse\022)go" + - "ogle.cloud.asset.v1.ExportAssetsRequest\022" + - "\213\001\n\nListAssets\022(.google.cloud.asset.v1.L" + - "istAssetsRequest\032).google.cloud.asset.v1" + - ".ListAssetsResponse\"(\202\323\344\223\002\031\022\027/v1/{parent" + - "=*/*}/assets\332A\006parent\022\262\001\n\025BatchGetAssets" + - "History\0223.google.cloud.asset.v1.BatchGet" + - "AssetsHistoryRequest\0324.google.cloud.asse" + - "t.v1.BatchGetAssetsHistoryResponse\".\202\323\344\223" + - "\002(\022&/v1/{parent=*/*}:batchGetAssetsHisto" + - "ry\022\177\n\nCreateFeed\022(.google.cloud.asset.v1" + - ".CreateFeedRequest\032\033.google.cloud.asset." + - "v1.Feed\"*\202\323\344\223\002\033\"\026/v1/{parent=*/*}/feeds:" + - "\001*\332A\006parent\022t\n\007GetFeed\022%.google.cloud.as" + - "set.v1.GetFeedRequest\032\033.google.cloud.ass" + - "et.v1.Feed\"%\202\323\344\223\002\030\022\026/v1/{name=*/*/feeds/" + - "*}\332A\004name\022\207\001\n\tListFeeds\022\'.google.cloud.a" + - "sset.v1.ListFeedsRequest\032(.google.cloud." + - "asset.v1.ListFeedsResponse\"\'\202\323\344\223\002\030\022\026/v1/" + - "{parent=*/*}/feeds\332A\006parent\022\202\001\n\nUpdateFe" + - "ed\022(.google.cloud.asset.v1.UpdateFeedReq" + - "uest\032\033.google.cloud.asset.v1.Feed\"-\202\323\344\223\002" + - " 2\033/v1/{feed.name=*/*/feeds/*}:\001*\332A\004feed" + - "\022u\n\nDeleteFeed\022(.google.cloud.asset.v1.D" + - "eleteFeedRequest\032\026.google.protobuf.Empty" + - "\"%\202\323\344\223\002\030*\026/v1/{name=*/*/feeds/*}\332A\004name\022" + - "\277\001\n\022SearchAllResources\0220.google.cloud.as" + - "set.v1.SearchAllResourcesRequest\0321.googl" + - "e.cloud.asset.v1.SearchAllResourcesRespo" + - "nse\"D\202\323\344\223\002$\022\"/v1/{scope=*/*}:searchAllRe" + - "sources\332A\027scope,query,asset_types\022\273\001\n\024Se" + - "archAllIamPolicies\0222.google.cloud.asset." + - "v1.SearchAllIamPoliciesRequest\0323.google." + - "cloud.asset.v1.SearchAllIamPoliciesRespo" + - "nse\":\202\323\344\223\002&\022$/v1/{scope=*/*}:searchAllIa" + - "mPolicies\332A\013scope,query\022\254\001\n\020AnalyzeIamPo" + - "licy\022..google.cloud.asset.v1.AnalyzeIamP" + - "olicyRequest\032/.google.cloud.asset.v1.Ana" + - "lyzeIamPolicyResponse\"7\202\323\344\223\0021\022//v1/{anal" + - "ysis_query.scope=*/*}:analyzeIamPolicy\022\270" + - "\002\n\033AnalyzeIamPolicyLongrunning\0229.google." + - "cloud.asset.v1.AnalyzeIamPolicyLongrunni" + - "ngRequest\032\035.google.longrunning.Operation" + - "\"\276\001\202\323\344\223\002?\":/v1/{analysis_query.scope=*/*" + - "}:analyzeIamPolicyLongrunning:\001*\312Av\n9goo" + - "gle.cloud.asset.v1.AnalyzeIamPolicyLongr" + - "unningResponse\0229google.cloud.asset.v1.An" + - "alyzeIamPolicyLongrunningMetadata\022\214\001\n\013An" + - "alyzeMove\022).google.cloud.asset.v1.Analyz" + - "eMoveRequest\032*.google.cloud.asset.v1.Ana" + - "lyzeMoveResponse\"&\202\323\344\223\002 \022\036/v1/{resource=" + - "*/*}:analyzeMove\022\215\001\n\013QueryAssets\022).googl" + - "e.cloud.asset.v1.QueryAssetsRequest\032*.go" + - "ogle.cloud.asset.v1.QueryAssetsResponse\"" + - "\'\202\323\344\223\002!\"\034/v1/{parent=*/*}:queryAssets:\001*" + - "\022\275\001\n\020CreateSavedQuery\022..google.cloud.ass" + - "et.v1.CreateSavedQueryRequest\032!.google.c" + - "loud.asset.v1.SavedQuery\"V\202\323\344\223\002,\"\035/v1/{p" + - "arent=*/*}/savedQueries:\013saved_query\332A!p" + - "arent,saved_query,saved_query_id\022\215\001\n\rGet" + - "SavedQuery\022+.google.cloud.asset.v1.GetSa" + - "vedQueryRequest\032!.google.cloud.asset.v1." + - "SavedQuery\",\202\323\344\223\002\037\022\035/v1/{name=*/*/savedQ" + - "ueries/*}\332A\004name\022\243\001\n\020ListSavedQueries\022.." + - "google.cloud.asset.v1.ListSavedQueriesRe" + - "quest\032/.google.cloud.asset.v1.ListSavedQ" + - "ueriesResponse\".\202\323\344\223\002\037\022\035/v1/{parent=*/*}" + - "/savedQueries\332A\006parent\022\277\001\n\020UpdateSavedQu" + - "ery\022..google.cloud.asset.v1.UpdateSavedQ" + - "ueryRequest\032!.google.cloud.asset.v1.Save" + - "dQuery\"X\202\323\344\223\00282)/v1/{saved_query.name=*/" + - "*/savedQueries/*}:\013saved_query\332A\027saved_q" + - "uery,update_mask\022\210\001\n\020DeleteSavedQuery\022.." + - "google.cloud.asset.v1.DeleteSavedQueryRe" + - "quest\032\026.google.protobuf.Empty\",\202\323\344\223\002\037*\035/" + - "v1/{name=*/*/savedQueries/*}\332A\004name\022\316\001\n\034" + - "BatchGetEffectiveIamPolicies\022:.google.cl" + - "oud.asset.v1.BatchGetEffectiveIamPolicie" + - "sRequest\032;.google.cloud.asset.v1.BatchGe" + - "tEffectiveIamPoliciesResponse\"5\202\323\344\223\002/\022-/" + - "v1/{scope=*/*}/effectiveIamPolicies:batc" + - "hGet\032M\312A\031cloudasset.googleapis.com\322A.htt" + - "ps://www.googleapis.com/auth/cloud-platf" + - "ormB\234\001\n\031com.google.cloud.asset.v1B\021Asset" + - "ServiceProtoP\001Z:google.golang.org/genpro" + - "to/googleapis/cloud/asset/v1;asset\252\002\025Goo" + - "gle.Cloud.Asset.V1\312\002\025Google\\Cloud\\Asset\\" + - "V1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.asset.v1.AssetProto.getDescriptor(), - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - com.google.type.ExprProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningMetadata_descriptor, - new java.lang.String[] { "CreateTime", }); - internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor, - new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "OutputConfig", "RelationshipTypes", }); - internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor, - new java.lang.String[] { "ReadTime", "OutputConfig", "OutputResult", }); - internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor, - new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "PageSize", "PageToken", "RelationshipTypes", }); - internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor, - new java.lang.String[] { "ReadTime", "Assets", "NextPageToken", }); - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor, - new java.lang.String[] { "Parent", "AssetNames", "ContentType", "ReadTimeWindow", "RelationshipTypes", }); - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor, - new java.lang.String[] { "Assets", }); - internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor, - new java.lang.String[] { "Parent", "FeedId", "Feed", }); - internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor, - new java.lang.String[] { "Parent", }); - internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor, - new java.lang.String[] { "Feeds", }); - internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor, - new java.lang.String[] { "Feed", "UpdateMask", }); - internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_asset_v1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_OutputConfig_descriptor, - new java.lang.String[] { "GcsDestination", "BigqueryDestination", "Destination", }); - internal_static_google_cloud_asset_v1_OutputResult_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_OutputResult_descriptor, - new java.lang.String[] { "GcsResult", "Result", }); - internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor, - new java.lang.String[] { "Uris", }); - internal_static_google_cloud_asset_v1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_GcsDestination_descriptor, - new java.lang.String[] { "Uri", "UriPrefix", "ObjectUri", }); - internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor, - new java.lang.String[] { "Dataset", "Table", "Force", "PartitionSpec", "SeparateTablesPerAssetType", }); - internal_static_google_cloud_asset_v1_PartitionSpec_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_PartitionSpec_descriptor, - new java.lang.String[] { "PartitionKey", }); - internal_static_google_cloud_asset_v1_PubsubDestination_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_PubsubDestination_descriptor, - new java.lang.String[] { "Topic", }); - internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor, - new java.lang.String[] { "PubsubDestination", "Destination", }); - internal_static_google_cloud_asset_v1_Feed_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_Feed_descriptor, - new java.lang.String[] { "Name", "AssetNames", "AssetTypes", "ContentType", "FeedOutputConfig", "Condition", "RelationshipTypes", }); - internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor, - new java.lang.String[] { "Scope", "Query", "AssetTypes", "PageSize", "PageToken", "OrderBy", "ReadMask", }); - internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor, - new java.lang.String[] { "Results", "NextPageToken", }); - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor, - new java.lang.String[] { "Scope", "Query", "PageSize", "PageToken", "AssetTypes", "OrderBy", }); - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor, - new java.lang.String[] { "Results", "NextPageToken", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor, - new java.lang.String[] { "Scope", "ResourceSelector", "IdentitySelector", "AccessSelector", "Options", "ConditionContext", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor, - new java.lang.String[] { "FullResourceName", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor, - new java.lang.String[] { "Identity", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(2); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor, - new java.lang.String[] { "Roles", "Permissions", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(3); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor, - new java.lang.String[] { "ExpandGroups", "ExpandRoles", "ExpandResources", "OutputResourceEdges", "OutputGroupEdges", "AnalyzeServiceAccountImpersonation", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor.getNestedTypes().get(4); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor, - new java.lang.String[] { "AccessTime", "TimeContext", }); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor, - new java.lang.String[] { "AnalysisQuery", "SavedAnalysisQuery", "ExecutionTimeout", }); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor, - new java.lang.String[] { "MainAnalysis", "ServiceAccountImpersonationAnalysis", "FullyExplored", }); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor = - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor, - new java.lang.String[] { "AnalysisQuery", "AnalysisResults", "FullyExplored", "NonCriticalErrors", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor, - new java.lang.String[] { "GcsDestination", "BigqueryDestination", "Destination", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor, - new java.lang.String[] { "Uri", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor = - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor, - new java.lang.String[] { "Dataset", "TablePrefix", "PartitionKey", "WriteDisposition", }); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor, - new java.lang.String[] { "AnalysisQuery", "SavedAnalysisQuery", "OutputConfig", }); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor, - new java.lang.String[] { }); - internal_static_google_cloud_asset_v1_SavedQuery_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_SavedQuery_descriptor, - new java.lang.String[] { "Name", "Description", "CreateTime", "Creator", "LastUpdateTime", "LastUpdater", "Labels", "Content", }); - internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor = - internal_static_google_cloud_asset_v1_SavedQuery_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor, - new java.lang.String[] { "IamPolicyAnalysisQuery", "QueryContent", }); - internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor = - internal_static_google_cloud_asset_v1_SavedQuery_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor, - new java.lang.String[] { "Parent", "SavedQuery", "SavedQueryId", }); - internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor, - new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); - internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor, - new java.lang.String[] { "SavedQueries", "NextPageToken", }); - internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor, - new java.lang.String[] { "SavedQuery", "UpdateMask", }); - internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor = - getDescriptor().getMessageTypes().get(38); - internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor = - getDescriptor().getMessageTypes().get(39); - internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeMoveRequest_descriptor, - new java.lang.String[] { "Resource", "DestinationParent", "View", }); - internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor = - getDescriptor().getMessageTypes().get(40); - internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_AnalyzeMoveResponse_descriptor, - new java.lang.String[] { "MoveAnalysis", }); - internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor = - getDescriptor().getMessageTypes().get(41); - internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor, - new java.lang.String[] { "DisplayName", "Analysis", "Error", "Result", }); - internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor = - getDescriptor().getMessageTypes().get(42); - internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor, - new java.lang.String[] { "Blockers", "Warnings", }); - internal_static_google_cloud_asset_v1_MoveImpact_descriptor = - getDescriptor().getMessageTypes().get(43); - internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_MoveImpact_descriptor, - new java.lang.String[] { "Detail", }); - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(44); - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor, - new java.lang.String[] { "BigqueryDestination", }); - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor = - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor, - new java.lang.String[] { "Dataset", "Table", "WriteDisposition", }); - internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(45); - internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor, - new java.lang.String[] { "Parent", "Statement", "JobReference", "PageSize", "PageToken", "Timeout", "ReadTimeWindow", "ReadTime", "OutputConfig", "Query", "Time", }); - internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(46); - internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor, - new java.lang.String[] { "JobReference", "Done", "Error", "QueryResult", "OutputConfig", "Response", }); - internal_static_google_cloud_asset_v1_QueryResult_descriptor = - getDescriptor().getMessageTypes().get(47); - internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_QueryResult_descriptor, - new java.lang.String[] { "Rows", "Schema", "NextPageToken", "TotalRows", }); - internal_static_google_cloud_asset_v1_TableSchema_descriptor = - getDescriptor().getMessageTypes().get(48); - internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_TableSchema_descriptor, - new java.lang.String[] { "Fields", }); - internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor = - getDescriptor().getMessageTypes().get(49); - internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor, - new java.lang.String[] { "Field", "Type", "Mode", "Fields", }); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(50); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor, - new java.lang.String[] { "Scope", "Names", }); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor, - new java.lang.String[] { "PolicyResults", }); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor = - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor, - new java.lang.String[] { "FullResourceName", "Policies", }); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor = - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor, - new java.lang.String[] { "AttachedResource", "Policy", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.asset.v1.AssetProto.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - com.google.type.ExprProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java deleted file mode 100644 index 554af654c8f9..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResource.java +++ /dev/null @@ -1,1114 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Attached resource representation, which is defined by the corresponding
- * service provider. It represents an attached resource's payload.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.AttachedResource} - */ -public final class AttachedResource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AttachedResource) - AttachedResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use AttachedResource.newBuilder() to construct. - private AttachedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AttachedResource() { - assetType_ = ""; - versionedResources_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AttachedResource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AttachedResource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - versionedResources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - versionedResources_.add( - input.readMessage(com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AttachedResource.class, com.google.cloud.asset.v1.AttachedResource.Builder.class); - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of this attached resource.
-   * Example: `osconfig.googleapis.com/Inventory`
-   * You can find the supported attached asset types of each resource in this
-   * table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * string asset_type = 1; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of this attached resource.
-   * Example: `osconfig.googleapis.com/Inventory`
-   * You can find the supported attached asset types of each resource in this
-   * table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * string asset_type = 1; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSIONED_RESOURCES_FIELD_NUMBER = 3; - private java.util.List versionedResources_; - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - @java.lang.Override - public java.util.List getVersionedResourcesList() { - return versionedResources_; - } - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - @java.lang.Override - public java.util.List - getVersionedResourcesOrBuilderList() { - return versionedResources_; - } - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - @java.lang.Override - public int getVersionedResourcesCount() { - return versionedResources_.size(); - } - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { - return versionedResources_.get(index); - } - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( - int index) { - return versionedResources_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assetType_); - } - for (int i = 0; i < versionedResources_.size(); i++) { - output.writeMessage(3, versionedResources_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, assetType_); - } - for (int i = 0; i < versionedResources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, versionedResources_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.AttachedResource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.AttachedResource other = (com.google.cloud.asset.v1.AttachedResource) obj; - - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (!getVersionedResourcesList() - .equals(other.getVersionedResourcesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (getVersionedResourcesCount() > 0) { - hash = (37 * hash) + VERSIONED_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getVersionedResourcesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AttachedResource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AttachedResource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.AttachedResource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.AttachedResource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Attached resource representation, which is defined by the corresponding
-   * service provider. It represents an attached resource's payload.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.AttachedResource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AttachedResource) - com.google.cloud.asset.v1.AttachedResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.AttachedResource.class, com.google.cloud.asset.v1.AttachedResource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.AttachedResource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVersionedResourcesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - assetType_ = ""; - - if (versionedResourcesBuilder_ == null) { - versionedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - versionedResourcesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_AttachedResource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AttachedResource getDefaultInstanceForType() { - return com.google.cloud.asset.v1.AttachedResource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.AttachedResource build() { - com.google.cloud.asset.v1.AttachedResource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AttachedResource buildPartial() { - com.google.cloud.asset.v1.AttachedResource result = new com.google.cloud.asset.v1.AttachedResource(this); - int from_bitField0_ = bitField0_; - result.assetType_ = assetType_; - if (versionedResourcesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.versionedResources_ = versionedResources_; - } else { - result.versionedResources_ = versionedResourcesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.AttachedResource) { - return mergeFrom((com.google.cloud.asset.v1.AttachedResource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.AttachedResource other) { - if (other == com.google.cloud.asset.v1.AttachedResource.getDefaultInstance()) return this; - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (versionedResourcesBuilder_ == null) { - if (!other.versionedResources_.isEmpty()) { - if (versionedResources_.isEmpty()) { - versionedResources_ = other.versionedResources_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVersionedResourcesIsMutable(); - versionedResources_.addAll(other.versionedResources_); - } - onChanged(); - } - } else { - if (!other.versionedResources_.isEmpty()) { - if (versionedResourcesBuilder_.isEmpty()) { - versionedResourcesBuilder_.dispose(); - versionedResourcesBuilder_ = null; - versionedResources_ = other.versionedResources_; - bitField0_ = (bitField0_ & ~0x00000001); - versionedResourcesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVersionedResourcesFieldBuilder() : null; - } else { - versionedResourcesBuilder_.addAllMessages(other.versionedResources_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.AttachedResource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.AttachedResource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of this attached resource.
-     * Example: `osconfig.googleapis.com/Inventory`
-     * You can find the supported attached asset types of each resource in this
-     * table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * string asset_type = 1; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of this attached resource.
-     * Example: `osconfig.googleapis.com/Inventory`
-     * You can find the supported attached asset types of each resource in this
-     * table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * string asset_type = 1; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of this attached resource.
-     * Example: `osconfig.googleapis.com/Inventory`
-     * You can find the supported attached asset types of each resource in this
-     * table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * string asset_type = 1; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of this attached resource.
-     * Example: `osconfig.googleapis.com/Inventory`
-     * You can find the supported attached asset types of each resource in this
-     * table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * string asset_type = 1; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of this attached resource.
-     * Example: `osconfig.googleapis.com/Inventory`
-     * You can find the supported attached asset types of each resource in this
-     * table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * string asset_type = 1; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private java.util.List versionedResources_ = - java.util.Collections.emptyList(); - private void ensureVersionedResourcesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - versionedResources_ = new java.util.ArrayList(versionedResources_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> versionedResourcesBuilder_; - - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public java.util.List getVersionedResourcesList() { - if (versionedResourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(versionedResources_); - } else { - return versionedResourcesBuilder_.getMessageList(); - } - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public int getVersionedResourcesCount() { - if (versionedResourcesBuilder_ == null) { - return versionedResources_.size(); - } else { - return versionedResourcesBuilder_.getCount(); - } - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { - if (versionedResourcesBuilder_ == null) { - return versionedResources_.get(index); - } else { - return versionedResourcesBuilder_.getMessage(index); - } - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder setVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource value) { - if (versionedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionedResourcesIsMutable(); - versionedResources_.set(index, value); - onChanged(); - } else { - versionedResourcesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder setVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.set(index, builderForValue.build()); - onChanged(); - } else { - versionedResourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder addVersionedResources(com.google.cloud.asset.v1.VersionedResource value) { - if (versionedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionedResourcesIsMutable(); - versionedResources_.add(value); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder addVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource value) { - if (versionedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionedResourcesIsMutable(); - versionedResources_.add(index, value); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder addVersionedResources( - com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.add(builderForValue.build()); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder addVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.add(index, builderForValue.build()); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder addAllVersionedResources( - java.lang.Iterable values) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, versionedResources_); - onChanged(); - } else { - versionedResourcesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder clearVersionedResources() { - if (versionedResourcesBuilder_ == null) { - versionedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - versionedResourcesBuilder_.clear(); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public Builder removeVersionedResources(int index) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.remove(index); - onChanged(); - } else { - versionedResourcesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public com.google.cloud.asset.v1.VersionedResource.Builder getVersionedResourcesBuilder( - int index) { - return getVersionedResourcesFieldBuilder().getBuilder(index); - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( - int index) { - if (versionedResourcesBuilder_ == null) { - return versionedResources_.get(index); } else { - return versionedResourcesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public java.util.List - getVersionedResourcesOrBuilderList() { - if (versionedResourcesBuilder_ != null) { - return versionedResourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(versionedResources_); - } - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder() { - return getVersionedResourcesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder( - int index) { - return getVersionedResourcesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); - } - /** - *
-     * Versioned resource representations of this attached resource. This is
-     * repeated because there could be multiple versions of the attached resource
-     * representations during version migration.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - public java.util.List - getVersionedResourcesBuilderList() { - return getVersionedResourcesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> - getVersionedResourcesFieldBuilder() { - if (versionedResourcesBuilder_ == null) { - versionedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder>( - versionedResources_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - versionedResources_ = null; - } - return versionedResourcesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.AttachedResource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AttachedResource) - private static final com.google.cloud.asset.v1.AttachedResource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AttachedResource(); - } - - public static com.google.cloud.asset.v1.AttachedResource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttachedResource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachedResource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.AttachedResource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java deleted file mode 100644 index 15fc2826e2e8..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AttachedResourceOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface AttachedResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AttachedResource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The type of this attached resource.
-   * Example: `osconfig.googleapis.com/Inventory`
-   * You can find the supported attached asset types of each resource in this
-   * table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * string asset_type = 1; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of this attached resource.
-   * Example: `osconfig.googleapis.com/Inventory`
-   * You can find the supported attached asset types of each resource in this
-   * table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * string asset_type = 1; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - java.util.List - getVersionedResourcesList(); - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index); - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - int getVersionedResourcesCount(); - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - java.util.List - getVersionedResourcesOrBuilderList(); - /** - *
-   * Versioned resource representations of this attached resource. This is
-   * repeated because there could be multiple versions of the attached resource
-   * representations during version migration.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 3; - */ - com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java deleted file mode 100644 index c8b5b27bbd17..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java +++ /dev/null @@ -1,1780 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Batch get assets history request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryRequest} - */ -public final class BatchGetAssetsHistoryRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) - BatchGetAssetsHistoryRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchGetAssetsHistoryRequest.newBuilder() to construct. - private BatchGetAssetsHistoryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchGetAssetsHistoryRequest() { - parent_ = ""; - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchGetAssetsHistoryRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchGetAssetsHistoryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetNames_.add(s); - break; - } - case 24: { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 34: { - com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; - if (readTimeWindow_ != null) { - subBuilder = readTimeWindow_.toBuilder(); - } - readTimeWindow_ = input.readMessage(com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTimeWindow_); - readTimeWindow_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList assetNames_; - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList - getAssetNamesList() { - return assetNames_; - } - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString - getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 3; - private int contentType_; - /** - *
-   * Optional. The content type.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-   * Optional. The content type.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The contentType. - */ - @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - - public static final int READ_TIME_WINDOW_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1.TimeWindow readTimeWindow_; - /** - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after the current time minus
-   * 35 days. If end_time is not set, it is default to current timestamp.
-   * If start_time is not set, the snapshot of the assets at end_time will be
-   * returned. The returned results contain all temporal assets whose time
-   * window overlap with read_time_window.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTimeWindow field is set. - */ - @java.lang.Override - public boolean hasReadTimeWindow() { - return readTimeWindow_ != null; - } - /** - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after the current time minus
-   * 35 days. If end_time is not set, it is default to current timestamp.
-   * If start_time is not set, the snapshot of the assets at end_time will be
-   * returned. The returned results contain all temporal assets whose time
-   * window overlap with read_time_window.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTimeWindow. - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { - return readTimeWindow_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : readTimeWindow_; - } - /** - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after the current time minus
-   * 35 days. If end_time is not set, it is default to current timestamp.
-   * If start_time is not set, the snapshot of the assets at end_time will be
-   * returned. The returned results contain all temporal assets whose time
-   * window overlap with read_time_window.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { - return getReadTimeWindow(); - } - - public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList relationshipTypes_; - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_; - } - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - for (int i = 0; i < assetNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i)); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, contentType_); - } - if (readTimeWindow_ != null) { - output.writeMessage(4, getReadTimeWindow()); - } - for (int i = 0; i < relationshipTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, relationshipTypes_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - { - int dataSize = 0; - for (int i = 0; i < assetNames_.size(); i++) { - dataSize += computeStringSizeNoTag(assetNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetNamesList().size(); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, contentType_); - } - if (readTimeWindow_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getReadTimeWindow()); - } - { - int dataSize = 0; - for (int i = 0; i < relationshipTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getRelationshipTypesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest other = (com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getAssetNamesList() - .equals(other.getAssetNamesList())) return false; - if (contentType_ != other.contentType_) return false; - if (hasReadTimeWindow() != other.hasReadTimeWindow()) return false; - if (hasReadTimeWindow()) { - if (!getReadTimeWindow() - .equals(other.getReadTimeWindow())) return false; - } - if (!getRelationshipTypesList() - .equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (getAssetNamesCount() > 0) { - hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getAssetNamesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - if (hasReadTimeWindow()) { - hash = (37 * hash) + READ_TIME_WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getReadTimeWindow().hashCode(); - } - if (getRelationshipTypesCount() > 0) { - hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipTypesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Batch get assets history request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - contentType_ = 0; - - if (readTimeWindowBuilder_ == null) { - readTimeWindow_ = null; - } else { - readTimeWindow_ = null; - readTimeWindowBuilder_ = null; - } - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest build() { - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest buildPartial() { - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest result = new com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - if (((bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetNames_ = assetNames_; - result.contentType_ = contentType_; - if (readTimeWindowBuilder_ == null) { - result.readTimeWindow_ = readTimeWindow_; - } else { - result.readTimeWindow_ = readTimeWindowBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.relationshipTypes_ = relationshipTypes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) { - return mergeFrom((com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest other) { - if (other == com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.assetNames_.isEmpty()) { - if (assetNames_.isEmpty()) { - assetNames_ = other.assetNames_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetNamesIsMutable(); - assetNames_.addAll(other.assetNames_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.hasReadTimeWindow()) { - mergeReadTimeWindow(other.getReadTimeWindow()); - } - if (!other.relationshipTypes_.isEmpty()) { - if (relationshipTypes_.isEmpty()) { - relationshipTypes_ = other.relationshipTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRelationshipTypesIsMutable(); - relationshipTypes_.addAll(other.relationshipTypes_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. It can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id")", or a project number (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList - getAssetNamesList() { - return assetNames_.getUnmodifiableView(); - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString - getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @param index The index to set the value at. - * @param value The assetNames to set. - * @return This builder for chaining. - */ - public Builder setAssetNames( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @param value The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNames( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @param values The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAllAssetNames( - java.lang.Iterable values) { - ensureAssetNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetNames_); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @return This builder for chaining. - */ - public Builder clearAssetNames() { - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets.
-     * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * The request becomes a no-op if the asset name list is empty, and the max
-     * size of the asset name list is 100 in one request.
-     * 
- * - * repeated string asset_names = 2; - * @param value The bytes of the assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - *
-     * Optional. The content type.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-     * Optional. The content type.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - - contentType_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The content type.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - /** - *
-     * Optional. The content type.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Optional. The content type.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.TimeWindow readTimeWindow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> readTimeWindowBuilder_; - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTimeWindow field is set. - */ - public boolean hasReadTimeWindow() { - return readTimeWindowBuilder_ != null || readTimeWindow_ != null; - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTimeWindow. - */ - public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { - if (readTimeWindowBuilder_ == null) { - return readTimeWindow_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : readTimeWindow_; - } else { - return readTimeWindowBuilder_.getMessage(); - } - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { - if (readTimeWindowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTimeWindow_ = value; - onChanged(); - } else { - readTimeWindowBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadTimeWindow( - com.google.cloud.asset.v1.TimeWindow.Builder builderForValue) { - if (readTimeWindowBuilder_ == null) { - readTimeWindow_ = builderForValue.build(); - onChanged(); - } else { - readTimeWindowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { - if (readTimeWindowBuilder_ == null) { - if (readTimeWindow_ != null) { - readTimeWindow_ = - com.google.cloud.asset.v1.TimeWindow.newBuilder(readTimeWindow_).mergeFrom(value).buildPartial(); - } else { - readTimeWindow_ = value; - } - onChanged(); - } else { - readTimeWindowBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearReadTimeWindow() { - if (readTimeWindowBuilder_ == null) { - readTimeWindow_ = null; - onChanged(); - } else { - readTimeWindow_ = null; - readTimeWindowBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.TimeWindow.Builder getReadTimeWindowBuilder() { - - onChanged(); - return getReadTimeWindowFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { - if (readTimeWindowBuilder_ != null) { - return readTimeWindowBuilder_.getMessageOrBuilder(); - } else { - return readTimeWindow_ == null ? - com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : readTimeWindow_; - } - } - /** - *
-     * Optional. The time window for the asset history. Both start_time and
-     * end_time are optional and if set, it must be after the current time minus
-     * 35 days. If end_time is not set, it is default to current timestamp.
-     * If start_time is not set, the snapshot of the assets at end_time will be
-     * returned. The returned results contain all temporal assets whose time
-     * window overlap with read_time_window.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> - getReadTimeWindowFieldBuilder() { - if (readTimeWindowBuilder_ == null) { - readTimeWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder>( - getReadTimeWindow(), - getParentForChildren(), - isClean()); - readTimeWindow_ = null; - } - return readTimeWindowBuilder_; - } - - private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRelationshipTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_.getUnmodifiableView(); - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index to set the value at. - * @param value The relationshipTypes to set. - * @return This builder for chaining. - */ - public Builder setRelationshipTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param values The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addAllRelationshipTypes( - java.lang.Iterable values) { - ensureRelationshipTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relationshipTypes_); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearRelationshipTypes() { - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationships' history on the [asset_names]. It
-     * returns an error if any of the [relationship_types] doesn't belong to the
-     * supported relationship types of the [asset_names] or if any of the
-     * [asset_names]'s types doesn't belong to the source types of the
-     * [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships' history on the [asset_names] or
-     * returns an error if any of the [asset_names]'s types has no relationship
-     * support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes of the relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) - private static final com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest(); - } - - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchGetAssetsHistoryRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetAssetsHistoryRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java deleted file mode 100644 index cfc137961ccd..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java +++ /dev/null @@ -1,256 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface BatchGetAssetsHistoryRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetAssetsHistoryRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The relative name of the root asset. It can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id")", or a project number (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - java.util.List - getAssetNamesList(); - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - int getAssetNamesCount(); - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - java.lang.String getAssetNames(int index); - /** - *
-   * A list of the full names of the assets.
-   * See: https://cloud.google.com/asset-inventory/docs/resource-name-format
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * The request becomes a no-op if the asset name list is empty, and the max
-   * size of the asset name list is 100 in one request.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - com.google.protobuf.ByteString - getAssetNamesBytes(int index); - - /** - *
-   * Optional. The content type.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - *
-   * Optional. The content type.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The contentType. - */ - com.google.cloud.asset.v1.ContentType getContentType(); - - /** - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after the current time minus
-   * 35 days. If end_time is not set, it is default to current timestamp.
-   * If start_time is not set, the snapshot of the assets at end_time will be
-   * returned. The returned results contain all temporal assets whose time
-   * window overlap with read_time_window.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTimeWindow field is set. - */ - boolean hasReadTimeWindow(); - /** - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after the current time minus
-   * 35 days. If end_time is not set, it is default to current timestamp.
-   * If start_time is not set, the snapshot of the assets at end_time will be
-   * returned. The returned results contain all temporal assets whose time
-   * window overlap with read_time_window.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTimeWindow. - */ - com.google.cloud.asset.v1.TimeWindow getReadTimeWindow(); - /** - *
-   * Optional. The time window for the asset history. Both start_time and
-   * end_time are optional and if set, it must be after the current time minus
-   * 35 days. If end_time is not set, it is default to current timestamp.
-   * If start_time is not set, the snapshot of the assets at end_time will be
-   * returned. The returned results contain all temporal assets whose time
-   * window overlap with read_time_window.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); - - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the relationshipTypes. - */ - java.util.List - getRelationshipTypesList(); - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of relationshipTypes. - */ - int getRelationshipTypesCount(); - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - java.lang.String getRelationshipTypes(int index); - /** - *
-   * Optional. A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationships' history on the [asset_names]. It
-   * returns an error if any of the [relationship_types] doesn't belong to the
-   * supported relationship types of the [asset_names] or if any of the
-   * [asset_names]'s types doesn't belong to the source types of the
-   * [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships' history on the [asset_names] or
-   * returns an error if any of the [asset_names]'s types has no relationship
-   * support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - com.google.protobuf.ByteString - getRelationshipTypesBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java deleted file mode 100644 index 1498932954fb..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponse.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Batch get assets history response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryResponse} - */ -public final class BatchGetAssetsHistoryResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) - BatchGetAssetsHistoryResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchGetAssetsHistoryResponse.newBuilder() to construct. - private BatchGetAssetsHistoryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchGetAssetsHistoryResponse() { - assets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchGetAssetsHistoryResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchGetAssetsHistoryResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage(com.google.cloud.asset.v1.TemporalAsset.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.Builder.class); - } - - public static final int ASSETS_FIELD_NUMBER = 1; - private java.util.List assets_; - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - @java.lang.Override - public java.util.List getAssetsList() { - return assets_; - } - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - @java.lang.Override - public java.util.List - getAssetsOrBuilderList() { - return assets_; - } - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - @java.lang.Override - public int getAssetsCount() { - return assets_.size(); - } - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TemporalAsset getAssets(int index) { - return assets_.get(index); - } - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TemporalAssetOrBuilder getAssetsOrBuilder( - int index) { - return assets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < assets_.size(); i++) { - output.writeMessage(1, assets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < assets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, assets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse other = (com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) obj; - - if (!getAssetsList() - .equals(other.getAssetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAssetsCount() > 0) { - hash = (37 * hash) + ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getAssetsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Batch get assets history response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetAssetsHistoryResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.class, com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAssetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - assetsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse build() { - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse buildPartial() { - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse result = new com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(this); - int from_bitField0_ = bitField0_; - if (assetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assets_ = assets_; - } else { - result.assets_ = assetsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) { - return mergeFrom((com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse other) { - if (other == com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse.getDefaultInstance()) return this; - if (assetsBuilder_ == null) { - if (!other.assets_.isEmpty()) { - if (assets_.isEmpty()) { - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetsIsMutable(); - assets_.addAll(other.assets_); - } - onChanged(); - } - } else { - if (!other.assets_.isEmpty()) { - if (assetsBuilder_.isEmpty()) { - assetsBuilder_.dispose(); - assetsBuilder_ = null; - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - assetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAssetsFieldBuilder() : null; - } else { - assetsBuilder_.addAllMessages(other.assets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List assets_ = - java.util.Collections.emptyList(); - private void ensureAssetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(assets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TemporalAsset, com.google.cloud.asset.v1.TemporalAsset.Builder, com.google.cloud.asset.v1.TemporalAssetOrBuilder> assetsBuilder_; - - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public java.util.List getAssetsList() { - if (assetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(assets_); - } else { - return assetsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public int getAssetsCount() { - if (assetsBuilder_ == null) { - return assets_.size(); - } else { - return assetsBuilder_.getCount(); - } - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1.TemporalAsset getAssets(int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); - } else { - return assetsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1.TemporalAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.set(index, value); - onChanged(); - } else { - assetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1.TemporalAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.set(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder addAssets(com.google.cloud.asset.v1.TemporalAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(value); - onChanged(); - } else { - assetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1.TemporalAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(index, value); - onChanged(); - } else { - assetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder addAssets( - com.google.cloud.asset.v1.TemporalAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1.TemporalAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder addAllAssets( - java.lang.Iterable values) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assets_); - onChanged(); - } else { - assetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder clearAssets() { - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - assetsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public Builder removeAssets(int index) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.remove(index); - onChanged(); - } else { - assetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1.TemporalAsset.Builder getAssetsBuilder( - int index) { - return getAssetsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1.TemporalAssetOrBuilder getAssetsOrBuilder( - int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); } else { - return assetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public java.util.List - getAssetsOrBuilderList() { - if (assetsBuilder_ != null) { - return assetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(assets_); - } - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1.TemporalAsset.Builder addAssetsBuilder() { - return getAssetsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance()); - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public com.google.cloud.asset.v1.TemporalAsset.Builder addAssetsBuilder( - int index) { - return getAssetsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance()); - } - /** - *
-     * A list of assets with valid time windows.
-     * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - public java.util.List - getAssetsBuilderList() { - return getAssetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TemporalAsset, com.google.cloud.asset.v1.TemporalAsset.Builder, com.google.cloud.asset.v1.TemporalAssetOrBuilder> - getAssetsFieldBuilder() { - if (assetsBuilder_ == null) { - assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TemporalAsset, com.google.cloud.asset.v1.TemporalAsset.Builder, com.google.cloud.asset.v1.TemporalAssetOrBuilder>( - assets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - assets_ = null; - } - return assetsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) - private static final com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse(); - } - - public static com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchGetAssetsHistoryResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetAssetsHistoryResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java deleted file mode 100644 index 70e9d55a250e..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface BatchGetAssetsHistoryResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetAssetsHistoryResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - java.util.List - getAssetsList(); - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - com.google.cloud.asset.v1.TemporalAsset getAssets(int index); - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - int getAssetsCount(); - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - java.util.List - getAssetsOrBuilderList(); - /** - *
-   * A list of assets with valid time windows.
-   * 
- * - * repeated .google.cloud.asset.v1.TemporalAsset assets = 1; - */ - com.google.cloud.asset.v1.TemporalAssetOrBuilder getAssetsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java deleted file mode 100644 index 3acec1606453..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequest.java +++ /dev/null @@ -1,945 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A request message for
- * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest} - */ -public final class BatchGetEffectiveIamPoliciesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) - BatchGetEffectiveIamPoliciesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchGetEffectiveIamPoliciesRequest.newBuilder() to construct. - private BatchGetEffectiveIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchGetEffectiveIamPoliciesRequest() { - scope_ = ""; - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchGetEffectiveIamPoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchGetEffectiveIamPoliciesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - scope_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - names_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - names_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - names_ = names_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.Builder.class); - } - - public static final int SCOPE_FIELD_NUMBER = 1; - private volatile java.lang.Object scope_; - /** - *
-   * Required. Only IAM policies on or below the scope will be returned.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The scope. - */ - @java.lang.Override - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } - } - /** - *
-   * Required. Only IAM policies on or below the scope will be returned.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for scope. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAMES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList names_; - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return A list containing the names. - */ - public com.google.protobuf.ProtocolStringList - getNamesList() { - return names_; - } - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The count of names. - */ - public int getNamesCount() { - return names_.size(); - } - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param index The index of the element to return. - * @return The names at the given index. - */ - public java.lang.String getNames(int index) { - return names_.get(index); - } - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - public com.google.protobuf.ByteString - getNamesBytes(int index) { - return names_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); - } - for (int i = 0; i < names_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, names_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); - } - { - int dataSize = 0; - for (int i = 0; i < names_.size(); i++) { - dataSize += computeStringSizeNoTag(names_.getRaw(i)); - } - size += dataSize; - size += 1 * getNamesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) obj; - - if (!getScope() - .equals(other.getScope())) return false; - if (!getNamesList() - .equals(other.getNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScope().hashCode(); - if (getNamesCount() > 0) { - hash = (37 * hash) + NAMES_FIELD_NUMBER; - hash = (53 * hash) + getNamesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A request message for
-   * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest build() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest buildPartial() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest(this); - int from_bitField0_ = bitField0_; - result.scope_ = scope_; - if (((bitField0_ & 0x00000001) != 0)) { - names_ = names_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.names_ = names_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) { - return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest other) { - if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.getDefaultInstance()) return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (!other.names_.isEmpty()) { - if (names_.isEmpty()) { - names_ = other.names_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNamesIsMutable(); - names_.addAll(other.names_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object scope_ = ""; - /** - *
-     * Required. Only IAM policies on or below the scope will be returned.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The scope. - */ - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Only IAM policies on or below the scope will be returned.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for scope. - */ - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Only IAM policies on or below the scope will be returned.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - scope_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Only IAM policies on or below the scope will be returned.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearScope() { - - scope_ = getDefaultInstance().getScope(); - onChanged(); - return this; - } - /** - *
-     * Required. Only IAM policies on or below the scope will be returned.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - scope_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - names_ = new com.google.protobuf.LazyStringArrayList(names_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return A list containing the names. - */ - public com.google.protobuf.ProtocolStringList - getNamesList() { - return names_.getUnmodifiableView(); - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The count of names. - */ - public int getNamesCount() { - return names_.size(); - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param index The index of the element to return. - * @return The names at the given index. - */ - public java.lang.String getNames(int index) { - return names_.get(index); - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - public com.google.protobuf.ByteString - getNamesBytes(int index) { - return names_.getByteString(index); - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param index The index to set the value at. - * @param value The names to set. - * @return This builder for chaining. - */ - public Builder setNames( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNamesIsMutable(); - names_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The names to add. - * @return This builder for chaining. - */ - public Builder addNames( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNamesIsMutable(); - names_.add(value); - onChanged(); - return this; - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param values The names to add. - * @return This builder for chaining. - */ - public Builder addAllNames( - java.lang.Iterable values) { - ensureNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, names_); - onChanged(); - return this; - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearNames() { - names_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Required. The names refer to the [full_resource_names]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * A maximum of 20 resources' effective policies can be retrieved in a batch.
-     * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes of the names to add. - * @return This builder for chaining. - */ - public Builder addNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureNamesIsMutable(); - names_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) - private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest(); - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchGetEffectiveIamPoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetEffectiveIamPoliciesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java deleted file mode 100644 index f75a8b07cda0..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesRequestOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface BatchGetEffectiveIamPoliciesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Only IAM policies on or below the scope will be returned.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The scope. - */ - java.lang.String getScope(); - /** - *
-   * Required. Only IAM policies on or below the scope will be returned.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for scope. - */ - com.google.protobuf.ByteString - getScopeBytes(); - - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return A list containing the names. - */ - java.util.List - getNamesList(); - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The count of names. - */ - int getNamesCount(); - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param index The index of the element to return. - * @return The names at the given index. - */ - java.lang.String getNames(int index); - /** - *
-   * Required. The names refer to the [full_resource_names]
-   * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * A maximum of 20 resources' effective policies can be retrieved in a batch.
-   * 
- * - * repeated string names = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param index The index of the value to return. - * @return The bytes of the names at the given index. - */ - com.google.protobuf.ByteString - getNamesBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java deleted file mode 100644 index 1cc8063e30d4..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponse.java +++ /dev/null @@ -1,3530 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A response message for
- * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse} - */ -public final class BatchGetEffectiveIamPoliciesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) - BatchGetEffectiveIamPoliciesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use BatchGetEffectiveIamPoliciesResponse.newBuilder() to construct. - private BatchGetEffectiveIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BatchGetEffectiveIamPoliciesResponse() { - policyResults_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BatchGetEffectiveIamPoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchGetEffectiveIamPoliciesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policyResults_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policyResults_.add( - input.readMessage(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policyResults_ = java.util.Collections.unmodifiableList(policyResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.Builder.class); - } - - public interface EffectiveIamPolicyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The [full_resource_name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for which the
-     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-     * are computed. This is one of the
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-     * the caller provides in the request.
-     * 
- * - * string full_resource_name = 1; - * @return The fullResourceName. - */ - java.lang.String getFullResourceName(); - /** - *
-     * The [full_resource_name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for which the
-     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-     * are computed. This is one of the
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-     * the caller provides in the request.
-     * 
- * - * string full_resource_name = 1; - * @return The bytes for fullResourceName. - */ - com.google.protobuf.ByteString - getFullResourceNameBytes(); - - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - java.util.List - getPoliciesList(); - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getPolicies(int index); - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - int getPoliciesCount(); - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - java.util.List - getPoliciesOrBuilderList(); - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder getPoliciesOrBuilder( - int index); - } - /** - *
-   * The effective IAM policies on one resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy} - */ - public static final class EffectiveIamPolicy extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) - EffectiveIamPolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use EffectiveIamPolicy.newBuilder() to construct. - private EffectiveIamPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private EffectiveIamPolicy() { - fullResourceName_ = ""; - policies_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new EffectiveIamPolicy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private EffectiveIamPolicy( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - fullResourceName_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder.class); - } - - public interface PolicyInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * The full resource name the
-       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-       * is directly attached to.
-       * 
- * - * string attached_resource = 1; - * @return The attachedResource. - */ - java.lang.String getAttachedResource(); - /** - *
-       * The full resource name the
-       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-       * is directly attached to.
-       * 
- * - * string attached_resource = 1; - * @return The bytes for attachedResource. - */ - com.google.protobuf.ByteString - getAttachedResourceBytes(); - - /** - *
-       * The IAM policy that's directly attached to the
-       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-       * 
- * - * .google.iam.v1.Policy policy = 2; - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - *
-       * The IAM policy that's directly attached to the
-       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-       * 
- * - * .google.iam.v1.Policy policy = 2; - * @return The policy. - */ - com.google.iam.v1.Policy getPolicy(); - /** - *
-       * The IAM policy that's directly attached to the
-       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-       * 
- * - * .google.iam.v1.Policy policy = 2; - */ - com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); - } - /** - *
-     * The IAM policy and its attached resource.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo} - */ - public static final class PolicyInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) - PolicyInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use PolicyInfo.newBuilder() to construct. - private PolicyInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PolicyInfo() { - attachedResource_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PolicyInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PolicyInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - attachedResource_ = s; - break; - } - case 18: { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder.class); - } - - public static final int ATTACHED_RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object attachedResource_; - /** - *
-       * The full resource name the
-       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-       * is directly attached to.
-       * 
- * - * string attached_resource = 1; - * @return The attachedResource. - */ - @java.lang.Override - public java.lang.String getAttachedResource() { - java.lang.Object ref = attachedResource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attachedResource_ = s; - return s; - } - } - /** - *
-       * The full resource name the
-       * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-       * is directly attached to.
-       * 
- * - * string attached_resource = 1; - * @return The bytes for attachedResource. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttachedResourceBytes() { - java.lang.Object ref = attachedResource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attachedResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POLICY_FIELD_NUMBER = 2; - private com.google.iam.v1.Policy policy_; - /** - *
-       * The IAM policy that's directly attached to the
-       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-       * 
- * - * .google.iam.v1.Policy policy = 2; - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - *
-       * The IAM policy that's directly attached to the
-       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-       * 
- * - * .google.iam.v1.Policy policy = 2; - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getPolicy() { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } - /** - *
-       * The IAM policy that's directly attached to the
-       * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-       * 
- * - * .google.iam.v1.Policy policy = 2; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachedResource_); - } - if (policy_ != null) { - output.writeMessage(2, getPolicy()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachedResource_); - } - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getPolicy()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) obj; - - if (!getAttachedResource() - .equals(other.getAttachedResource())) return false; - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy() - .equals(other.getPolicy())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ATTACHED_RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getAttachedResource().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * The IAM policy and its attached resource.
-       * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - attachedResource_ = ""; - - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_PolicyInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getDefaultInstanceForType() { - return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo build() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo buildPartial() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo(this); - result.attachedResource_ = attachedResource_; - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) { - return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo other) { - if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance()) return this; - if (!other.getAttachedResource().isEmpty()) { - attachedResource_ = other.attachedResource_; - onChanged(); - } - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object attachedResource_ = ""; - /** - *
-         * The full resource name the
-         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-         * is directly attached to.
-         * 
- * - * string attached_resource = 1; - * @return The attachedResource. - */ - public java.lang.String getAttachedResource() { - java.lang.Object ref = attachedResource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attachedResource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-         * The full resource name the
-         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-         * is directly attached to.
-         * 
- * - * string attached_resource = 1; - * @return The bytes for attachedResource. - */ - public com.google.protobuf.ByteString - getAttachedResourceBytes() { - java.lang.Object ref = attachedResource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attachedResource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-         * The full resource name the
-         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-         * is directly attached to.
-         * 
- * - * string attached_resource = 1; - * @param value The attachedResource to set. - * @return This builder for chaining. - */ - public Builder setAttachedResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - attachedResource_ = value; - onChanged(); - return this; - } - /** - *
-         * The full resource name the
-         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-         * is directly attached to.
-         * 
- * - * string attached_resource = 1; - * @return This builder for chaining. - */ - public Builder clearAttachedResource() { - - attachedResource_ = getDefaultInstance().getAttachedResource(); - onChanged(); - return this; - } - /** - *
-         * The full resource name the
-         * [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy]
-         * is directly attached to.
-         * 
- * - * string attached_resource = 1; - * @param value The bytes for attachedResource to set. - * @return This builder for chaining. - */ - public Builder setAttachedResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - attachedResource_ = value; - onChanged(); - return this; - } - - private com.google.iam.v1.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> policyBuilder_; - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - * @return The policy. - */ - public com.google.iam.v1.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - */ - public Builder setPolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - */ - public Builder setPolicy( - com.google.iam.v1.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - */ - public Builder mergePolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - */ - public com.google.iam.v1.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - */ - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? - com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } - } - /** - *
-         * The IAM policy that's directly attached to the
-         * [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource].
-         * 
- * - * .google.iam.v1.Policy policy = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( - getPolicy(), - getParentForChildren(), - isClean()); - policy_ = null; - } - return policyBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo) - private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo(); - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PolicyInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object fullResourceName_; - /** - *
-     * The [full_resource_name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for which the
-     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-     * are computed. This is one of the
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-     * the caller provides in the request.
-     * 
- * - * string full_resource_name = 1; - * @return The fullResourceName. - */ - @java.lang.Override - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } - } - /** - *
-     * The [full_resource_name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for which the
-     * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-     * are computed. This is one of the
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-     * the caller provides in the request.
-     * 
- * - * string full_resource_name = 1; - * @return The bytes for fullResourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POLICIES_FIELD_NUMBER = 2; - private java.util.List policies_; - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - @java.lang.Override - public java.util.List getPoliciesList() { - return policies_; - } - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - @java.lang.Override - public java.util.List - getPoliciesOrBuilderList() { - return policies_; - } - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - @java.lang.Override - public int getPoliciesCount() { - return policies_.size(); - } - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getPolicies(int index) { - return policies_.get(index); - } - /** - *
-     * The effective policies for the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies include the policy set on the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * and those set on its parents and ancestors up to the
-     * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-     * Note that these policies are not filtered according to the resource type
-     * of the
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-     * These policies are hierarchically ordered by
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * starting from
-     * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-     * itself to its parents and ancestors, such that policies[i]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-     * is the child of policies[i+1]'s
-     * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-     * if policies[i+1] exists.
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder getPoliciesOrBuilder( - int index) { - return policies_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); - } - for (int i = 0; i < policies_.size(); i++) { - output.writeMessage(2, policies_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); - } - for (int i = 0; i < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, policies_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) obj; - - if (!getFullResourceName() - .equals(other.getFullResourceName())) return false; - if (!getPoliciesList() - .equals(other.getPoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFullResourceName().hashCode(); - if (getPoliciesCount() > 0) { - hash = (37 * hash) + POLICIES_FIELD_NUMBER; - hash = (53 * hash) + getPoliciesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The effective IAM policies on one resource.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - fullResourceName_ = ""; - - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policiesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_EffectiveIamPolicy_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getDefaultInstanceForType() { - return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy build() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy buildPartial() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy(this); - int from_bitField0_ = bitField0_; - result.fullResourceName_ = fullResourceName_; - if (policiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policies_ = policies_; - } else { - result.policies_ = policiesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) { - return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy other) { - if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance()) return this; - if (!other.getFullResourceName().isEmpty()) { - fullResourceName_ = other.fullResourceName_; - onChanged(); - } - if (policiesBuilder_ == null) { - if (!other.policies_.isEmpty()) { - if (policies_.isEmpty()) { - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePoliciesIsMutable(); - policies_.addAll(other.policies_); - } - onChanged(); - } - } else { - if (!other.policies_.isEmpty()) { - if (policiesBuilder_.isEmpty()) { - policiesBuilder_.dispose(); - policiesBuilder_ = null; - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - policiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPoliciesFieldBuilder() : null; - } else { - policiesBuilder_.addAllMessages(other.policies_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object fullResourceName_ = ""; - /** - *
-       * The [full_resource_name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * for which the
-       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-       * are computed. This is one of the
-       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-       * the caller provides in the request.
-       * 
- * - * string full_resource_name = 1; - * @return The fullResourceName. - */ - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The [full_resource_name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * for which the
-       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-       * are computed. This is one of the
-       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-       * the caller provides in the request.
-       * 
- * - * string full_resource_name = 1; - * @return The bytes for fullResourceName. - */ - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The [full_resource_name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * for which the
-       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-       * are computed. This is one of the
-       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-       * the caller provides in the request.
-       * 
- * - * string full_resource_name = 1; - * @param value The fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fullResourceName_ = value; - onChanged(); - return this; - } - /** - *
-       * The [full_resource_name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * for which the
-       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-       * are computed. This is one of the
-       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-       * the caller provides in the request.
-       * 
- * - * string full_resource_name = 1; - * @return This builder for chaining. - */ - public Builder clearFullResourceName() { - - fullResourceName_ = getDefaultInstance().getFullResourceName(); - onChanged(); - return this; - } - /** - *
-       * The [full_resource_name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * for which the
-       * [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]
-       * are computed. This is one of the
-       * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]
-       * the caller provides in the request.
-       * 
- * - * string full_resource_name = 1; - * @param value The bytes for fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fullResourceName_ = value; - onChanged(); - return this; - } - - private java.util.List policies_ = - java.util.Collections.emptyList(); - private void ensurePoliciesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList(policies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder> policiesBuilder_; - - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public java.util.List getPoliciesList() { - if (policiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(policies_); - } else { - return policiesBuilder_.getMessageList(); - } - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public int getPoliciesCount() { - if (policiesBuilder_ == null) { - return policies_.size(); - } else { - return policiesBuilder_.getCount(); - } - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo getPolicies(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessage(index); - } - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder setPolicies( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.set(index, value); - onChanged(); - } else { - policiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder setPolicies( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.set(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder addPolicies(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(value); - onChanged(); - } else { - policiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder addPolicies( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(index, value); - onChanged(); - } else { - policiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder addPolicies( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder addPolicies( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder addAllPolicies( - java.lang.Iterable values) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, policies_); - onChanged(); - } else { - policiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder clearPolicies() { - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policiesBuilder_.clear(); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public Builder removePolicies(int index) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.remove(index); - onChanged(); - } else { - policiesBuilder_.remove(index); - } - return this; - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder getPoliciesBuilder( - int index) { - return getPoliciesFieldBuilder().getBuilder(index); - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder getPoliciesOrBuilder( - int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); } else { - return policiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public java.util.List - getPoliciesOrBuilderList() { - if (policiesBuilder_ != null) { - return policiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policies_); - } - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder addPoliciesBuilder() { - return getPoliciesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance()); - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder addPoliciesBuilder( - int index) { - return getPoliciesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.getDefaultInstance()); - } - /** - *
-       * The effective policies for the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies include the policy set on the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * and those set on its parents and ancestors up to the
-       * [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope].
-       * Note that these policies are not filtered according to the resource type
-       * of the
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name].
-       * These policies are hierarchically ordered by
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * starting from
-       * [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]
-       * itself to its parents and ancestors, such that policies[i]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]
-       * is the child of policies[i+1]'s
-       * [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource],
-       * if policies[i+1] exists.
-       * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo policies = 2; - */ - public java.util.List - getPoliciesBuilderList() { - return getPoliciesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder> - getPoliciesFieldBuilder() { - if (policiesBuilder_ == null) { - policiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfoOrBuilder>( - policies_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - policies_ = null; - } - return policiesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy) - private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy(); - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EffectiveIamPolicy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new EffectiveIamPolicy(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int POLICY_RESULTS_FIELD_NUMBER = 2; - private java.util.List policyResults_; - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - @java.lang.Override - public java.util.List getPolicyResultsList() { - return policyResults_; - } - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - @java.lang.Override - public java.util.List - getPolicyResultsOrBuilderList() { - return policyResults_; - } - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - @java.lang.Override - public int getPolicyResultsCount() { - return policyResults_.size(); - } - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getPolicyResults(int index) { - return policyResults_.get(index); - } - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder getPolicyResultsOrBuilder( - int index) { - return policyResults_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < policyResults_.size(); i++) { - output.writeMessage(2, policyResults_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policyResults_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, policyResults_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse other = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) obj; - - if (!getPolicyResultsList() - .equals(other.getPolicyResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPolicyResultsCount() > 0) { - hash = (37 * hash) + POLICY_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getPolicyResultsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A response message for
-   * [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.class, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPolicyResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (policyResultsBuilder_ == null) { - policyResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policyResultsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BatchGetEffectiveIamPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse build() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse buildPartial() { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse result = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (policyResultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policyResults_ = java.util.Collections.unmodifiableList(policyResults_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policyResults_ = policyResults_; - } else { - result.policyResults_ = policyResultsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) { - return mergeFrom((com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse other) { - if (other == com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.getDefaultInstance()) return this; - if (policyResultsBuilder_ == null) { - if (!other.policyResults_.isEmpty()) { - if (policyResults_.isEmpty()) { - policyResults_ = other.policyResults_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePolicyResultsIsMutable(); - policyResults_.addAll(other.policyResults_); - } - onChanged(); - } - } else { - if (!other.policyResults_.isEmpty()) { - if (policyResultsBuilder_.isEmpty()) { - policyResultsBuilder_.dispose(); - policyResultsBuilder_ = null; - policyResults_ = other.policyResults_; - bitField0_ = (bitField0_ & ~0x00000001); - policyResultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPolicyResultsFieldBuilder() : null; - } else { - policyResultsBuilder_.addAllMessages(other.policyResults_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List policyResults_ = - java.util.Collections.emptyList(); - private void ensurePolicyResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policyResults_ = new java.util.ArrayList(policyResults_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder> policyResultsBuilder_; - - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public java.util.List getPolicyResultsList() { - if (policyResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(policyResults_); - } else { - return policyResultsBuilder_.getMessageList(); - } - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public int getPolicyResultsCount() { - if (policyResultsBuilder_ == null) { - return policyResults_.size(); - } else { - return policyResultsBuilder_.getCount(); - } - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getPolicyResults(int index) { - if (policyResultsBuilder_ == null) { - return policyResults_.get(index); - } else { - return policyResultsBuilder_.getMessage(index); - } - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder setPolicyResults( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) { - if (policyResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyResultsIsMutable(); - policyResults_.set(index, value); - onChanged(); - } else { - policyResultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder setPolicyResults( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder builderForValue) { - if (policyResultsBuilder_ == null) { - ensurePolicyResultsIsMutable(); - policyResults_.set(index, builderForValue.build()); - onChanged(); - } else { - policyResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder addPolicyResults(com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) { - if (policyResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyResultsIsMutable(); - policyResults_.add(value); - onChanged(); - } else { - policyResultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder addPolicyResults( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy value) { - if (policyResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePolicyResultsIsMutable(); - policyResults_.add(index, value); - onChanged(); - } else { - policyResultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder addPolicyResults( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder builderForValue) { - if (policyResultsBuilder_ == null) { - ensurePolicyResultsIsMutable(); - policyResults_.add(builderForValue.build()); - onChanged(); - } else { - policyResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder addPolicyResults( - int index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder builderForValue) { - if (policyResultsBuilder_ == null) { - ensurePolicyResultsIsMutable(); - policyResults_.add(index, builderForValue.build()); - onChanged(); - } else { - policyResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder addAllPolicyResults( - java.lang.Iterable values) { - if (policyResultsBuilder_ == null) { - ensurePolicyResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, policyResults_); - onChanged(); - } else { - policyResultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder clearPolicyResults() { - if (policyResultsBuilder_ == null) { - policyResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policyResultsBuilder_.clear(); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public Builder removePolicyResults(int index) { - if (policyResultsBuilder_ == null) { - ensurePolicyResultsIsMutable(); - policyResults_.remove(index); - onChanged(); - } else { - policyResultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder getPolicyResultsBuilder( - int index) { - return getPolicyResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder getPolicyResultsOrBuilder( - int index) { - if (policyResultsBuilder_ == null) { - return policyResults_.get(index); } else { - return policyResultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public java.util.List - getPolicyResultsOrBuilderList() { - if (policyResultsBuilder_ != null) { - return policyResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policyResults_); - } - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder addPolicyResultsBuilder() { - return getPolicyResultsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance()); - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder addPolicyResultsBuilder( - int index) { - return getPolicyResultsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.getDefaultInstance()); - } - /** - *
-     * The effective policies for a batch of resources. Note that the results
-     * order is the same as the order of
-     * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-     * When a resource does not have any effective IAM policies, its corresponding
-     * policy_result will contain empty
-     * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-     * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - public java.util.List - getPolicyResultsBuilderList() { - return getPolicyResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder> - getPolicyResultsFieldBuilder() { - if (policyResultsBuilder_ == null) { - policyResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.Builder, com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder>( - policyResults_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - policyResults_ = null; - } - return policyResultsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) - private static final com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse(); - } - - public static com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchGetEffectiveIamPoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchGetEffectiveIamPoliciesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java deleted file mode 100644 index 55cd6994abb1..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetEffectiveIamPoliciesResponseOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface BatchGetEffectiveIamPoliciesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - java.util.List - getPolicyResultsList(); - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy getPolicyResults(int index); - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - int getPolicyResultsCount(); - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - java.util.List - getPolicyResultsOrBuilderList(); - /** - *
-   * The effective policies for a batch of resources. Note that the results
-   * order is the same as the order of
-   * [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names].
-   * When a resource does not have any effective IAM policies, its corresponding
-   * policy_result will contain empty
-   * [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies].
-   * 
- * - * repeated .google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy policy_results = 2; - */ - com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicyOrBuilder getPolicyResultsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java deleted file mode 100644 index f21e8c3b03ac..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java +++ /dev/null @@ -1,1494 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A BigQuery destination for exporting assets to.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.BigQueryDestination} - */ -public final class BigQueryDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.BigQueryDestination) - BigQueryDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use BigQueryDestination.newBuilder() to construct. - private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryDestination() { - dataset_ = ""; - table_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - table_ = s; - break; - } - case 24: { - - force_ = input.readBool(); - break; - } - case 34: { - com.google.cloud.asset.v1.PartitionSpec.Builder subBuilder = null; - if (partitionSpec_ != null) { - subBuilder = partitionSpec_.toBuilder(); - } - partitionSpec_ = input.readMessage(com.google.cloud.asset.v1.PartitionSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partitionSpec_); - partitionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - - separateTablesPerAssetType_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BigQueryDestination.class, com.google.cloud.asset.v1.BigQueryDestination.Builder.class); - } - - public static final int DATASET_FIELD_NUMBER = 1; - private volatile java.lang.Object dataset_; - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-   * determines the
-   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-   * influences the schema.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - @java.lang.Override - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } - } - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-   * determines the
-   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-   * influences the schema.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_FIELD_NUMBER = 2; - private volatile java.lang.Object table_; - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - @java.lang.Override - public java.lang.String getTable() { - java.lang.Object ref = table_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - table_ = s; - return s; - } - } - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 3; - private boolean force_; - /** - *
-   * If the destination table already exists and this flag is `TRUE`, the
-   * table will be overwritten by the contents of assets snapshot. If the flag
-   * is `FALSE` or unset and the destination table already exists, the export
-   * call returns an INVALID_ARGUMEMT error.
-   * 
- * - * bool force = 3; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - public static final int PARTITION_SPEC_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1.PartitionSpec partitionSpec_; - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - * @return Whether the partitionSpec field is set. - */ - @java.lang.Override - public boolean hasPartitionSpec() { - return partitionSpec_ != null; - } - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - * @return The partitionSpec. - */ - @java.lang.Override - public com.google.cloud.asset.v1.PartitionSpec getPartitionSpec() { - return partitionSpec_ == null ? com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance() : partitionSpec_; - } - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { - return getPartitionSpec(); - } - - public static final int SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER = 5; - private boolean separateTablesPerAssetType_; - /** - *
-   * If this flag is `TRUE`, the snapshot results will be written to one or
-   * multiple tables, each of which contains results of one asset type. The
-   * [force] and [partition_spec] fields will apply to each of them.
-   * Field [table] will be concatenated with "_" and the asset type names (see
-   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-   * supported asset types) to construct per-asset-type table names, in which
-   * all non-alphanumeric characters like "." and "/" will be substituted by
-   * "_". Example: if field [table] is "mytable" and snapshot results
-   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-   * tables does not exist, a new table with the concatenated name will be
-   * created.
-   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-   * each table will include RECORD-type columns mapped to the nested fields in
-   * the Asset.resource.data field of that asset type (up to the 15 nested level
-   * BigQuery supports
-   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-   * fields in >15 nested levels will be stored in JSON format string as a child
-   * column of its parent RECORD column.
-   * If error occurs when exporting to any table, the whole export call will
-   * return an error but the export results that already succeed will persist.
-   * Example: if exporting to table_type_A succeeds when exporting to
-   * table_type_B fails during one export call, the results in table_type_A will
-   * persist and there will not be partial results persisting in a table.
-   * 
- * - * bool separate_tables_per_asset_type = 5; - * @return The separateTablesPerAssetType. - */ - @java.lang.Override - public boolean getSeparateTablesPerAssetType() { - return separateTablesPerAssetType_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); - } - if (force_ != false) { - output.writeBool(3, force_); - } - if (partitionSpec_ != null) { - output.writeMessage(4, getPartitionSpec()); - } - if (separateTablesPerAssetType_ != false) { - output.writeBool(5, separateTablesPerAssetType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, force_); - } - if (partitionSpec_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPartitionSpec()); - } - if (separateTablesPerAssetType_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, separateTablesPerAssetType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.BigQueryDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.BigQueryDestination other = (com.google.cloud.asset.v1.BigQueryDestination) obj; - - if (!getDataset() - .equals(other.getDataset())) return false; - if (!getTable() - .equals(other.getTable())) return false; - if (getForce() - != other.getForce()) return false; - if (hasPartitionSpec() != other.hasPartitionSpec()) return false; - if (hasPartitionSpec()) { - if (!getPartitionSpec() - .equals(other.getPartitionSpec())) return false; - } - if (getSeparateTablesPerAssetType() - != other.getSeparateTablesPerAssetType()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - if (hasPartitionSpec()) { - hash = (37 * hash) + PARTITION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getPartitionSpec().hashCode(); - } - hash = (37 * hash) + SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getSeparateTablesPerAssetType()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.BigQueryDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A BigQuery destination for exporting assets to.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.BigQueryDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.BigQueryDestination) - com.google.cloud.asset.v1.BigQueryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.BigQueryDestination.class, com.google.cloud.asset.v1.BigQueryDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.BigQueryDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - dataset_ = ""; - - table_ = ""; - - force_ = false; - - if (partitionSpecBuilder_ == null) { - partitionSpec_ = null; - } else { - partitionSpec_ = null; - partitionSpecBuilder_ = null; - } - separateTablesPerAssetType_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestination build() { - com.google.cloud.asset.v1.BigQueryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestination buildPartial() { - com.google.cloud.asset.v1.BigQueryDestination result = new com.google.cloud.asset.v1.BigQueryDestination(this); - result.dataset_ = dataset_; - result.table_ = table_; - result.force_ = force_; - if (partitionSpecBuilder_ == null) { - result.partitionSpec_ = partitionSpec_; - } else { - result.partitionSpec_ = partitionSpecBuilder_.build(); - } - result.separateTablesPerAssetType_ = separateTablesPerAssetType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.BigQueryDestination) { - return mergeFrom((com.google.cloud.asset.v1.BigQueryDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.BigQueryDestination other) { - if (other == com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance()) return this; - if (!other.getDataset().isEmpty()) { - dataset_ = other.dataset_; - onChanged(); - } - if (!other.getTable().isEmpty()) { - table_ = other.table_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - if (other.hasPartitionSpec()) { - mergePartitionSpec(other.getPartitionSpec()); - } - if (other.getSeparateTablesPerAssetType() != false) { - setSeparateTablesPerAssetType(other.getSeparateTablesPerAssetType()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.BigQueryDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.BigQueryDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object dataset_ = ""; - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-     * determines the
-     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-     * influences the schema.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-     * determines the
-     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-     * influences the schema.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-     * determines the
-     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-     * influences the schema.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The dataset to set. - * @return This builder for chaining. - */ - public Builder setDataset( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataset_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-     * determines the
-     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-     * influences the schema.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearDataset() { - - dataset_ = getDefaultInstance().getDataset(); - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-     * determines the
-     * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-     * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-     * influences the schema.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for dataset to set. - * @return This builder for chaining. - */ - public Builder setDatasetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataset_ = value; - onChanged(); - return this; - } - - private java.lang.Object table_ = ""; - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - public java.lang.String getTable() { - java.lang.Object ref = table_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - table_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - public com.google.protobuf.ByteString - getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The table to set. - * @return This builder for chaining. - */ - public Builder setTable( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - table_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearTable() { - - table_ = getDefaultInstance().getTable(); - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for table to set. - * @return This builder for chaining. - */ - public Builder setTableBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - table_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is `FALSE` or unset and the destination table already exists, the export
-     * call returns an INVALID_ARGUMEMT error.
-     * 
- * - * bool force = 3; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is `FALSE` or unset and the destination table already exists, the export
-     * call returns an INVALID_ARGUMEMT error.
-     * 
- * - * bool force = 3; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is `FALSE` or unset and the destination table already exists, the export
-     * call returns an INVALID_ARGUMEMT error.
-     * 
- * - * bool force = 3; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.PartitionSpec partitionSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.PartitionSpec, com.google.cloud.asset.v1.PartitionSpec.Builder, com.google.cloud.asset.v1.PartitionSpecOrBuilder> partitionSpecBuilder_; - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - * @return Whether the partitionSpec field is set. - */ - public boolean hasPartitionSpec() { - return partitionSpecBuilder_ != null || partitionSpec_ != null; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - * @return The partitionSpec. - */ - public com.google.cloud.asset.v1.PartitionSpec getPartitionSpec() { - if (partitionSpecBuilder_ == null) { - return partitionSpec_ == null ? com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance() : partitionSpec_; - } else { - return partitionSpecBuilder_.getMessage(); - } - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - public Builder setPartitionSpec(com.google.cloud.asset.v1.PartitionSpec value) { - if (partitionSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - partitionSpec_ = value; - onChanged(); - } else { - partitionSpecBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - public Builder setPartitionSpec( - com.google.cloud.asset.v1.PartitionSpec.Builder builderForValue) { - if (partitionSpecBuilder_ == null) { - partitionSpec_ = builderForValue.build(); - onChanged(); - } else { - partitionSpecBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - public Builder mergePartitionSpec(com.google.cloud.asset.v1.PartitionSpec value) { - if (partitionSpecBuilder_ == null) { - if (partitionSpec_ != null) { - partitionSpec_ = - com.google.cloud.asset.v1.PartitionSpec.newBuilder(partitionSpec_).mergeFrom(value).buildPartial(); - } else { - partitionSpec_ = value; - } - onChanged(); - } else { - partitionSpecBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - public Builder clearPartitionSpec() { - if (partitionSpecBuilder_ == null) { - partitionSpec_ = null; - onChanged(); - } else { - partitionSpec_ = null; - partitionSpecBuilder_ = null; - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - public com.google.cloud.asset.v1.PartitionSpec.Builder getPartitionSpecBuilder() { - - onChanged(); - return getPartitionSpecFieldBuilder().getBuilder(); - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - public com.google.cloud.asset.v1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { - if (partitionSpecBuilder_ != null) { - return partitionSpecBuilder_.getMessageOrBuilder(); - } else { - return partitionSpec_ == null ? - com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance() : partitionSpec_; - } - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.PartitionSpec, com.google.cloud.asset.v1.PartitionSpec.Builder, com.google.cloud.asset.v1.PartitionSpecOrBuilder> - getPartitionSpecFieldBuilder() { - if (partitionSpecBuilder_ == null) { - partitionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.PartitionSpec, com.google.cloud.asset.v1.PartitionSpec.Builder, com.google.cloud.asset.v1.PartitionSpecOrBuilder>( - getPartitionSpec(), - getParentForChildren(), - isClean()); - partitionSpec_ = null; - } - return partitionSpecBuilder_; - } - - private boolean separateTablesPerAssetType_ ; - /** - *
-     * If this flag is `TRUE`, the snapshot results will be written to one or
-     * multiple tables, each of which contains results of one asset type. The
-     * [force] and [partition_spec] fields will apply to each of them.
-     * Field [table] will be concatenated with "_" and the asset type names (see
-     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-     * supported asset types) to construct per-asset-type table names, in which
-     * all non-alphanumeric characters like "." and "/" will be substituted by
-     * "_". Example: if field [table] is "mytable" and snapshot results
-     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-     * tables does not exist, a new table with the concatenated name will be
-     * created.
-     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-     * each table will include RECORD-type columns mapped to the nested fields in
-     * the Asset.resource.data field of that asset type (up to the 15 nested level
-     * BigQuery supports
-     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-     * fields in >15 nested levels will be stored in JSON format string as a child
-     * column of its parent RECORD column.
-     * If error occurs when exporting to any table, the whole export call will
-     * return an error but the export results that already succeed will persist.
-     * Example: if exporting to table_type_A succeeds when exporting to
-     * table_type_B fails during one export call, the results in table_type_A will
-     * persist and there will not be partial results persisting in a table.
-     * 
- * - * bool separate_tables_per_asset_type = 5; - * @return The separateTablesPerAssetType. - */ - @java.lang.Override - public boolean getSeparateTablesPerAssetType() { - return separateTablesPerAssetType_; - } - /** - *
-     * If this flag is `TRUE`, the snapshot results will be written to one or
-     * multiple tables, each of which contains results of one asset type. The
-     * [force] and [partition_spec] fields will apply to each of them.
-     * Field [table] will be concatenated with "_" and the asset type names (see
-     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-     * supported asset types) to construct per-asset-type table names, in which
-     * all non-alphanumeric characters like "." and "/" will be substituted by
-     * "_". Example: if field [table] is "mytable" and snapshot results
-     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-     * tables does not exist, a new table with the concatenated name will be
-     * created.
-     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-     * each table will include RECORD-type columns mapped to the nested fields in
-     * the Asset.resource.data field of that asset type (up to the 15 nested level
-     * BigQuery supports
-     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-     * fields in >15 nested levels will be stored in JSON format string as a child
-     * column of its parent RECORD column.
-     * If error occurs when exporting to any table, the whole export call will
-     * return an error but the export results that already succeed will persist.
-     * Example: if exporting to table_type_A succeeds when exporting to
-     * table_type_B fails during one export call, the results in table_type_A will
-     * persist and there will not be partial results persisting in a table.
-     * 
- * - * bool separate_tables_per_asset_type = 5; - * @param value The separateTablesPerAssetType to set. - * @return This builder for chaining. - */ - public Builder setSeparateTablesPerAssetType(boolean value) { - - separateTablesPerAssetType_ = value; - onChanged(); - return this; - } - /** - *
-     * If this flag is `TRUE`, the snapshot results will be written to one or
-     * multiple tables, each of which contains results of one asset type. The
-     * [force] and [partition_spec] fields will apply to each of them.
-     * Field [table] will be concatenated with "_" and the asset type names (see
-     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-     * supported asset types) to construct per-asset-type table names, in which
-     * all non-alphanumeric characters like "." and "/" will be substituted by
-     * "_". Example: if field [table] is "mytable" and snapshot results
-     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-     * tables does not exist, a new table with the concatenated name will be
-     * created.
-     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-     * each table will include RECORD-type columns mapped to the nested fields in
-     * the Asset.resource.data field of that asset type (up to the 15 nested level
-     * BigQuery supports
-     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-     * fields in >15 nested levels will be stored in JSON format string as a child
-     * column of its parent RECORD column.
-     * If error occurs when exporting to any table, the whole export call will
-     * return an error but the export results that already succeed will persist.
-     * Example: if exporting to table_type_A succeeds when exporting to
-     * table_type_B fails during one export call, the results in table_type_A will
-     * persist and there will not be partial results persisting in a table.
-     * 
- * - * bool separate_tables_per_asset_type = 5; - * @return This builder for chaining. - */ - public Builder clearSeparateTablesPerAssetType() { - - separateTablesPerAssetType_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.BigQueryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.BigQueryDestination) - private static final com.google.cloud.asset.v1.BigQueryDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.BigQueryDestination(); - } - - public static com.google.cloud.asset.v1.BigQueryDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java deleted file mode 100644 index 2b70f211fc51..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java +++ /dev/null @@ -1,182 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface BigQueryDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.BigQueryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-   * determines the
-   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-   * influences the schema.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - java.lang.String getDataset(); - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets`
-   * determines the
-   * [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema)
-   * of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also
-   * influences the schema.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - com.google.protobuf.ByteString - getDatasetBytes(); - - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - java.lang.String getTable(); - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - com.google.protobuf.ByteString - getTableBytes(); - - /** - *
-   * If the destination table already exists and this flag is `TRUE`, the
-   * table will be overwritten by the contents of assets snapshot. If the flag
-   * is `FALSE` or unset and the destination table already exists, the export
-   * call returns an INVALID_ARGUMEMT error.
-   * 
- * - * bool force = 3; - * @return The force. - */ - boolean getForce(); - - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - * @return Whether the partitionSpec field is set. - */ - boolean hasPartitionSpec(); - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - * @return The partitionSpec. - */ - com.google.cloud.asset.v1.PartitionSpec getPartitionSpec(); - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec partition_spec = 4; - */ - com.google.cloud.asset.v1.PartitionSpecOrBuilder getPartitionSpecOrBuilder(); - - /** - *
-   * If this flag is `TRUE`, the snapshot results will be written to one or
-   * multiple tables, each of which contains results of one asset type. The
-   * [force] and [partition_spec] fields will apply to each of them.
-   * Field [table] will be concatenated with "_" and the asset type names (see
-   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-   * supported asset types) to construct per-asset-type table names, in which
-   * all non-alphanumeric characters like "." and "/" will be substituted by
-   * "_". Example: if field [table] is "mytable" and snapshot results
-   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-   * tables does not exist, a new table with the concatenated name will be
-   * created.
-   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-   * each table will include RECORD-type columns mapped to the nested fields in
-   * the Asset.resource.data field of that asset type (up to the 15 nested level
-   * BigQuery supports
-   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-   * fields in >15 nested levels will be stored in JSON format string as a child
-   * column of its parent RECORD column.
-   * If error occurs when exporting to any table, the whole export call will
-   * return an error but the export results that already succeed will persist.
-   * Example: if exporting to table_type_A succeeds when exporting to
-   * table_type_B fails during one export call, the results in table_type_A will
-   * persist and there will not be partial results persisting in a table.
-   * 
- * - * bool separate_tables_per_asset_type = 5; - * @return The separateTablesPerAssetType. - */ - boolean getSeparateTablesPerAssetType(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java deleted file mode 100644 index c3895147a7ef..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java +++ /dev/null @@ -1,719 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * The Condition evaluation.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ConditionEvaluation} - */ -public final class ConditionEvaluation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ConditionEvaluation) - ConditionEvaluationOrBuilder { -private static final long serialVersionUID = 0L; - // Use ConditionEvaluation.newBuilder() to construct. - private ConditionEvaluation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConditionEvaluation() { - evaluationValue_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConditionEvaluation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ConditionEvaluation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - evaluationValue_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ConditionEvaluation.class, com.google.cloud.asset.v1.ConditionEvaluation.Builder.class); - } - - /** - *
-   * Value of this expression.
-   * 
- * - * Protobuf enum {@code google.cloud.asset.v1.ConditionEvaluation.EvaluationValue} - */ - public enum EvaluationValue - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Reserved for future use.
-     * 
- * - * EVALUATION_VALUE_UNSPECIFIED = 0; - */ - EVALUATION_VALUE_UNSPECIFIED(0), - /** - *
-     * The evaluation result is `true`.
-     * 
- * - * TRUE = 1; - */ - TRUE(1), - /** - *
-     * The evaluation result is `false`.
-     * 
- * - * FALSE = 2; - */ - FALSE(2), - /** - *
-     * The evaluation result is `conditional` when the condition expression
-     * contains variables that are either missing input values or have not been
-     * supported by Analyzer yet.
-     * 
- * - * CONDITIONAL = 3; - */ - CONDITIONAL(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Reserved for future use.
-     * 
- * - * EVALUATION_VALUE_UNSPECIFIED = 0; - */ - public static final int EVALUATION_VALUE_UNSPECIFIED_VALUE = 0; - /** - *
-     * The evaluation result is `true`.
-     * 
- * - * TRUE = 1; - */ - public static final int TRUE_VALUE = 1; - /** - *
-     * The evaluation result is `false`.
-     * 
- * - * FALSE = 2; - */ - public static final int FALSE_VALUE = 2; - /** - *
-     * The evaluation result is `conditional` when the condition expression
-     * contains variables that are either missing input values or have not been
-     * supported by Analyzer yet.
-     * 
- * - * CONDITIONAL = 3; - */ - public static final int CONDITIONAL_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static EvaluationValue valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static EvaluationValue forNumber(int value) { - switch (value) { - case 0: return EVALUATION_VALUE_UNSPECIFIED; - case 1: return TRUE; - case 2: return FALSE; - case 3: return CONDITIONAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - EvaluationValue> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public EvaluationValue findValueByNumber(int number) { - return EvaluationValue.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1.ConditionEvaluation.getDescriptor().getEnumTypes().get(0); - } - - private static final EvaluationValue[] VALUES = values(); - - public static EvaluationValue valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private EvaluationValue(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.ConditionEvaluation.EvaluationValue) - } - - public static final int EVALUATION_VALUE_FIELD_NUMBER = 1; - private int evaluationValue_; - /** - *
-   * The evaluation result.
-   * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @return The enum numeric value on the wire for evaluationValue. - */ - @java.lang.Override public int getEvaluationValueValue() { - return evaluationValue_; - } - /** - *
-   * The evaluation result.
-   * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @return The evaluationValue. - */ - @java.lang.Override public com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue result = com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.valueOf(evaluationValue_); - return result == null ? com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (evaluationValue_ != com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.EVALUATION_VALUE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, evaluationValue_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (evaluationValue_ != com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.EVALUATION_VALUE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, evaluationValue_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ConditionEvaluation)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ConditionEvaluation other = (com.google.cloud.asset.v1.ConditionEvaluation) obj; - - if (evaluationValue_ != other.evaluationValue_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EVALUATION_VALUE_FIELD_NUMBER; - hash = (53 * hash) + evaluationValue_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ConditionEvaluation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The Condition evaluation.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ConditionEvaluation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ConditionEvaluation) - com.google.cloud.asset.v1.ConditionEvaluationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ConditionEvaluation.class, com.google.cloud.asset.v1.ConditionEvaluation.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ConditionEvaluation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - evaluationValue_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ConditionEvaluation build() { - com.google.cloud.asset.v1.ConditionEvaluation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ConditionEvaluation buildPartial() { - com.google.cloud.asset.v1.ConditionEvaluation result = new com.google.cloud.asset.v1.ConditionEvaluation(this); - result.evaluationValue_ = evaluationValue_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ConditionEvaluation) { - return mergeFrom((com.google.cloud.asset.v1.ConditionEvaluation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ConditionEvaluation other) { - if (other == com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance()) return this; - if (other.evaluationValue_ != 0) { - setEvaluationValueValue(other.getEvaluationValueValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ConditionEvaluation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ConditionEvaluation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int evaluationValue_ = 0; - /** - *
-     * The evaluation result.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @return The enum numeric value on the wire for evaluationValue. - */ - @java.lang.Override public int getEvaluationValueValue() { - return evaluationValue_; - } - /** - *
-     * The evaluation result.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @param value The enum numeric value on the wire for evaluationValue to set. - * @return This builder for chaining. - */ - public Builder setEvaluationValueValue(int value) { - - evaluationValue_ = value; - onChanged(); - return this; - } - /** - *
-     * The evaluation result.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @return The evaluationValue. - */ - @java.lang.Override - public com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue result = com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.valueOf(evaluationValue_); - return result == null ? com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.UNRECOGNIZED : result; - } - /** - *
-     * The evaluation result.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @param value The evaluationValue to set. - * @return This builder for chaining. - */ - public Builder setEvaluationValue(com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue value) { - if (value == null) { - throw new NullPointerException(); - } - - evaluationValue_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The evaluation result.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @return This builder for chaining. - */ - public Builder clearEvaluationValue() { - - evaluationValue_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ConditionEvaluation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ConditionEvaluation) - private static final com.google.cloud.asset.v1.ConditionEvaluation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ConditionEvaluation(); - } - - public static com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConditionEvaluation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConditionEvaluation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java deleted file mode 100644 index 999084a21084..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface ConditionEvaluationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ConditionEvaluation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The evaluation result.
-   * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @return The enum numeric value on the wire for evaluationValue. - */ - int getEvaluationValueValue(); - /** - *
-   * The evaluation result.
-   * 
- * - * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; - * @return The evaluationValue. - */ - com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java deleted file mode 100644 index 9838b22f41bb..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java +++ /dev/null @@ -1,218 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Asset content type.
- * 
- * - * Protobuf enum {@code google.cloud.asset.v1.ContentType} - */ -public enum ContentType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - CONTENT_TYPE_UNSPECIFIED(0), - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - RESOURCE(1), - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - IAM_POLICY(2), - /** - *
-   * The Cloud Organization Policy set on an asset.
-   * 
- * - * ORG_POLICY = 4; - */ - ORG_POLICY(4), - /** - *
-   * The Cloud Access context manager Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - ACCESS_POLICY(5), - /** - *
-   * The runtime OS Inventory information.
-   * 
- * - * OS_INVENTORY = 6; - */ - OS_INVENTORY(6), - /** - *
-   * The related resources.
-   * 
- * - * RELATIONSHIP = 7; - */ - RELATIONSHIP(7), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - public static final int RESOURCE_VALUE = 1; - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - public static final int IAM_POLICY_VALUE = 2; - /** - *
-   * The Cloud Organization Policy set on an asset.
-   * 
- * - * ORG_POLICY = 4; - */ - public static final int ORG_POLICY_VALUE = 4; - /** - *
-   * The Cloud Access context manager Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - public static final int ACCESS_POLICY_VALUE = 5; - /** - *
-   * The runtime OS Inventory information.
-   * 
- * - * OS_INVENTORY = 6; - */ - public static final int OS_INVENTORY_VALUE = 6; - /** - *
-   * The related resources.
-   * 
- * - * RELATIONSHIP = 7; - */ - public static final int RELATIONSHIP_VALUE = 7; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContentType forNumber(int value) { - switch (value) { - case 0: return CONTENT_TYPE_UNSPECIFIED; - case 1: return RESOURCE; - case 2: return IAM_POLICY; - case 4: return ORG_POLICY; - case 5: return ACCESS_POLICY; - case 6: return OS_INVENTORY; - case 7: return RELATIONSHIP; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ContentType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContentType findValueByNumber(int number) { - return ContentType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); - } - - private static final ContentType[] VALUES = values(); - - public static ContentType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContentType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.ContentType) -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java deleted file mode 100644 index 25f55d41b88b..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java +++ /dev/null @@ -1,1068 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Create asset feed request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.CreateFeedRequest} - */ -public final class CreateFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.CreateFeedRequest) - CreateFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateFeedRequest.newBuilder() to construct. - private CreateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateFeedRequest() { - parent_ = ""; - feedId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - feedId_ = s; - break; - } - case 26: { - com.google.cloud.asset.v1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.CreateFeedRequest.class, com.google.cloud.asset.v1.CreateFeedRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEED_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object feedId_; - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedId. - */ - @java.lang.Override - public java.lang.String getFeedId() { - java.lang.Object ref = feedId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - feedId_ = s; - return s; - } - } - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for feedId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFeedIdBytes() { - java.lang.Object ref = feedId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - feedId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEED_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1.Feed feed_; - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be
-   * generated in the format of: projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - @java.lang.Override - public boolean hasFeed() { - return feed_ != null; - } - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be
-   * generated in the format of: projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - @java.lang.Override - public com.google.cloud.asset.v1.Feed getFeed() { - return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; - } - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be
-   * generated in the format of: projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { - return getFeed(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, feedId_); - } - if (feed_ != null) { - output.writeMessage(3, getFeed()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, feedId_); - } - if (feed_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getFeed()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.CreateFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.CreateFeedRequest other = (com.google.cloud.asset.v1.CreateFeedRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFeedId() - .equals(other.getFeedId())) return false; - if (hasFeed() != other.hasFeed()) return false; - if (hasFeed()) { - if (!getFeed() - .equals(other.getFeed())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FEED_ID_FIELD_NUMBER; - hash = (53 * hash) + getFeedId().hashCode(); - if (hasFeed()) { - hash = (37 * hash) + FEED_FIELD_NUMBER; - hash = (53 * hash) + getFeed().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.CreateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.CreateFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Create asset feed request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.CreateFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.CreateFeedRequest) - com.google.cloud.asset.v1.CreateFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.CreateFeedRequest.class, com.google.cloud.asset.v1.CreateFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.CreateFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - feedId_ = ""; - - if (feedBuilder_ == null) { - feed_ = null; - } else { - feed_ = null; - feedBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.CreateFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateFeedRequest build() { - com.google.cloud.asset.v1.CreateFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateFeedRequest buildPartial() { - com.google.cloud.asset.v1.CreateFeedRequest result = new com.google.cloud.asset.v1.CreateFeedRequest(this); - result.parent_ = parent_; - result.feedId_ = feedId_; - if (feedBuilder_ == null) { - result.feed_ = feed_; - } else { - result.feed_ = feedBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.CreateFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1.CreateFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.CreateFeedRequest other) { - if (other == com.google.cloud.asset.v1.CreateFeedRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFeedId().isEmpty()) { - feedId_ = other.feedId_; - onChanged(); - } - if (other.hasFeed()) { - mergeFeed(other.getFeed()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.CreateFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.CreateFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object feedId_ = ""; - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedId. - */ - public java.lang.String getFeedId() { - java.lang.Object ref = feedId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - feedId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for feedId. - */ - public com.google.protobuf.ByteString - getFeedIdBytes() { - java.lang.Object ref = feedId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - feedId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The feedId to set. - * @return This builder for chaining. - */ - public Builder setFeedId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - feedId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearFeedId() { - - feedId_ = getDefaultInstance().getFeedId(); - onChanged(); - return this; - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for feedId to set. - * @return This builder for chaining. - */ - public Builder setFeedIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - feedId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.Feed feed_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> feedBuilder_; - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - public boolean hasFeed() { - return feedBuilder_ != null || feed_ != null; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - public com.google.cloud.asset.v1.Feed getFeed() { - if (feedBuilder_ == null) { - return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; - } else { - return feedBuilder_.getMessage(); - } - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed(com.google.cloud.asset.v1.Feed value) { - if (feedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - feed_ = value; - onChanged(); - } else { - feedBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed( - com.google.cloud.asset.v1.Feed.Builder builderForValue) { - if (feedBuilder_ == null) { - feed_ = builderForValue.build(); - onChanged(); - } else { - feedBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeFeed(com.google.cloud.asset.v1.Feed value) { - if (feedBuilder_ == null) { - if (feed_ != null) { - feed_ = - com.google.cloud.asset.v1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); - } else { - feed_ = value; - } - onChanged(); - } else { - feedBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFeed() { - if (feedBuilder_ == null) { - feed_ = null; - onChanged(); - } else { - feed_ = null; - feedBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.Feed.Builder getFeedBuilder() { - - onChanged(); - return getFeedFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { - if (feedBuilder_ != null) { - return feedBuilder_.getMessageOrBuilder(); - } else { - return feed_ == null ? - com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; - } - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be
-     * generated in the format of: projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> - getFeedFieldBuilder() { - if (feedBuilder_ == null) { - feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder>( - getFeed(), - getParentForChildren(), - isClean()); - feed_ = null; - } - return feedBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.CreateFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.CreateFeedRequest) - private static final com.google.cloud.asset.v1.CreateFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.CreateFeedRequest(); - } - - public static com.google.cloud.asset.v1.CreateFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java deleted file mode 100644 index 23948980df5c..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface CreateFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.CreateFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedId. - */ - java.lang.String getFeedId(); - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for feedId. - */ - com.google.protobuf.ByteString - getFeedIdBytes(); - - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be
-   * generated in the format of: projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - boolean hasFeed(); - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be
-   * generated in the format of: projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - com.google.cloud.asset.v1.Feed getFeed(); - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be
-   * generated in the format of: projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java deleted file mode 100644 index ccbd50c72321..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequest.java +++ /dev/null @@ -1,1079 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Request to create a saved query.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.CreateSavedQueryRequest} - */ -public final class CreateSavedQueryRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.CreateSavedQueryRequest) - CreateSavedQueryRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSavedQueryRequest.newBuilder() to construct. - private CreateSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSavedQueryRequest() { - parent_ = ""; - savedQueryId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSavedQueryRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateSavedQueryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.cloud.asset.v1.SavedQuery.Builder subBuilder = null; - if (savedQuery_ != null) { - subBuilder = savedQuery_.toBuilder(); - } - savedQuery_ = input.readMessage(com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(savedQuery_); - savedQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - savedQueryId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.CreateSavedQueryRequest.class, com.google.cloud.asset.v1.CreateSavedQueryRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The name of the project/folder/organization where this
-   * saved_query should be created in. It can only be an organization number
-   * (such as "organizations/123"), a folder number (such as "folders/123"), a
-   * project ID (such as "projects/my-project-id")", or a project number (such
-   * as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The name of the project/folder/organization where this
-   * saved_query should be created in. It can only be an organization number
-   * (such as "organizations/123"), a folder number (such as "folders/123"), a
-   * project ID (such as "projects/my-project-id")", or a project number (such
-   * as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SAVED_QUERY_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.SavedQuery savedQuery_; - /** - *
-   * Required. The saved_query details. The `name` field must be empty as it
-   * will be generated based on the parent and saved_query_id.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the savedQuery field is set. - */ - @java.lang.Override - public boolean hasSavedQuery() { - return savedQuery_ != null; - } - /** - *
-   * Required. The saved_query details. The `name` field must be empty as it
-   * will be generated based on the parent and saved_query_id.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQuery. - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { - return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; - } - /** - *
-   * Required. The saved_query details. The `name` field must be empty as it
-   * will be generated based on the parent and saved_query_id.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { - return getSavedQuery(); - } - - public static final int SAVED_QUERY_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object savedQueryId_; - /** - *
-   * Required. The ID to use for the saved query, which must be unique in the
-   * specified parent. It will become the final component of the saved query's
-   * resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Notice that this field is required in the saved query creation, and the
-   * `name` field of the `saved_query` will be ignored.
-   * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQueryId. - */ - @java.lang.Override - public java.lang.String getSavedQueryId() { - java.lang.Object ref = savedQueryId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - savedQueryId_ = s; - return s; - } - } - /** - *
-   * Required. The ID to use for the saved query, which must be unique in the
-   * specified parent. It will become the final component of the saved query's
-   * resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Notice that this field is required in the saved query creation, and the
-   * `name` field of the `saved_query` will be ignored.
-   * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for savedQueryId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSavedQueryIdBytes() { - java.lang.Object ref = savedQueryId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - savedQueryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (savedQuery_ != null) { - output.writeMessage(2, getSavedQuery()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedQueryId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, savedQueryId_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (savedQuery_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSavedQuery()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(savedQueryId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, savedQueryId_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.CreateSavedQueryRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.CreateSavedQueryRequest other = (com.google.cloud.asset.v1.CreateSavedQueryRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasSavedQuery() != other.hasSavedQuery()) return false; - if (hasSavedQuery()) { - if (!getSavedQuery() - .equals(other.getSavedQuery())) return false; - } - if (!getSavedQueryId() - .equals(other.getSavedQueryId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasSavedQuery()) { - hash = (37 * hash) + SAVED_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getSavedQuery().hashCode(); - } - hash = (37 * hash) + SAVED_QUERY_ID_FIELD_NUMBER; - hash = (53 * hash) + getSavedQueryId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.CreateSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.CreateSavedQueryRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to create a saved query.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.CreateSavedQueryRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.CreateSavedQueryRequest) - com.google.cloud.asset.v1.CreateSavedQueryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.CreateSavedQueryRequest.class, com.google.cloud.asset.v1.CreateSavedQueryRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.CreateSavedQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (savedQueryBuilder_ == null) { - savedQuery_ = null; - } else { - savedQuery_ = null; - savedQueryBuilder_ = null; - } - savedQueryId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_CreateSavedQueryRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateSavedQueryRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.CreateSavedQueryRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateSavedQueryRequest build() { - com.google.cloud.asset.v1.CreateSavedQueryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateSavedQueryRequest buildPartial() { - com.google.cloud.asset.v1.CreateSavedQueryRequest result = new com.google.cloud.asset.v1.CreateSavedQueryRequest(this); - result.parent_ = parent_; - if (savedQueryBuilder_ == null) { - result.savedQuery_ = savedQuery_; - } else { - result.savedQuery_ = savedQueryBuilder_.build(); - } - result.savedQueryId_ = savedQueryId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.CreateSavedQueryRequest) { - return mergeFrom((com.google.cloud.asset.v1.CreateSavedQueryRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.CreateSavedQueryRequest other) { - if (other == com.google.cloud.asset.v1.CreateSavedQueryRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasSavedQuery()) { - mergeSavedQuery(other.getSavedQuery()); - } - if (!other.getSavedQueryId().isEmpty()) { - savedQueryId_ = other.savedQueryId_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.CreateSavedQueryRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.CreateSavedQueryRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The name of the project/folder/organization where this
-     * saved_query should be created in. It can only be an organization number
-     * (such as "organizations/123"), a folder number (such as "folders/123"), a
-     * project ID (such as "projects/my-project-id")", or a project number (such
-     * as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the project/folder/organization where this
-     * saved_query should be created in. It can only be an organization number
-     * (such as "organizations/123"), a folder number (such as "folders/123"), a
-     * project ID (such as "projects/my-project-id")", or a project number (such
-     * as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the project/folder/organization where this
-     * saved_query should be created in. It can only be an organization number
-     * (such as "organizations/123"), a folder number (such as "folders/123"), a
-     * project ID (such as "projects/my-project-id")", or a project number (such
-     * as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the project/folder/organization where this
-     * saved_query should be created in. It can only be an organization number
-     * (such as "organizations/123"), a folder number (such as "folders/123"), a
-     * project ID (such as "projects/my-project-id")", or a project number (such
-     * as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the project/folder/organization where this
-     * saved_query should be created in. It can only be an organization number
-     * (such as "organizations/123"), a folder number (such as "folders/123"), a
-     * project ID (such as "projects/my-project-id")", or a project number (such
-     * as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.SavedQuery savedQuery_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> savedQueryBuilder_; - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the savedQuery field is set. - */ - public boolean hasSavedQuery() { - return savedQueryBuilder_ != null || savedQuery_ != null; - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQuery. - */ - public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { - if (savedQueryBuilder_ == null) { - return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; - } else { - return savedQueryBuilder_.getMessage(); - } - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { - if (savedQueryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - savedQuery_ = value; - onChanged(); - } else { - savedQueryBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setSavedQuery( - com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { - if (savedQueryBuilder_ == null) { - savedQuery_ = builderForValue.build(); - onChanged(); - } else { - savedQueryBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { - if (savedQueryBuilder_ == null) { - if (savedQuery_ != null) { - savedQuery_ = - com.google.cloud.asset.v1.SavedQuery.newBuilder(savedQuery_).mergeFrom(value).buildPartial(); - } else { - savedQuery_ = value; - } - onChanged(); - } else { - savedQueryBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearSavedQuery() { - if (savedQueryBuilder_ == null) { - savedQuery_ = null; - onChanged(); - } else { - savedQuery_ = null; - savedQueryBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.SavedQuery.Builder getSavedQueryBuilder() { - - onChanged(); - return getSavedQueryFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { - if (savedQueryBuilder_ != null) { - return savedQueryBuilder_.getMessageOrBuilder(); - } else { - return savedQuery_ == null ? - com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; - } - } - /** - *
-     * Required. The saved_query details. The `name` field must be empty as it
-     * will be generated based on the parent and saved_query_id.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> - getSavedQueryFieldBuilder() { - if (savedQueryBuilder_ == null) { - savedQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder>( - getSavedQuery(), - getParentForChildren(), - isClean()); - savedQuery_ = null; - } - return savedQueryBuilder_; - } - - private java.lang.Object savedQueryId_ = ""; - /** - *
-     * Required. The ID to use for the saved query, which must be unique in the
-     * specified parent. It will become the final component of the saved query's
-     * resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Notice that this field is required in the saved query creation, and the
-     * `name` field of the `saved_query` will be ignored.
-     * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQueryId. - */ - public java.lang.String getSavedQueryId() { - java.lang.Object ref = savedQueryId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - savedQueryId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The ID to use for the saved query, which must be unique in the
-     * specified parent. It will become the final component of the saved query's
-     * resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Notice that this field is required in the saved query creation, and the
-     * `name` field of the `saved_query` will be ignored.
-     * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for savedQueryId. - */ - public com.google.protobuf.ByteString - getSavedQueryIdBytes() { - java.lang.Object ref = savedQueryId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - savedQueryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The ID to use for the saved query, which must be unique in the
-     * specified parent. It will become the final component of the saved query's
-     * resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Notice that this field is required in the saved query creation, and the
-     * `name` field of the `saved_query` will be ignored.
-     * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The savedQueryId to set. - * @return This builder for chaining. - */ - public Builder setSavedQueryId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - savedQueryId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the saved query, which must be unique in the
-     * specified parent. It will become the final component of the saved query's
-     * resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Notice that this field is required in the saved query creation, and the
-     * `name` field of the `saved_query` will be ignored.
-     * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearSavedQueryId() { - - savedQueryId_ = getDefaultInstance().getSavedQueryId(); - onChanged(); - return this; - } - /** - *
-     * Required. The ID to use for the saved query, which must be unique in the
-     * specified parent. It will become the final component of the saved query's
-     * resource name.
-     * This value should be 4-63 characters, and valid characters
-     * are /[a-z][0-9]-/.
-     * Notice that this field is required in the saved query creation, and the
-     * `name` field of the `saved_query` will be ignored.
-     * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for savedQueryId to set. - * @return This builder for chaining. - */ - public Builder setSavedQueryIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - savedQueryId_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.CreateSavedQueryRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.CreateSavedQueryRequest) - private static final com.google.cloud.asset.v1.CreateSavedQueryRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.CreateSavedQueryRequest(); - } - - public static com.google.cloud.asset.v1.CreateSavedQueryRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSavedQueryRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateSavedQueryRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.CreateSavedQueryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java deleted file mode 100644 index 4bba625d5991..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateSavedQueryRequestOrBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface CreateSavedQueryRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.CreateSavedQueryRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the project/folder/organization where this
-   * saved_query should be created in. It can only be an organization number
-   * (such as "organizations/123"), a folder number (such as "folders/123"), a
-   * project ID (such as "projects/my-project-id")", or a project number (such
-   * as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The name of the project/folder/organization where this
-   * saved_query should be created in. It can only be an organization number
-   * (such as "organizations/123"), a folder number (such as "folders/123"), a
-   * project ID (such as "projects/my-project-id")", or a project number (such
-   * as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. The saved_query details. The `name` field must be empty as it
-   * will be generated based on the parent and saved_query_id.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the savedQuery field is set. - */ - boolean hasSavedQuery(); - /** - *
-   * Required. The saved_query details. The `name` field must be empty as it
-   * will be generated based on the parent and saved_query_id.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQuery. - */ - com.google.cloud.asset.v1.SavedQuery getSavedQuery(); - /** - *
-   * Required. The saved_query details. The `name` field must be empty as it
-   * will be generated based on the parent and saved_query_id.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder(); - - /** - *
-   * Required. The ID to use for the saved query, which must be unique in the
-   * specified parent. It will become the final component of the saved query's
-   * resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Notice that this field is required in the saved query creation, and the
-   * `name` field of the `saved_query` will be ignored.
-   * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQueryId. - */ - java.lang.String getSavedQueryId(); - /** - *
-   * Required. The ID to use for the saved query, which must be unique in the
-   * specified parent. It will become the final component of the saved query's
-   * resource name.
-   * This value should be 4-63 characters, and valid characters
-   * are /[a-z][0-9]-/.
-   * Notice that this field is required in the saved query creation, and the
-   * `name` field of the `saved_query` will be ignored.
-   * 
- * - * string saved_query_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for savedQueryId. - */ - com.google.protobuf.ByteString - getSavedQueryIdBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java deleted file mode 100644 index 952a6e51c3ad..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequest.java +++ /dev/null @@ -1,608 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - * Protobuf type {@code google.cloud.asset.v1.DeleteFeedRequest} - */ -public final class DeleteFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.DeleteFeedRequest) - DeleteFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteFeedRequest.newBuilder() to construct. - private DeleteFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteFeedRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.DeleteFeedRequest.class, com.google.cloud.asset.v1.DeleteFeedRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.DeleteFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.DeleteFeedRequest other = (com.google.cloud.asset.v1.DeleteFeedRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.DeleteFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.DeleteFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code google.cloud.asset.v1.DeleteFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.DeleteFeedRequest) - com.google.cloud.asset.v1.DeleteFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.DeleteFeedRequest.class, com.google.cloud.asset.v1.DeleteFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.DeleteFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.DeleteFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteFeedRequest build() { - com.google.cloud.asset.v1.DeleteFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteFeedRequest buildPartial() { - com.google.cloud.asset.v1.DeleteFeedRequest result = new com.google.cloud.asset.v1.DeleteFeedRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.DeleteFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1.DeleteFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.DeleteFeedRequest other) { - if (other == com.google.cloud.asset.v1.DeleteFeedRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.DeleteFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.DeleteFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.DeleteFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.DeleteFeedRequest) - private static final com.google.cloud.asset.v1.DeleteFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.DeleteFeedRequest(); - } - - public static com.google.cloud.asset.v1.DeleteFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java deleted file mode 100644 index cf666128a512..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteFeedRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface DeleteFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.DeleteFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java deleted file mode 100644 index a294340bebad..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequest.java +++ /dev/null @@ -1,623 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Request to delete a saved query.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.DeleteSavedQueryRequest} - */ -public final class DeleteSavedQueryRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.DeleteSavedQueryRequest) - DeleteSavedQueryRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteSavedQueryRequest.newBuilder() to construct. - private DeleteSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteSavedQueryRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteSavedQueryRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteSavedQueryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.DeleteSavedQueryRequest.class, com.google.cloud.asset.v1.DeleteSavedQueryRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the saved query to delete. It must be in the format
-   * of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the saved query to delete. It must be in the format
-   * of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.DeleteSavedQueryRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.DeleteSavedQueryRequest other = (com.google.cloud.asset.v1.DeleteSavedQueryRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.DeleteSavedQueryRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to delete a saved query.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.DeleteSavedQueryRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.DeleteSavedQueryRequest) - com.google.cloud.asset.v1.DeleteSavedQueryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.DeleteSavedQueryRequest.class, com.google.cloud.asset.v1.DeleteSavedQueryRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.DeleteSavedQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_DeleteSavedQueryRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteSavedQueryRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.DeleteSavedQueryRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteSavedQueryRequest build() { - com.google.cloud.asset.v1.DeleteSavedQueryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteSavedQueryRequest buildPartial() { - com.google.cloud.asset.v1.DeleteSavedQueryRequest result = new com.google.cloud.asset.v1.DeleteSavedQueryRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.DeleteSavedQueryRequest) { - return mergeFrom((com.google.cloud.asset.v1.DeleteSavedQueryRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.DeleteSavedQueryRequest other) { - if (other == com.google.cloud.asset.v1.DeleteSavedQueryRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.DeleteSavedQueryRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.DeleteSavedQueryRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the saved query to delete. It must be in the format
-     * of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the saved query to delete. It must be in the format
-     * of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the saved query to delete. It must be in the format
-     * of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the saved query to delete. It must be in the format
-     * of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the saved query to delete. It must be in the format
-     * of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.DeleteSavedQueryRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.DeleteSavedQueryRequest) - private static final com.google.cloud.asset.v1.DeleteSavedQueryRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.DeleteSavedQueryRequest(); - } - - public static com.google.cloud.asset.v1.DeleteSavedQueryRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSavedQueryRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSavedQueryRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.DeleteSavedQueryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java deleted file mode 100644 index 80e6bbfad869..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/DeleteSavedQueryRequestOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface DeleteSavedQueryRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.DeleteSavedQueryRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the saved query to delete. It must be in the format
-   * of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the saved query to delete. It must be in the format
-   * of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java deleted file mode 100644 index b17dc8289139..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java +++ /dev/null @@ -1,2121 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Export asset request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ExportAssetsRequest} - */ -public final class ExportAssetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ExportAssetsRequest) - ExportAssetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExportAssetsRequest.newBuilder() to construct. - private ExportAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExportAssetsRequest() { - parent_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExportAssetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExportAssetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: { - com.google.cloud.asset.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.asset.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ExportAssetsRequest.class, com.google.cloud.asset.v1.ExportAssetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 4; - private int contentType_; - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1.OutputConfig outputConfig_; - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList relationshipTypes_; - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_; - } - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (readTime_ != null) { - output.writeMessage(2, getReadTime()); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, contentType_); - } - if (outputConfig_ != null) { - output.writeMessage(5, getOutputConfig()); - } - for (int i = 0; i < relationshipTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relationshipTypes_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReadTime()); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, contentType_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getOutputConfig()); - } - { - int dataSize = 0; - for (int i = 0; i < relationshipTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getRelationshipTypesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ExportAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ExportAssetsRequest other = (com.google.cloud.asset.v1.ExportAssetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (contentType_ != other.contentType_) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!getRelationshipTypesList() - .equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - if (getRelationshipTypesCount() > 0) { - hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipTypesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ExportAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ExportAssetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Export asset request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ExportAssetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ExportAssetsRequest) - com.google.cloud.asset.v1.ExportAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ExportAssetsRequest.class, com.google.cloud.asset.v1.ExportAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ExportAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - contentType_ = 0; - - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ExportAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsRequest build() { - com.google.cloud.asset.v1.ExportAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsRequest buildPartial() { - com.google.cloud.asset.v1.ExportAssetsRequest result = new com.google.cloud.asset.v1.ExportAssetsRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.contentType_ = contentType_; - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.relationshipTypes_ = relationshipTypes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ExportAssetsRequest) { - return mergeFrom((com.google.cloud.asset.v1.ExportAssetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ExportAssetsRequest other) { - if (other == com.google.cloud.asset.v1.ExportAssetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - if (!other.relationshipTypes_.isEmpty()) { - if (relationshipTypes_.isEmpty()) { - relationshipTypes_ = other.relationshipTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRelationshipTypesIsMutable(); - relationshipTypes_.addAll(other.relationshipTypes_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ExportAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ExportAssetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - - contentType_ = value; - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRelationshipTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param index The index to set the value at. - * @param value The relationshipTypes to set. - * @return This builder for chaining. - */ - public Builder setRelationshipTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param value The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param values The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addAllRelationshipTypes( - java.lang.Iterable values) { - ensureRelationshipTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relationshipTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @return This builder for chaining. - */ - public Builder clearRelationshipTypes() { - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param value The bytes of the relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ExportAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ExportAssetsRequest) - private static final com.google.cloud.asset.v1.ExportAssetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ExportAssetsRequest(); - } - - public static com.google.cloud.asset.v1.ExportAssetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportAssetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java deleted file mode 100644 index 46cabddf1f1e..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java +++ /dev/null @@ -1,315 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ExportAssetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ExportAssetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - com.google.cloud.asset.v1.ContentType getContentType(); - - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - com.google.cloud.asset.v1.OutputConfig getOutputConfig(); - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); - - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return A list containing the relationshipTypes. - */ - java.util.List - getRelationshipTypesList(); - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return The count of relationshipTypes. - */ - int getRelationshipTypesCount(); - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - java.lang.String getRelationshipTypes(int index); - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - com.google.protobuf.ByteString - getRelationshipTypesBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java deleted file mode 100644 index ea9e90077ba0..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java +++ /dev/null @@ -1,1193 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * The export asset response. This message is returned by the
- * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
- * method in the returned
- * [google.longrunning.Operation.response][google.longrunning.Operation.response]
- * field.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ExportAssetsResponse} - */ -public final class ExportAssetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ExportAssetsResponse) - ExportAssetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExportAssetsResponse.newBuilder() to construct. - private ExportAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExportAssetsResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExportAssetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExportAssetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.asset.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.asset.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.cloud.asset.v1.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = input.readMessage(com.google.cloud.asset.v1.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ExportAssetsResponse.class, com.google.cloud.asset.v1.ExportAssetsResponse.Builder.class); - } - - public static final int READ_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.OutputConfig outputConfig_; - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1.OutputResult outputResult_; - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - * @return Whether the outputResult field is set. - */ - @java.lang.Override - public boolean hasOutputResult() { - return outputResult_ != null; - } - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - * @return The outputResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1.OutputResult getOutputResult() { - return outputResult_ == null ? com.google.cloud.asset.v1.OutputResult.getDefaultInstance() : outputResult_; - } - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.OutputResultOrBuilder getOutputResultOrBuilder() { - return getOutputResult(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (readTime_ != null) { - output.writeMessage(1, getReadTime()); - } - if (outputConfig_ != null) { - output.writeMessage(2, getOutputConfig()); - } - if (outputResult_ != null) { - output.writeMessage(3, getOutputResult()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getReadTime()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOutputConfig()); - } - if (outputResult_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getOutputResult()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ExportAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ExportAssetsResponse other = (com.google.cloud.asset.v1.ExportAssetsResponse) obj; - - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (hasOutputResult() != other.hasOutputResult()) return false; - if (hasOutputResult()) { - if (!getOutputResult() - .equals(other.getOutputResult())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - if (hasOutputResult()) { - hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getOutputResult().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ExportAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ExportAssetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The export asset response. This message is returned by the
-   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
-   * method in the returned
-   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
-   * field.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ExportAssetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ExportAssetsResponse) - com.google.cloud.asset.v1.ExportAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ExportAssetsResponse.class, com.google.cloud.asset.v1.ExportAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ExportAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - if (outputResultBuilder_ == null) { - outputResult_ = null; - } else { - outputResult_ = null; - outputResultBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ExportAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsResponse build() { - com.google.cloud.asset.v1.ExportAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsResponse buildPartial() { - com.google.cloud.asset.v1.ExportAssetsResponse result = new com.google.cloud.asset.v1.ExportAssetsResponse(this); - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - if (outputResultBuilder_ == null) { - result.outputResult_ = outputResult_; - } else { - result.outputResult_ = outputResultBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ExportAssetsResponse) { - return mergeFrom((com.google.cloud.asset.v1.ExportAssetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ExportAssetsResponse other) { - if (other == com.google.cloud.asset.v1.ExportAssetsResponse.getDefaultInstance()) return this; - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - if (other.hasOutputResult()) { - mergeOutputResult(other.getOutputResult()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ExportAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ExportAssetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.cloud.asset.v1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - * @return The outputConfig. - */ - public com.google.cloud.asset.v1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.asset.v1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputConfig, com.google.cloud.asset.v1.OutputConfig.Builder, com.google.cloud.asset.v1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - private com.google.cloud.asset.v1.OutputResult outputResult_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputResult, com.google.cloud.asset.v1.OutputResult.Builder, com.google.cloud.asset.v1.OutputResultOrBuilder> outputResultBuilder_; - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - * @return Whether the outputResult field is set. - */ - public boolean hasOutputResult() { - return outputResultBuilder_ != null || outputResult_ != null; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - * @return The outputResult. - */ - public com.google.cloud.asset.v1.OutputResult getOutputResult() { - if (outputResultBuilder_ == null) { - return outputResult_ == null ? com.google.cloud.asset.v1.OutputResult.getDefaultInstance() : outputResult_; - } else { - return outputResultBuilder_.getMessage(); - } - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - public Builder setOutputResult(com.google.cloud.asset.v1.OutputResult value) { - if (outputResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputResult_ = value; - onChanged(); - } else { - outputResultBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - public Builder setOutputResult( - com.google.cloud.asset.v1.OutputResult.Builder builderForValue) { - if (outputResultBuilder_ == null) { - outputResult_ = builderForValue.build(); - onChanged(); - } else { - outputResultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - public Builder mergeOutputResult(com.google.cloud.asset.v1.OutputResult value) { - if (outputResultBuilder_ == null) { - if (outputResult_ != null) { - outputResult_ = - com.google.cloud.asset.v1.OutputResult.newBuilder(outputResult_).mergeFrom(value).buildPartial(); - } else { - outputResult_ = value; - } - onChanged(); - } else { - outputResultBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - public Builder clearOutputResult() { - if (outputResultBuilder_ == null) { - outputResult_ = null; - onChanged(); - } else { - outputResult_ = null; - outputResultBuilder_ = null; - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - public com.google.cloud.asset.v1.OutputResult.Builder getOutputResultBuilder() { - - onChanged(); - return getOutputResultFieldBuilder().getBuilder(); - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - public com.google.cloud.asset.v1.OutputResultOrBuilder getOutputResultOrBuilder() { - if (outputResultBuilder_ != null) { - return outputResultBuilder_.getMessageOrBuilder(); - } else { - return outputResult_ == null ? - com.google.cloud.asset.v1.OutputResult.getDefaultInstance() : outputResult_; - } - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputResult, com.google.cloud.asset.v1.OutputResult.Builder, com.google.cloud.asset.v1.OutputResultOrBuilder> - getOutputResultFieldBuilder() { - if (outputResultBuilder_ == null) { - outputResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.OutputResult, com.google.cloud.asset.v1.OutputResult.Builder, com.google.cloud.asset.v1.OutputResultOrBuilder>( - getOutputResult(), - getParentForChildren(), - isClean()); - outputResult_ = null; - } - return outputResultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ExportAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ExportAssetsResponse) - private static final com.google.cloud.asset.v1.ExportAssetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ExportAssetsResponse(); - } - - public static com.google.cloud.asset.v1.ExportAssetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportAssetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ExportAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java deleted file mode 100644 index e3a7e58899ba..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ExportAssetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ExportAssetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - * @return The outputConfig. - */ - com.google.cloud.asset.v1.OutputConfig getOutputConfig(); - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1.OutputConfig output_config = 2; - */ - com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); - - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - * @return Whether the outputResult field is set. - */ - boolean hasOutputResult(); - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - * @return The outputResult. - */ - com.google.cloud.asset.v1.OutputResult getOutputResult(); - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1.OutputResult output_result = 3; - */ - com.google.cloud.asset.v1.OutputResultOrBuilder getOutputResultOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java deleted file mode 100644 index ae225896ab30..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java +++ /dev/null @@ -1,2446 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * An asset feed used to export asset updates to a destinations.
- * An asset feed filter controls what updates are exported.
- * The asset feed must be created within a project, organization, or
- * folder. Supported destinations are:
- * Pub/Sub topics.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.Feed} - */ -public final class Feed extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.Feed) - FeedOrBuilder { -private static final long serialVersionUID = 0L; - // Use Feed.newBuilder() to construct. - private Feed(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Feed() { - name_ = ""; - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Feed(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Feed( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetNames_.add(s); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - assetTypes_.add(s); - break; - } - case 32: { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: { - com.google.cloud.asset.v1.FeedOutputConfig.Builder subBuilder = null; - if (feedOutputConfig_ != null) { - subBuilder = feedOutputConfig_.toBuilder(); - } - feedOutputConfig_ = input.readMessage(com.google.cloud.asset.v1.FeedOutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feedOutputConfig_); - feedOutputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.type.Expr.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - relationshipTypes_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.Feed.class, com.google.cloud.asset.v1.Feed.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList assetNames_; - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList - getAssetNamesList() { - return assetNames_; - } - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString - getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 4; - private int contentType_; - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - - public static final int FEED_OUTPUT_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1.FeedOutputConfig feedOutputConfig_; - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feedOutputConfig field is set. - */ - @java.lang.Override - public boolean hasFeedOutputConfig() { - return feedOutputConfig_ != null; - } - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedOutputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig() { - return feedOutputConfig_ == null ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; - } - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { - return getFeedOutputConfig(); - } - - public static final int CONDITION_FIELD_NUMBER = 6; - private com.google.type.Expr condition_; - /** - *
-   * A condition which determines whether an asset update should be published.
-   * If specified, an asset will be returned only when the expression evaluates
-   * to true.
-   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-   * (https://github.com/google/cel-spec) on a TemporalAsset with name
-   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-   * == true") will only publish Asset deletions. Other fields of `Expr` are
-   * optional.
-   * See our [user
-   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-   * for detailed instructions.
-   * 
- * - * .google.type.Expr condition = 6; - * @return Whether the condition field is set. - */ - @java.lang.Override - public boolean hasCondition() { - return condition_ != null; - } - /** - *
-   * A condition which determines whether an asset update should be published.
-   * If specified, an asset will be returned only when the expression evaluates
-   * to true.
-   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-   * (https://github.com/google/cel-spec) on a TemporalAsset with name
-   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-   * == true") will only publish Asset deletions. Other fields of `Expr` are
-   * optional.
-   * See our [user
-   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-   * for detailed instructions.
-   * 
- * - * .google.type.Expr condition = 6; - * @return The condition. - */ - @java.lang.Override - public com.google.type.Expr getCondition() { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; - } - /** - *
-   * A condition which determines whether an asset update should be published.
-   * If specified, an asset will be returned only when the expression evaluates
-   * to true.
-   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-   * (https://github.com/google/cel-spec) on a TemporalAsset with name
-   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-   * == true") will only publish Asset deletions. Other fields of `Expr` are
-   * optional.
-   * See our [user
-   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-   * for detailed instructions.
-   * 
- * - * .google.type.Expr condition = 6; - */ - @java.lang.Override - public com.google.type.ExprOrBuilder getConditionOrBuilder() { - return getCondition(); - } - - public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 7; - private com.google.protobuf.LazyStringList relationshipTypes_; - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_; - } - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < assetNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i)); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, contentType_); - } - if (feedOutputConfig_ != null) { - output.writeMessage(5, getFeedOutputConfig()); - } - if (condition_ != null) { - output.writeMessage(6, getCondition()); - } - for (int i = 0; i < relationshipTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - { - int dataSize = 0; - for (int i = 0; i < assetNames_.size(); i++) { - dataSize += computeStringSizeNoTag(assetNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetNamesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, contentType_); - } - if (feedOutputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getFeedOutputConfig()); - } - if (condition_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getCondition()); - } - { - int dataSize = 0; - for (int i = 0; i < relationshipTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getRelationshipTypesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.Feed)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.Feed other = (com.google.cloud.asset.v1.Feed) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getAssetNamesList() - .equals(other.getAssetNamesList())) return false; - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (contentType_ != other.contentType_) return false; - if (hasFeedOutputConfig() != other.hasFeedOutputConfig()) return false; - if (hasFeedOutputConfig()) { - if (!getFeedOutputConfig() - .equals(other.getFeedOutputConfig())) return false; - } - if (hasCondition() != other.hasCondition()) return false; - if (hasCondition()) { - if (!getCondition() - .equals(other.getCondition())) return false; - } - if (!getRelationshipTypesList() - .equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getAssetNamesCount() > 0) { - hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getAssetNamesList().hashCode(); - } - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - if (hasFeedOutputConfig()) { - hash = (37 * hash) + FEED_OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getFeedOutputConfig().hashCode(); - } - if (hasCondition()) { - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + getCondition().hashCode(); - } - if (getRelationshipTypesCount() > 0) { - hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipTypesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.Feed parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Feed parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Feed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Feed parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Feed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Feed parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Feed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Feed parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.Feed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Feed parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.Feed parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Feed parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.Feed prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An asset feed used to export asset updates to a destinations.
-   * An asset feed filter controls what updates are exported.
-   * The asset feed must be created within a project, organization, or
-   * folder. Supported destinations are:
-   * Pub/Sub topics.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.Feed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.Feed) - com.google.cloud.asset.v1.FeedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.Feed.class, com.google.cloud.asset.v1.Feed.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.Feed.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - contentType_ = 0; - - if (feedOutputConfigBuilder_ == null) { - feedOutputConfig_ = null; - } else { - feedOutputConfig_ = null; - feedOutputConfigBuilder_ = null; - } - if (conditionBuilder_ == null) { - condition_ = null; - } else { - condition_ = null; - conditionBuilder_ = null; - } - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_Feed_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Feed getDefaultInstanceForType() { - return com.google.cloud.asset.v1.Feed.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.Feed build() { - com.google.cloud.asset.v1.Feed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Feed buildPartial() { - com.google.cloud.asset.v1.Feed result = new com.google.cloud.asset.v1.Feed(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (((bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetNames_ = assetNames_; - if (((bitField0_ & 0x00000002) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.assetTypes_ = assetTypes_; - result.contentType_ = contentType_; - if (feedOutputConfigBuilder_ == null) { - result.feedOutputConfig_ = feedOutputConfig_; - } else { - result.feedOutputConfig_ = feedOutputConfigBuilder_.build(); - } - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - if (((bitField0_ & 0x00000004) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.relationshipTypes_ = relationshipTypes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.Feed) { - return mergeFrom((com.google.cloud.asset.v1.Feed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.Feed other) { - if (other == com.google.cloud.asset.v1.Feed.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.assetNames_.isEmpty()) { - if (assetNames_.isEmpty()) { - assetNames_ = other.assetNames_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetNamesIsMutable(); - assetNames_.addAll(other.assetNames_); - } - onChanged(); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.hasFeedOutputConfig()) { - mergeFeedOutputConfig(other.getFeedOutputConfig()); - } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - if (!other.relationshipTypes_.isEmpty()) { - if (relationshipTypes_.isEmpty()) { - relationshipTypes_ = other.relationshipTypes_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRelationshipTypesIsMutable(); - relationshipTypes_.addAll(other.relationshipTypes_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.Feed parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.Feed) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList - getAssetNamesList() { - return assetNames_.getUnmodifiableView(); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString - getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @param index The index to set the value at. - * @param value The assetNames to set. - * @return This builder for chaining. - */ - public Builder setAssetNames( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @param value The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNames( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @param values The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAllAssetNames( - java.lang.Iterable values) { - ensureAssetNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetNames_); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @return This builder for chaining. - */ - public Builder clearAssetNames() { - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * For a list of the full names for supported asset types, see [Resource
-     * name format](/asset-inventory/docs/resource-name-format).
-     * 
- * - * repeated string asset_names = 2; - * @param value The bytes of the assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names or asset_types are exported to the feed.
-     * Example: `"compute.googleapis.com/Disk"`
-     * For a list of all supported asset types, see
-     * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-     * 
- * - * repeated string asset_types = 3; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - - contentType_ = value; - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.FeedOutputConfig feedOutputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.FeedOutputConfig, com.google.cloud.asset.v1.FeedOutputConfig.Builder, com.google.cloud.asset.v1.FeedOutputConfigOrBuilder> feedOutputConfigBuilder_; - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feedOutputConfig field is set. - */ - public boolean hasFeedOutputConfig() { - return feedOutputConfigBuilder_ != null || feedOutputConfig_ != null; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedOutputConfig. - */ - public com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig() { - if (feedOutputConfigBuilder_ == null) { - return feedOutputConfig_ == null ? com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; - } else { - return feedOutputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeedOutputConfig(com.google.cloud.asset.v1.FeedOutputConfig value) { - if (feedOutputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - feedOutputConfig_ = value; - onChanged(); - } else { - feedOutputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeedOutputConfig( - com.google.cloud.asset.v1.FeedOutputConfig.Builder builderForValue) { - if (feedOutputConfigBuilder_ == null) { - feedOutputConfig_ = builderForValue.build(); - onChanged(); - } else { - feedOutputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1.FeedOutputConfig value) { - if (feedOutputConfigBuilder_ == null) { - if (feedOutputConfig_ != null) { - feedOutputConfig_ = - com.google.cloud.asset.v1.FeedOutputConfig.newBuilder(feedOutputConfig_).mergeFrom(value).buildPartial(); - } else { - feedOutputConfig_ = value; - } - onChanged(); - } else { - feedOutputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFeedOutputConfig() { - if (feedOutputConfigBuilder_ == null) { - feedOutputConfig_ = null; - onChanged(); - } else { - feedOutputConfig_ = null; - feedOutputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.FeedOutputConfig.Builder getFeedOutputConfigBuilder() { - - onChanged(); - return getFeedOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { - if (feedOutputConfigBuilder_ != null) { - return feedOutputConfigBuilder_.getMessageOrBuilder(); - } else { - return feedOutputConfig_ == null ? - com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; - } - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.FeedOutputConfig, com.google.cloud.asset.v1.FeedOutputConfig.Builder, com.google.cloud.asset.v1.FeedOutputConfigOrBuilder> - getFeedOutputConfigFieldBuilder() { - if (feedOutputConfigBuilder_ == null) { - feedOutputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.FeedOutputConfig, com.google.cloud.asset.v1.FeedOutputConfig.Builder, com.google.cloud.asset.v1.FeedOutputConfigOrBuilder>( - getFeedOutputConfig(), - getParentForChildren(), - isClean()); - feedOutputConfig_ = null; - } - return feedOutputConfigBuilder_; - } - - private com.google.type.Expr condition_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> conditionBuilder_; - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - * @return Whether the condition field is set. - */ - public boolean hasCondition() { - return conditionBuilder_ != null || condition_ != null; - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - * @return The condition. - */ - public com.google.type.Expr getCondition() { - if (conditionBuilder_ == null) { - return condition_ == null ? com.google.type.Expr.getDefaultInstance() : condition_; - } else { - return conditionBuilder_.getMessage(); - } - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - */ - public Builder setCondition(com.google.type.Expr value) { - if (conditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - condition_ = value; - onChanged(); - } else { - conditionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - */ - public Builder setCondition( - com.google.type.Expr.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); - onChanged(); - } else { - conditionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - */ - public Builder mergeCondition(com.google.type.Expr value) { - if (conditionBuilder_ == null) { - if (condition_ != null) { - condition_ = - com.google.type.Expr.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; - } - onChanged(); - } else { - conditionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - */ - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = null; - onChanged(); - } else { - condition_ = null; - conditionBuilder_ = null; - } - - return this; - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - */ - public com.google.type.Expr.Builder getConditionBuilder() { - - onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - */ - public com.google.type.ExprOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_ == null ? - com.google.type.Expr.getDefaultInstance() : condition_; - } - } - /** - *
-     * A condition which determines whether an asset update should be published.
-     * If specified, an asset will be returned only when the expression evaluates
-     * to true.
-     * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-     * (https://github.com/google/cel-spec) on a TemporalAsset with name
-     * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-     * == true") will only publish Asset deletions. Other fields of `Expr` are
-     * optional.
-     * See our [user
-     * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-     * for detailed instructions.
-     * 
- * - * .google.type.Expr condition = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.type.Expr, com.google.type.Expr.Builder, com.google.type.ExprOrBuilder>( - getCondition(), - getParentForChildren(), - isClean()); - condition_ = null; - } - return conditionBuilder_; - } - - private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRelationshipTypesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param index The index to set the value at. - * @param value The relationshipTypes to set. - * @return This builder for chaining. - */ - public Builder setRelationshipTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param value The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param values The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addAllRelationshipTypes( - java.lang.Iterable values) { - ensureRelationshipTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relationshipTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @return This builder for chaining. - */ - public Builder clearRelationshipTypes() { - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it outputs specified relationship updates on the [asset_names] or the
-     * [asset_types]. It returns an error if any of the [relationship_types]
-     * doesn't belong to the supported relationship types of the [asset_names] or
-     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-     * belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it outputs the supported relationships of the types of [asset_names] and
-     * [asset_types] or returns an error if any of the [asset_names] or the
-     * [asset_types] has no replationship support.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param value The bytes of the relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.Feed) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Feed) - private static final com.google.cloud.asset.v1.Feed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.Feed(); - } - - public static com.google.cloud.asset.v1.Feed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Feed parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Feed(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Feed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java deleted file mode 100644 index 7257fbdabebd..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class FeedName implements ResourceName { - private static final PathTemplate PROJECT_FEED = - PathTemplate.createWithoutUrlEncoding("projects/{project}/feeds/{feed}"); - private static final PathTemplate FOLDER_FEED = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/feeds/{feed}"); - private static final PathTemplate ORGANIZATION_FEED = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/feeds/{feed}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String feed; - private final String folder; - private final String organization; - - @Deprecated - protected FeedName() { - project = null; - feed = null; - folder = null; - organization = null; - } - - private FeedName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - feed = Preconditions.checkNotNull(builder.getFeed()); - folder = null; - organization = null; - pathTemplate = PROJECT_FEED; - } - - private FeedName(FolderFeedBuilder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - feed = Preconditions.checkNotNull(builder.getFeed()); - project = null; - organization = null; - pathTemplate = FOLDER_FEED; - } - - private FeedName(OrganizationFeedBuilder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - feed = Preconditions.checkNotNull(builder.getFeed()); - project = null; - folder = null; - pathTemplate = ORGANIZATION_FEED; - } - - public String getProject() { - return project; - } - - public String getFeed() { - return feed; - } - - public String getFolder() { - return folder; - } - - public String getOrganization() { - return organization; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectFeedBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static FolderFeedBuilder newFolderFeedBuilder() { - return new FolderFeedBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static OrganizationFeedBuilder newOrganizationFeedBuilder() { - return new OrganizationFeedBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static FeedName of(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FeedName ofProjectFeedName(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FeedName ofFolderFeedName(String folder, String feed) { - return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FeedName ofOrganizationFeedName(String organization, String feed) { - return newOrganizationFeedBuilder().setOrganization(organization).setFeed(feed).build(); - } - - public static String format(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectFeedName(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatFolderFeedName(String folder, String feed) { - return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationFeedName(String organization, String feed) { - return newOrganizationFeedBuilder() - .setOrganization(organization) - .setFeed(feed) - .build() - .toString(); - } - - public static FeedName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_FEED.matches(formattedString)) { - Map matchMap = PROJECT_FEED.match(formattedString); - return ofProjectFeedName(matchMap.get("project"), matchMap.get("feed")); - } else if (FOLDER_FEED.matches(formattedString)) { - Map matchMap = FOLDER_FEED.match(formattedString); - return ofFolderFeedName(matchMap.get("folder"), matchMap.get("feed")); - } else if (ORGANIZATION_FEED.matches(formattedString)) { - Map matchMap = ORGANIZATION_FEED.match(formattedString); - return ofOrganizationFeedName(matchMap.get("organization"), matchMap.get("feed")); - } - throw new ValidationException("FeedName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (FeedName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_FEED.matches(formattedString) - || FOLDER_FEED.matches(formattedString) - || ORGANIZATION_FEED.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (feed != null) { - fieldMapBuilder.put("feed", feed); - } - if (folder != null) { - fieldMapBuilder.put("folder", folder); - } - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - FeedName that = ((FeedName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.feed, that.feed) - && Objects.equals(this.folder, that.folder) - && Objects.equals(this.organization, that.organization); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(feed); - h *= 1000003; - h ^= Objects.hashCode(folder); - h *= 1000003; - h ^= Objects.hashCode(organization); - return h; - } - - /** Builder for projects/{project}/feeds/{feed}. */ - public static class Builder { - private String project; - private String feed; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getFeed() { - return feed; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setFeed(String feed) { - this.feed = feed; - return this; - } - - private Builder(FeedName feedName) { - Preconditions.checkArgument( - Objects.equals(feedName.pathTemplate, PROJECT_FEED), - "toBuilder is only supported when FeedName has the pattern of projects/{project}/feeds/{feed}"); - this.project = feedName.project; - this.feed = feedName.feed; - } - - public FeedName build() { - return new FeedName(this); - } - } - - /** Builder for folders/{folder}/feeds/{feed}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class FolderFeedBuilder { - private String folder; - private String feed; - - protected FolderFeedBuilder() {} - - public String getFolder() { - return folder; - } - - public String getFeed() { - return feed; - } - - public FolderFeedBuilder setFolder(String folder) { - this.folder = folder; - return this; - } - - public FolderFeedBuilder setFeed(String feed) { - this.feed = feed; - return this; - } - - public FeedName build() { - return new FeedName(this); - } - } - - /** Builder for organizations/{organization}/feeds/{feed}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class OrganizationFeedBuilder { - private String organization; - private String feed; - - protected OrganizationFeedBuilder() {} - - public String getOrganization() { - return organization; - } - - public String getFeed() { - return feed; - } - - public OrganizationFeedBuilder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public OrganizationFeedBuilder setFeed(String feed) { - this.feed = feed; - return this; - } - - public FeedName build() { - return new FeedName(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java deleted file mode 100644 index 1086910dc923..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java +++ /dev/null @@ -1,374 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface FeedOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.Feed) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - java.util.List - getAssetNamesList(); - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - int getAssetNamesCount(); - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - java.lang.String getAssetNames(int index); - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * For a list of the full names for supported asset types, see [Resource
-   * name format](/asset-inventory/docs/resource-name-format).
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - com.google.protobuf.ByteString - getAssetNamesBytes(int index); - - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names or asset_types are exported to the feed.
-   * Example: `"compute.googleapis.com/Disk"`
-   * For a list of all supported asset types, see
-   * [Supported asset types](/asset-inventory/docs/supported-asset-types).
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - com.google.cloud.asset.v1.ContentType getContentType(); - - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feedOutputConfig field is set. - */ - boolean hasFeedOutputConfig(); - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedOutputConfig. - */ - com.google.cloud.asset.v1.FeedOutputConfig getFeedOutputConfig(); - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder(); - - /** - *
-   * A condition which determines whether an asset update should be published.
-   * If specified, an asset will be returned only when the expression evaluates
-   * to true.
-   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-   * (https://github.com/google/cel-spec) on a TemporalAsset with name
-   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-   * == true") will only publish Asset deletions. Other fields of `Expr` are
-   * optional.
-   * See our [user
-   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-   * for detailed instructions.
-   * 
- * - * .google.type.Expr condition = 6; - * @return Whether the condition field is set. - */ - boolean hasCondition(); - /** - *
-   * A condition which determines whether an asset update should be published.
-   * If specified, an asset will be returned only when the expression evaluates
-   * to true.
-   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-   * (https://github.com/google/cel-spec) on a TemporalAsset with name
-   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-   * == true") will only publish Asset deletions. Other fields of `Expr` are
-   * optional.
-   * See our [user
-   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-   * for detailed instructions.
-   * 
- * - * .google.type.Expr condition = 6; - * @return The condition. - */ - com.google.type.Expr getCondition(); - /** - *
-   * A condition which determines whether an asset update should be published.
-   * If specified, an asset will be returned only when the expression evaluates
-   * to true.
-   * When set, `expression` field in the `Expr` must be a valid [CEL expression]
-   * (https://github.com/google/cel-spec) on a TemporalAsset with name
-   * `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
-   * == true") will only publish Asset deletions. Other fields of `Expr` are
-   * optional.
-   * See our [user
-   * guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition)
-   * for detailed instructions.
-   * 
- * - * .google.type.Expr condition = 6; - */ - com.google.type.ExprOrBuilder getConditionOrBuilder(); - - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return A list containing the relationshipTypes. - */ - java.util.List - getRelationshipTypesList(); - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return The count of relationshipTypes. - */ - int getRelationshipTypesCount(); - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - java.lang.String getRelationshipTypes(int index); - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it outputs specified relationship updates on the [asset_names] or the
-   * [asset_types]. It returns an error if any of the [relationship_types]
-   * doesn't belong to the supported relationship types of the [asset_names] or
-   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
-   * belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it outputs the supported relationships of the types of [asset_names] and
-   * [asset_types] or returns an error if any of the [asset_names] or the
-   * [asset_types] has no replationship support.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - com.google.protobuf.ByteString - getRelationshipTypesBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java deleted file mode 100644 index 3d2fbe6ed4f3..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfig.java +++ /dev/null @@ -1,761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Output configuration for asset feed destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.FeedOutputConfig} - */ -public final class FeedOutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.FeedOutputConfig) - FeedOutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use FeedOutputConfig.newBuilder() to construct. - private FeedOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FeedOutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FeedOutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FeedOutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.PubsubDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1.PubsubDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1.PubsubDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.PubsubDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.FeedOutputConfig.class, com.google.cloud.asset.v1.FeedOutputConfig.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - public enum DestinationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PUBSUB_DESTINATION(1), - DESTINATION_NOT_SET(0); - private final int value; - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: return PUBSUB_DESTINATION; - case 0: return DESTINATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public static final int PUBSUB_DESTINATION_FIELD_NUMBER = 1; - /** - *
-   * Destination on Pub/Sub.
-   * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - * @return Whether the pubsubDestination field is set. - */ - @java.lang.Override - public boolean hasPubsubDestination() { - return destinationCase_ == 1; - } - /** - *
-   * Destination on Pub/Sub.
-   * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - * @return The pubsubDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestination getPubsubDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); - } - /** - *
-   * Destination on Pub/Sub.
-   * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1.PubsubDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1.PubsubDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.FeedOutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.FeedOutputConfig other = (com.google.cloud.asset.v1.FeedOutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getPubsubDestination() - .equals(other.getPubsubDestination())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + PUBSUB_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getPubsubDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.FeedOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.FeedOutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output configuration for asset feed destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.FeedOutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.FeedOutputConfig) - com.google.cloud.asset.v1.FeedOutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.FeedOutputConfig.class, com.google.cloud.asset.v1.FeedOutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.FeedOutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.FeedOutputConfig build() { - com.google.cloud.asset.v1.FeedOutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.FeedOutputConfig buildPartial() { - com.google.cloud.asset.v1.FeedOutputConfig result = new com.google.cloud.asset.v1.FeedOutputConfig(this); - if (destinationCase_ == 1) { - if (pubsubDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = pubsubDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.FeedOutputConfig) { - return mergeFrom((com.google.cloud.asset.v1.FeedOutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.FeedOutputConfig other) { - if (other == com.google.cloud.asset.v1.FeedOutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case PUBSUB_DESTINATION: { - mergePubsubDestination(other.getPubsubDestination()); - break; - } - case DESTINATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.FeedOutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.FeedOutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int destinationCase_ = 0; - private java.lang.Object destination_; - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.PubsubDestination, com.google.cloud.asset.v1.PubsubDestination.Builder, com.google.cloud.asset.v1.PubsubDestinationOrBuilder> pubsubDestinationBuilder_; - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - * @return Whether the pubsubDestination field is set. - */ - @java.lang.Override - public boolean hasPubsubDestination() { - return destinationCase_ == 1; - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - * @return The pubsubDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestination getPubsubDestination() { - if (pubsubDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return pubsubDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - public Builder setPubsubDestination(com.google.cloud.asset.v1.PubsubDestination value) { - if (pubsubDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - pubsubDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - public Builder setPubsubDestination( - com.google.cloud.asset.v1.PubsubDestination.Builder builderForValue) { - if (pubsubDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - pubsubDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - public Builder mergePubsubDestination(com.google.cloud.asset.v1.PubsubDestination value) { - if (pubsubDestinationBuilder_ == null) { - if (destinationCase_ == 1 && - destination_ != com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1.PubsubDestination.newBuilder((com.google.cloud.asset.v1.PubsubDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - pubsubDestinationBuilder_.mergeFrom(value); - } else { - pubsubDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - public Builder clearPubsubDestination() { - if (pubsubDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - pubsubDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - public com.google.cloud.asset.v1.PubsubDestination.Builder getPubsubDestinationBuilder() { - return getPubsubDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { - if ((destinationCase_ == 1) && (pubsubDestinationBuilder_ != null)) { - return pubsubDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Pub/Sub.
-     * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.PubsubDestination, com.google.cloud.asset.v1.PubsubDestination.Builder, com.google.cloud.asset.v1.PubsubDestinationOrBuilder> - getPubsubDestinationFieldBuilder() { - if (pubsubDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); - } - pubsubDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.PubsubDestination, com.google.cloud.asset.v1.PubsubDestination.Builder, com.google.cloud.asset.v1.PubsubDestinationOrBuilder>( - (com.google.cloud.asset.v1.PubsubDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged();; - return pubsubDestinationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.FeedOutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.FeedOutputConfig) - private static final com.google.cloud.asset.v1.FeedOutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.FeedOutputConfig(); - } - - public static com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FeedOutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FeedOutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.FeedOutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java deleted file mode 100644 index ac8bae6335c6..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOutputConfigOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface FeedOutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.FeedOutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Destination on Pub/Sub.
-   * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - * @return Whether the pubsubDestination field is set. - */ - boolean hasPubsubDestination(); - /** - *
-   * Destination on Pub/Sub.
-   * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - * @return The pubsubDestination. - */ - com.google.cloud.asset.v1.PubsubDestination getPubsubDestination(); - /** - *
-   * Destination on Pub/Sub.
-   * 
- * - * .google.cloud.asset.v1.PubsubDestination pubsub_destination = 1; - */ - com.google.cloud.asset.v1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder(); - - public com.google.cloud.asset.v1.FeedOutputConfig.DestinationCase getDestinationCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java deleted file mode 100644 index e4f3b3981b86..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FolderName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class FolderName implements ResourceName { - private static final PathTemplate FOLDER = - PathTemplate.createWithoutUrlEncoding("folders/{folder}"); - private volatile Map fieldValuesMap; - private final String folder; - - @Deprecated - protected FolderName() { - folder = null; - } - - private FolderName(Builder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - } - - public String getFolder() { - return folder; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static FolderName of(String folder) { - return newBuilder().setFolder(folder).build(); - } - - public static String format(String folder) { - return newBuilder().setFolder(folder).build().toString(); - } - - public static FolderName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - FOLDER.validatedMatch( - formattedString, "FolderName.parse: formattedString not in valid format"); - return of(matchMap.get("folder")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (FolderName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return FOLDER.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (folder != null) { - fieldMapBuilder.put("folder", folder); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return FOLDER.instantiate("folder", folder); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - FolderName that = ((FolderName) o); - return Objects.equals(this.folder, that.folder); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(folder); - return h; - } - - /** Builder for folders/{folder}. */ - public static class Builder { - private String folder; - - protected Builder() {} - - public String getFolder() { - return folder; - } - - public Builder setFolder(String folder) { - this.folder = folder; - return this; - } - - private Builder(FolderName folderName) { - this.folder = folderName.folder; - } - - public FolderName build() { - return new FolderName(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java deleted file mode 100644 index be616ac0aeb3..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java +++ /dev/null @@ -1,1065 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A Cloud Storage location.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.GcsDestination} - */ -public final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GcsDestination) - GcsDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 1; - objectUri_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 2; - objectUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GcsDestination.class, com.google.cloud.asset.v1.GcsDestination.Builder.class); - } - - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - public enum ObjectUriCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - URI(1), - URI_PREFIX(2), - OBJECTURI_NOT_SET(0); - private final int value; - private ObjectUriCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ObjectUriCase valueOf(int value) { - return forNumber(value); - } - - public static ObjectUriCase forNumber(int value) { - switch (value) { - case 1: return URI; - case 2: return URI_PREFIX; - case 0: return OBJECTURI_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ObjectUriCase - getObjectUriCase() { - return ObjectUriCase.forNumber( - objectUriCase_); - } - - public static final int URI_FIELD_NUMBER = 1; - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * If the specified Cloud Storage object already exists and there is no
-   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-   * overwritten with the exported result.
-   * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - public boolean hasUri() { - return objectUriCase_ == 1; - } - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * If the specified Cloud Storage object already exists and there is no
-   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-   * overwritten with the exported result.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 1) { - objectUri_ = s; - } - return s; - } - } - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * If the specified Cloud Storage object already exists and there is no
-   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-   * overwritten with the exported result.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_PREFIX_FIELD_NUMBER = 2; - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return Whether the uriPrefix field is set. - */ - public boolean hasUriPrefix() { - return objectUriCase_ == 2; - } - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The uriPrefix. - */ - public java.lang.String getUriPrefix() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 2) { - objectUri_ = s; - } - return s; - } - } - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The bytes for uriPrefix. - */ - public com.google.protobuf.ByteString - getUriPrefixBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 2) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (objectUriCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); - } - if (objectUriCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (objectUriCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); - } - if (objectUriCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.GcsDestination other = (com.google.cloud.asset.v1.GcsDestination) obj; - - if (!getObjectUriCase().equals(other.getObjectUriCase())) return false; - switch (objectUriCase_) { - case 1: - if (!getUri() - .equals(other.getUri())) return false; - break; - case 2: - if (!getUriPrefix() - .equals(other.getUriPrefix())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (objectUriCase_) { - case 1: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - break; - case 2: - hash = (37 * hash) + URI_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getUriPrefix().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Cloud Storage location.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GcsDestination) - com.google.cloud.asset.v1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GcsDestination.class, com.google.cloud.asset.v1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - objectUriCase_ = 0; - objectUri_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestination build() { - com.google.cloud.asset.v1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestination buildPartial() { - com.google.cloud.asset.v1.GcsDestination result = new com.google.cloud.asset.v1.GcsDestination(this); - if (objectUriCase_ == 1) { - result.objectUri_ = objectUri_; - } - if (objectUriCase_ == 2) { - result.objectUri_ = objectUri_; - } - result.objectUriCase_ = objectUriCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.GcsDestination) { - return mergeFrom((com.google.cloud.asset.v1.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.GcsDestination other) { - if (other == com.google.cloud.asset.v1.GcsDestination.getDefaultInstance()) return this; - switch (other.getObjectUriCase()) { - case URI: { - objectUriCase_ = 1; - objectUri_ = other.objectUri_; - onChanged(); - break; - } - case URI_PREFIX: { - objectUriCase_ = 2; - objectUri_ = other.objectUri_; - onChanged(); - break; - } - case OBJECTURI_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - public ObjectUriCase - getObjectUriCase() { - return ObjectUriCase.forNumber( - objectUriCase_); - } - - public Builder clearObjectUri() { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - return this; - } - - - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the exported result.
-     * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - @java.lang.Override - public boolean hasUri() { - return objectUriCase_ == 1; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the exported result.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 1) { - objectUri_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the exported result.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the exported result.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectUriCase_ = 1; - objectUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the exported result.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - if (objectUriCase_ == 1) { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the exported result.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectUriCase_ = 1; - objectUri_ = value; - onChanged(); - return this; - } - - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return Whether the uriPrefix field is set. - */ - @java.lang.Override - public boolean hasUriPrefix() { - return objectUriCase_ == 2; - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return The uriPrefix. - */ - @java.lang.Override - public java.lang.String getUriPrefix() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 2) { - objectUri_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return The bytes for uriPrefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriPrefixBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 2) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @param value The uriPrefix to set. - * @return This builder for chaining. - */ - public Builder setUriPrefix( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectUriCase_ = 2; - objectUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return This builder for chaining. - */ - public Builder clearUriPrefix() { - if (objectUriCase_ == 2) { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @param value The bytes for uriPrefix to set. - * @return This builder for chaining. - */ - public Builder setUriPrefixBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectUriCase_ = 2; - objectUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GcsDestination) - private static final com.google.cloud.asset.v1.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GcsDestination(); - } - - public static com.google.cloud.asset.v1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java deleted file mode 100644 index 7fef46dc7c32..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * If the specified Cloud Storage object already exists and there is no
-   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-   * overwritten with the exported result.
-   * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - boolean hasUri(); - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * If the specified Cloud Storage object already exists and there is no
-   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-   * overwritten with the exported result.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * If the specified Cloud Storage object already exists and there is no
-   * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-   * overwritten with the exported result.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return Whether the uriPrefix field is set. - */ - boolean hasUriPrefix(); - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The uriPrefix. - */ - java.lang.String getUriPrefix(); - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The bytes for uriPrefix. - */ - com.google.protobuf.ByteString - getUriPrefixBytes(); - - public com.google.cloud.asset.v1.GcsDestination.ObjectUriCase getObjectUriCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java deleted file mode 100644 index 42618d6ddd9d..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResult.java +++ /dev/null @@ -1,689 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A Cloud Storage output result.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.GcsOutputResult} - */ -public final class GcsOutputResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GcsOutputResult) - GcsOutputResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsOutputResult.newBuilder() to construct. - private GcsOutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsOutputResult() { - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsOutputResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsOutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - uris_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = uris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GcsOutputResult.class, com.google.cloud.asset.v1.GcsOutputResult.Builder.class); - } - - public static final int URIS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList uris_; - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList - getUrisList() { - return uris_; - } - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - public java.lang.String getUris(int index) { - return uris_.get(index); - } - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - public com.google.protobuf.ByteString - getUrisBytes(int index) { - return uris_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < uris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < uris_.size(); i++) { - dataSize += computeStringSizeNoTag(uris_.getRaw(i)); - } - size += dataSize; - size += 1 * getUrisList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.GcsOutputResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.GcsOutputResult other = (com.google.cloud.asset.v1.GcsOutputResult) obj; - - if (!getUrisList() - .equals(other.getUrisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getUrisCount() > 0) { - hash = (37 * hash) + URIS_FIELD_NUMBER; - hash = (53 * hash) + getUrisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GcsOutputResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.GcsOutputResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Cloud Storage output result.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.GcsOutputResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GcsOutputResult) - com.google.cloud.asset.v1.GcsOutputResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GcsOutputResult.class, com.google.cloud.asset.v1.GcsOutputResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.GcsOutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResult build() { - com.google.cloud.asset.v1.GcsOutputResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResult buildPartial() { - com.google.cloud.asset.v1.GcsOutputResult result = new com.google.cloud.asset.v1.GcsOutputResult(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - uris_ = uris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.uris_ = uris_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.GcsOutputResult) { - return mergeFrom((com.google.cloud.asset.v1.GcsOutputResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.GcsOutputResult other) { - if (other == com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance()) return this; - if (!other.uris_.isEmpty()) { - if (uris_.isEmpty()) { - uris_ = other.uris_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureUrisIsMutable(); - uris_.addAll(other.uris_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.GcsOutputResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.GcsOutputResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureUrisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(uris_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList - getUrisList() { - return uris_.getUnmodifiableView(); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - public java.lang.String getUris(int index) { - return uris_.get(index); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - public com.google.protobuf.ByteString - getUrisBytes(int index) { - return uris_.getByteString(index); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param index The index to set the value at. - * @param value The uris to set. - * @return This builder for chaining. - */ - public Builder setUris( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrisIsMutable(); - uris_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param value The uris to add. - * @return This builder for chaining. - */ - public Builder addUris( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrisIsMutable(); - uris_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param values The uris to add. - * @return This builder for chaining. - */ - public Builder addAllUris( - java.lang.Iterable values) { - ensureUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, uris_); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @return This builder for chaining. - */ - public Builder clearUris() { - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param value The bytes of the uris to add. - * @return This builder for chaining. - */ - public Builder addUrisBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUrisIsMutable(); - uris_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GcsOutputResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GcsOutputResult) - private static final com.google.cloud.asset.v1.GcsOutputResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GcsOutputResult(); - } - - public static com.google.cloud.asset.v1.GcsOutputResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsOutputResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsOutputResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java deleted file mode 100644 index bff599adbc7f..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface GcsOutputResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GcsOutputResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return A list containing the uris. - */ - java.util.List - getUrisList(); - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return The count of uris. - */ - int getUrisCount(); - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - java.lang.String getUris(int index); - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - com.google.protobuf.ByteString - getUrisBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java deleted file mode 100644 index 5d64a43ee95d..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Get asset feed request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.GetFeedRequest} - */ -public final class GetFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GetFeedRequest) - GetFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetFeedRequest.newBuilder() to construct. - private GetFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetFeedRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GetFeedRequest.class, com.google.cloud.asset.v1.GetFeedRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.GetFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.GetFeedRequest other = (com.google.cloud.asset.v1.GetFeedRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GetFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.GetFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Get asset feed request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.GetFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GetFeedRequest) - com.google.cloud.asset.v1.GetFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GetFeedRequest.class, com.google.cloud.asset.v1.GetFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.GetFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.GetFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetFeedRequest build() { - com.google.cloud.asset.v1.GetFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetFeedRequest buildPartial() { - com.google.cloud.asset.v1.GetFeedRequest result = new com.google.cloud.asset.v1.GetFeedRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.GetFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1.GetFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.GetFeedRequest other) { - if (other == com.google.cloud.asset.v1.GetFeedRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.GetFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.GetFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GetFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GetFeedRequest) - private static final com.google.cloud.asset.v1.GetFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GetFeedRequest(); - } - - public static com.google.cloud.asset.v1.GetFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java deleted file mode 100644 index fb82dab2672d..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface GetFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GetFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java deleted file mode 100644 index 9a63451d78dc..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Request to get a saved query.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.GetSavedQueryRequest} - */ -public final class GetSavedQueryRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.GetSavedQueryRequest) - GetSavedQueryRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSavedQueryRequest.newBuilder() to construct. - private GetSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSavedQueryRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSavedQueryRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetSavedQueryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GetSavedQueryRequest.class, com.google.cloud.asset.v1.GetSavedQueryRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the saved query and it must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the saved query and it must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.GetSavedQueryRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.GetSavedQueryRequest other = (com.google.cloud.asset.v1.GetSavedQueryRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.GetSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.GetSavedQueryRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to get a saved query.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.GetSavedQueryRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.GetSavedQueryRequest) - com.google.cloud.asset.v1.GetSavedQueryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.GetSavedQueryRequest.class, com.google.cloud.asset.v1.GetSavedQueryRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.GetSavedQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_GetSavedQueryRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetSavedQueryRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.GetSavedQueryRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetSavedQueryRequest build() { - com.google.cloud.asset.v1.GetSavedQueryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetSavedQueryRequest buildPartial() { - com.google.cloud.asset.v1.GetSavedQueryRequest result = new com.google.cloud.asset.v1.GetSavedQueryRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.GetSavedQueryRequest) { - return mergeFrom((com.google.cloud.asset.v1.GetSavedQueryRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.GetSavedQueryRequest other) { - if (other == com.google.cloud.asset.v1.GetSavedQueryRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.GetSavedQueryRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.GetSavedQueryRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the saved query and it must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the saved query and it must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the saved query and it must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the saved query and it must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the saved query and it must be in the format of:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.GetSavedQueryRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.GetSavedQueryRequest) - private static final com.google.cloud.asset.v1.GetSavedQueryRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.GetSavedQueryRequest(); - } - - public static com.google.cloud.asset.v1.GetSavedQueryRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSavedQueryRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSavedQueryRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.GetSavedQueryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java deleted file mode 100644 index 66de7ef847e8..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetSavedQueryRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface GetSavedQueryRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.GetSavedQueryRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the saved query and it must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the saved query and it must be in the format of:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java deleted file mode 100644 index c398706d67fb..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java +++ /dev/null @@ -1,3147 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Output configuration for export IAM policy analysis destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} - */ -public final class IamPolicyAnalysisOutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) - IamPolicyAnalysisOutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use IamPolicyAnalysisOutputConfig.newBuilder() to construct. - private IamPolicyAnalysisOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicyAnalysisOutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicyAnalysisOutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicyAnalysisOutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder.class); - } - - public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The uri of the Cloud Storage object. It's the same uri that is
-     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the analysis result.
-     * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-     * Required. The uri of the Cloud Storage object. It's the same uri that is
-     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the analysis result.
-     * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - } - /** - *
-   * A Cloud Storage location.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination} - */ - public static final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - GcsDestinationOrBuilder { - private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - uri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - *
-     * Required. The uri of the Cloud Storage object. It's the same uri that is
-     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the analysis result.
-     * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - *
-     * Required. The uri of the Cloud Storage object. It's the same uri that is
-     * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * If the specified Cloud Storage object already exists and there is no
-     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-     * overwritten with the analysis result.
-     * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination other = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) obj; - - if (!getUri() - .equals(other.getUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A Cloud Storage location.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination build() { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination result = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - *
-       * Required. The uri of the Cloud Storage object. It's the same uri that is
-       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-       * Editing Object
-       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-       * for more information.
-       * If the specified Cloud Storage object already exists and there is no
-       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-       * overwritten with the analysis result.
-       * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The uri of the Cloud Storage object. It's the same uri that is
-       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-       * Editing Object
-       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-       * for more information.
-       * If the specified Cloud Storage object already exists and there is no
-       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-       * overwritten with the analysis result.
-       * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The uri of the Cloud Storage object. It's the same uri that is
-       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-       * Editing Object
-       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-       * for more information.
-       * If the specified Cloud Storage object already exists and there is no
-       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-       * overwritten with the analysis result.
-       * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The uri of the Cloud Storage object. It's the same uri that is
-       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-       * Editing Object
-       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-       * for more information.
-       * If the specified Cloud Storage object already exists and there is no
-       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-       * overwritten with the analysis result.
-       * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - *
-       * Required. The uri of the Cloud Storage object. It's the same uri that is
-       * used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-       * Editing Object
-       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-       * for more information.
-       * If the specified Cloud Storage object already exists and there is no
-       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
-       * overwritten with the analysis result.
-       * 
- * - * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BigQueryDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the analysis results
-     * should be exported. If this dataset does not exist, the export call will
-     * return an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - java.lang.String getDataset(); - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the analysis results
-     * should be exported. If this dataset does not exist, the export call will
-     * return an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - com.google.protobuf.ByteString - getDatasetBytes(); - - /** - *
-     * Required. The prefix of the BigQuery tables to which the analysis results
-     * will be written. Tables will be created based on this table_prefix if not
-     * exist:
-     * * <table_prefix>_analysis table will contain export operation's metadata.
-     * * <table_prefix>_analysis_result will contain all the
-     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-     * When [partition_key] is specified, both tables will be partitioned based
-     * on the [partition_key].
-     * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tablePrefix. - */ - java.lang.String getTablePrefix(); - /** - *
-     * Required. The prefix of the BigQuery tables to which the analysis results
-     * will be written. Tables will be created based on this table_prefix if not
-     * exist:
-     * * <table_prefix>_analysis table will contain export operation's metadata.
-     * * <table_prefix>_analysis_result will contain all the
-     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-     * When [partition_key] is specified, both tables will be partitioned based
-     * on the [partition_key].
-     * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tablePrefix. - */ - com.google.protobuf.ByteString - getTablePrefixBytes(); - - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @return The enum numeric value on the wire for partitionKey. - */ - int getPartitionKeyValue(); - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @return The partitionKey. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey getPartitionKey(); - - /** - *
-     * Optional. Specifies the action that occurs if the destination table or
-     * partition already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * The default value is WRITE_APPEND. Each action is atomic and only occurs
-     * if BigQuery is able to complete the job successfully. Details are at
-     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-     * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The writeDisposition. - */ - java.lang.String getWriteDisposition(); - /** - *
-     * Optional. Specifies the action that occurs if the destination table or
-     * partition already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * The default value is WRITE_APPEND. Each action is atomic and only occurs
-     * if BigQuery is able to complete the job successfully. Details are at
-     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-     * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for writeDisposition. - */ - com.google.protobuf.ByteString - getWriteDispositionBytes(); - } - /** - *
-   * A BigQuery destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination} - */ - public static final class BigQueryDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - BigQueryDestinationOrBuilder { - private static final long serialVersionUID = 0L; - // Use BigQueryDestination.newBuilder() to construct. - private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryDestination() { - dataset_ = ""; - tablePrefix_ = ""; - partitionKey_ = 0; - writeDisposition_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - tablePrefix_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - - partitionKey_ = rawValue; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - writeDisposition_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder.class); - } - - /** - *
-     * This enum determines the partition key column for the bigquery tables.
-     * Partitioning can improve query performance and reduce query cost by
-     * filtering partitions. Refer to
-     * https://cloud.google.com/bigquery/docs/partitioned-tables for details.
-     * 
- * - * Protobuf enum {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey} - */ - public enum PartitionKey - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-       * Unspecified partition key. Tables won't be partitioned using this
-       * option.
-       * 
- * - * PARTITION_KEY_UNSPECIFIED = 0; - */ - PARTITION_KEY_UNSPECIFIED(0), - /** - *
-       * The time when the request is received. If specified as partition key,
-       * the result table(s) is partitoned by the RequestTime column, an
-       * additional timestamp column representing when the request was received.
-       * 
- * - * REQUEST_TIME = 1; - */ - REQUEST_TIME(1), - UNRECOGNIZED(-1), - ; - - /** - *
-       * Unspecified partition key. Tables won't be partitioned using this
-       * option.
-       * 
- * - * PARTITION_KEY_UNSPECIFIED = 0; - */ - public static final int PARTITION_KEY_UNSPECIFIED_VALUE = 0; - /** - *
-       * The time when the request is received. If specified as partition key,
-       * the result table(s) is partitoned by the RequestTime column, an
-       * additional timestamp column representing when the request was received.
-       * 
- * - * REQUEST_TIME = 1; - */ - public static final int REQUEST_TIME_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PartitionKey valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PartitionKey forNumber(int value) { - switch (value) { - case 0: return PARTITION_KEY_UNSPECIFIED; - case 1: return REQUEST_TIME; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PartitionKey> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PartitionKey findValueByNumber(int number) { - return PartitionKey.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDescriptor().getEnumTypes().get(0); - } - - private static final PartitionKey[] VALUES = values(); - - public static PartitionKey valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PartitionKey(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey) - } - - public static final int DATASET_FIELD_NUMBER = 1; - private volatile java.lang.Object dataset_; - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the analysis results
-     * should be exported. If this dataset does not exist, the export call will
-     * return an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - @java.lang.Override - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the analysis results
-     * should be exported. If this dataset does not exist, the export call will
-     * return an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_PREFIX_FIELD_NUMBER = 2; - private volatile java.lang.Object tablePrefix_; - /** - *
-     * Required. The prefix of the BigQuery tables to which the analysis results
-     * will be written. Tables will be created based on this table_prefix if not
-     * exist:
-     * * <table_prefix>_analysis table will contain export operation's metadata.
-     * * <table_prefix>_analysis_result will contain all the
-     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-     * When [partition_key] is specified, both tables will be partitioned based
-     * on the [partition_key].
-     * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tablePrefix. - */ - @java.lang.Override - public java.lang.String getTablePrefix() { - java.lang.Object ref = tablePrefix_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tablePrefix_ = s; - return s; - } - } - /** - *
-     * Required. The prefix of the BigQuery tables to which the analysis results
-     * will be written. Tables will be created based on this table_prefix if not
-     * exist:
-     * * <table_prefix>_analysis table will contain export operation's metadata.
-     * * <table_prefix>_analysis_result will contain all the
-     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-     * When [partition_key] is specified, both tables will be partitioned based
-     * on the [partition_key].
-     * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tablePrefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTablePrefixBytes() { - java.lang.Object ref = tablePrefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tablePrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARTITION_KEY_FIELD_NUMBER = 3; - private int partitionKey_; - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @return The enum numeric value on the wire for partitionKey. - */ - @java.lang.Override public int getPartitionKeyValue() { - return partitionKey_; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @return The partitionKey. - */ - @java.lang.Override public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey getPartitionKey() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey result = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.valueOf(partitionKey_); - return result == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.UNRECOGNIZED : result; - } - - public static final int WRITE_DISPOSITION_FIELD_NUMBER = 4; - private volatile java.lang.Object writeDisposition_; - /** - *
-     * Optional. Specifies the action that occurs if the destination table or
-     * partition already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * The default value is WRITE_APPEND. Each action is atomic and only occurs
-     * if BigQuery is able to complete the job successfully. Details are at
-     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-     * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The writeDisposition. - */ - @java.lang.Override - public java.lang.String getWriteDisposition() { - java.lang.Object ref = writeDisposition_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - writeDisposition_ = s; - return s; - } - } - /** - *
-     * Optional. Specifies the action that occurs if the destination table or
-     * partition already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * The default value is WRITE_APPEND. Each action is atomic and only occurs
-     * if BigQuery is able to complete the job successfully. Details are at
-     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-     * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for writeDisposition. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWriteDispositionBytes() { - java.lang.Object ref = writeDisposition_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - writeDisposition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tablePrefix_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tablePrefix_); - } - if (partitionKey_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { - output.writeEnum(3, partitionKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, writeDisposition_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tablePrefix_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tablePrefix_); - } - if (partitionKey_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, partitionKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, writeDisposition_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination other = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) obj; - - if (!getDataset() - .equals(other.getDataset())) return false; - if (!getTablePrefix() - .equals(other.getTablePrefix())) return false; - if (partitionKey_ != other.partitionKey_) return false; - if (!getWriteDisposition() - .equals(other.getWriteDisposition())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - hash = (37 * hash) + TABLE_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getTablePrefix().hashCode(); - hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; - hash = (53 * hash) + partitionKey_; - hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER; - hash = (53 * hash) + getWriteDisposition().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A BigQuery destination.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - dataset_ = ""; - - tablePrefix_ = ""; - - partitionKey_ = 0; - - writeDisposition_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination build() { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination result = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination(this); - result.dataset_ = dataset_; - result.tablePrefix_ = tablePrefix_; - result.partitionKey_ = partitionKey_; - result.writeDisposition_ = writeDisposition_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance()) return this; - if (!other.getDataset().isEmpty()) { - dataset_ = other.dataset_; - onChanged(); - } - if (!other.getTablePrefix().isEmpty()) { - tablePrefix_ = other.tablePrefix_; - onChanged(); - } - if (other.partitionKey_ != 0) { - setPartitionKeyValue(other.getPartitionKeyValue()); - } - if (!other.getWriteDisposition().isEmpty()) { - writeDisposition_ = other.writeDisposition_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object dataset_ = ""; - /** - *
-       * Required. The BigQuery dataset in format
-       * "projects/projectId/datasets/datasetId", to which the analysis results
-       * should be exported. If this dataset does not exist, the export call will
-       * return an INVALID_ARGUMENT error.
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The BigQuery dataset in format
-       * "projects/projectId/datasets/datasetId", to which the analysis results
-       * should be exported. If this dataset does not exist, the export call will
-       * return an INVALID_ARGUMENT error.
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The BigQuery dataset in format
-       * "projects/projectId/datasets/datasetId", to which the analysis results
-       * should be exported. If this dataset does not exist, the export call will
-       * return an INVALID_ARGUMENT error.
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The dataset to set. - * @return This builder for chaining. - */ - public Builder setDataset( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataset_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The BigQuery dataset in format
-       * "projects/projectId/datasets/datasetId", to which the analysis results
-       * should be exported. If this dataset does not exist, the export call will
-       * return an INVALID_ARGUMENT error.
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearDataset() { - - dataset_ = getDefaultInstance().getDataset(); - onChanged(); - return this; - } - /** - *
-       * Required. The BigQuery dataset in format
-       * "projects/projectId/datasets/datasetId", to which the analysis results
-       * should be exported. If this dataset does not exist, the export call will
-       * return an INVALID_ARGUMENT error.
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for dataset to set. - * @return This builder for chaining. - */ - public Builder setDatasetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataset_ = value; - onChanged(); - return this; - } - - private java.lang.Object tablePrefix_ = ""; - /** - *
-       * Required. The prefix of the BigQuery tables to which the analysis results
-       * will be written. Tables will be created based on this table_prefix if not
-       * exist:
-       * * <table_prefix>_analysis table will contain export operation's metadata.
-       * * <table_prefix>_analysis_result will contain all the
-       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-       * When [partition_key] is specified, both tables will be partitioned based
-       * on the [partition_key].
-       * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The tablePrefix. - */ - public java.lang.String getTablePrefix() { - java.lang.Object ref = tablePrefix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - tablePrefix_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The prefix of the BigQuery tables to which the analysis results
-       * will be written. Tables will be created based on this table_prefix if not
-       * exist:
-       * * <table_prefix>_analysis table will contain export operation's metadata.
-       * * <table_prefix>_analysis_result will contain all the
-       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-       * When [partition_key] is specified, both tables will be partitioned based
-       * on the [partition_key].
-       * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for tablePrefix. - */ - public com.google.protobuf.ByteString - getTablePrefixBytes() { - java.lang.Object ref = tablePrefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - tablePrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The prefix of the BigQuery tables to which the analysis results
-       * will be written. Tables will be created based on this table_prefix if not
-       * exist:
-       * * <table_prefix>_analysis table will contain export operation's metadata.
-       * * <table_prefix>_analysis_result will contain all the
-       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-       * When [partition_key] is specified, both tables will be partitioned based
-       * on the [partition_key].
-       * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The tablePrefix to set. - * @return This builder for chaining. - */ - public Builder setTablePrefix( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - tablePrefix_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The prefix of the BigQuery tables to which the analysis results
-       * will be written. Tables will be created based on this table_prefix if not
-       * exist:
-       * * <table_prefix>_analysis table will contain export operation's metadata.
-       * * <table_prefix>_analysis_result will contain all the
-       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-       * When [partition_key] is specified, both tables will be partitioned based
-       * on the [partition_key].
-       * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearTablePrefix() { - - tablePrefix_ = getDefaultInstance().getTablePrefix(); - onChanged(); - return this; - } - /** - *
-       * Required. The prefix of the BigQuery tables to which the analysis results
-       * will be written. Tables will be created based on this table_prefix if not
-       * exist:
-       * * <table_prefix>_analysis table will contain export operation's metadata.
-       * * <table_prefix>_analysis_result will contain all the
-       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult].
-       * When [partition_key] is specified, both tables will be partitioned based
-       * on the [partition_key].
-       * 
- * - * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for tablePrefix to set. - * @return This builder for chaining. - */ - public Builder setTablePrefixBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - tablePrefix_ = value; - onChanged(); - return this; - } - - private int partitionKey_ = 0; - /** - *
-       * The partition key for BigQuery partitioned table.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @return The enum numeric value on the wire for partitionKey. - */ - @java.lang.Override public int getPartitionKeyValue() { - return partitionKey_; - } - /** - *
-       * The partition key for BigQuery partitioned table.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @param value The enum numeric value on the wire for partitionKey to set. - * @return This builder for chaining. - */ - public Builder setPartitionKeyValue(int value) { - - partitionKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The partition key for BigQuery partitioned table.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @return The partitionKey. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey getPartitionKey() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey result = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.valueOf(partitionKey_); - return result == null ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey.UNRECOGNIZED : result; - } - /** - *
-       * The partition key for BigQuery partitioned table.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @param value The partitionKey to set. - * @return This builder for chaining. - */ - public Builder setPartitionKey(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey value) { - if (value == null) { - throw new NullPointerException(); - } - - partitionKey_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The partition key for BigQuery partitioned table.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; - * @return This builder for chaining. - */ - public Builder clearPartitionKey() { - - partitionKey_ = 0; - onChanged(); - return this; - } - - private java.lang.Object writeDisposition_ = ""; - /** - *
-       * Optional. Specifies the action that occurs if the destination table or
-       * partition already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * The default value is WRITE_APPEND. Each action is atomic and only occurs
-       * if BigQuery is able to complete the job successfully. Details are at
-       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-       * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The writeDisposition. - */ - public java.lang.String getWriteDisposition() { - java.lang.Object ref = writeDisposition_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - writeDisposition_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Optional. Specifies the action that occurs if the destination table or
-       * partition already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * The default value is WRITE_APPEND. Each action is atomic and only occurs
-       * if BigQuery is able to complete the job successfully. Details are at
-       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-       * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for writeDisposition. - */ - public com.google.protobuf.ByteString - getWriteDispositionBytes() { - java.lang.Object ref = writeDisposition_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - writeDisposition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Optional. Specifies the action that occurs if the destination table or
-       * partition already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * The default value is WRITE_APPEND. Each action is atomic and only occurs
-       * if BigQuery is able to complete the job successfully. Details are at
-       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-       * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The writeDisposition to set. - * @return This builder for chaining. - */ - public Builder setWriteDisposition( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - writeDisposition_ = value; - onChanged(); - return this; - } - /** - *
-       * Optional. Specifies the action that occurs if the destination table or
-       * partition already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * The default value is WRITE_APPEND. Each action is atomic and only occurs
-       * if BigQuery is able to complete the job successfully. Details are at
-       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-       * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearWriteDisposition() { - - writeDisposition_ = getDefaultInstance().getWriteDisposition(); - onChanged(); - return this; - } - /** - *
-       * Optional. Specifies the action that occurs if the destination table or
-       * partition already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * The default value is WRITE_APPEND. Each action is atomic and only occurs
-       * if BigQuery is able to complete the job successfully. Details are at
-       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
-       * 
- * - * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for writeDisposition to set. - * @return This builder for chaining. - */ - public Builder setWriteDispositionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - writeDisposition_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - public enum DestinationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_DESTINATION(1), - BIGQUERY_DESTINATION(2), - DESTINATION_NOT_SET(0); - private final int value; - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: return GCS_DESTINATION; - case 2: return BIGQUERY_DESTINATION; - case 0: return DESTINATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); - } - - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; - /** - *
-   * Destination on BigQuery.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - *
-   * Destination on BigQuery.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getBigqueryDestination() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); - } - /** - *
-   * Destination on BigQuery.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - output.writeMessage(2, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig other = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - break; - case 2: - if (!getBigqueryDestination() - .equals(other.getBigqueryDestination())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 2: - hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output configuration for export IAM policy analysis destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.class, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig build() { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig result = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - if (destinationCase_ == 2) { - if (bigqueryDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = bigqueryDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case GCS_DESTINATION: { - mergeGcsDestination(other.getGcsDestination()); - break; - } - case BIGQUERY_DESTINATION: { - mergeBigqueryDestination(other.getBigqueryDestination()); - break; - } - case DESTINATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int destinationCase_ = 0; - private java.lang.Object destination_; - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 && - destination_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.newBuilder((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - gcsDestinationBuilder_.mergeFrom(value); - } else { - gcsDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - gcsDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder>( - (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged();; - return gcsDestinationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 2) { - return bigqueryDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - public Builder mergeBigqueryDestination(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2 && - destination_ != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.newBuilder((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 2) { - bigqueryDestinationBuilder_.mergeFrom(value); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - } - bigqueryDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder getBigqueryDestinationBuilder() { - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on BigQuery.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - if (!(destinationCase_ == 2)) { - destination_ = com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.getDefaultInstance(); - } - bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder>( - (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 2; - onChanged();; - return bigqueryDestinationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicyAnalysisOutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisOutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java deleted file mode 100644 index 044214c54096..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface IamPolicyAnalysisOutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - *
-   * Destination on BigQuery.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - *
-   * Destination on BigQuery.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination getBigqueryDestination(); - /** - *
-   * Destination on BigQuery.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); - - public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.DestinationCase getDestinationCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java deleted file mode 100644 index ae9b40063086..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java +++ /dev/null @@ -1,6302 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * IAM policy analysis query message.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} - */ -public final class IamPolicyAnalysisQuery extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) - IamPolicyAnalysisQueryOrBuilder { -private static final long serialVersionUID = 0L; - // Use IamPolicyAnalysisQuery.newBuilder() to construct. - private IamPolicyAnalysisQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicyAnalysisQuery() { - scope_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicyAnalysisQuery(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicyAnalysisQuery( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - scope_ = s; - break; - } - case 18: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder subBuilder = null; - if (resourceSelector_ != null) { - subBuilder = resourceSelector_.toBuilder(); - } - resourceSelector_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceSelector_); - resourceSelector_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder subBuilder = null; - if (identitySelector_ != null) { - subBuilder = identitySelector_.toBuilder(); - } - identitySelector_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(identitySelector_); - identitySelector_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder subBuilder = null; - if (accessSelector_ != null) { - subBuilder = accessSelector_.toBuilder(); - } - accessSelector_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(accessSelector_); - accessSelector_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder subBuilder = null; - if (options_ != null) { - subBuilder = options_.toBuilder(); - } - options_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(options_); - options_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder subBuilder = null; - if (conditionContext_ != null) { - subBuilder = conditionContext_.toBuilder(); - } - conditionContext_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(conditionContext_); - conditionContext_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); - } - - public interface ResourceSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The [full resource name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of a resource of [supported resource
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-     * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The fullResourceName. - */ - java.lang.String getFullResourceName(); - /** - *
-     * Required. The [full resource name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of a resource of [supported resource
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-     * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fullResourceName. - */ - com.google.protobuf.ByteString - getFullResourceNameBytes(); - } - /** - *
-   * Specifies the resource to analyze for access policies, which may be set
-   * directly on the resource, or on ancestors such as organizations, folders or
-   * projects.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} - */ - public static final class ResourceSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) - ResourceSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use ResourceSelector.newBuilder() to construct. - private ResourceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ResourceSelector() { - fullResourceName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ResourceSelector(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ResourceSelector( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - fullResourceName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); - } - - public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object fullResourceName_; - /** - *
-     * Required. The [full resource name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of a resource of [supported resource
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-     * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The fullResourceName. - */ - @java.lang.Override - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } - } - /** - *
-     * Required. The [full resource name]
-     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of a resource of [supported resource
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-     * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fullResourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) obj; - - if (!getFullResourceName() - .equals(other.getFullResourceName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFullResourceName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Specifies the resource to analyze for access policies, which may be set
-     * directly on the resource, or on ancestors such as organizations, folders or
-     * projects.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - fullResourceName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector build() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(this); - result.fullResourceName_ = fullResourceName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance()) return this; - if (!other.getFullResourceName().isEmpty()) { - fullResourceName_ = other.fullResourceName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object fullResourceName_ = ""; - /** - *
-       * Required. The [full resource name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * of a resource of [supported resource
-       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-       * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The fullResourceName. - */ - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The [full resource name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * of a resource of [supported resource
-       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-       * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for fullResourceName. - */ - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The [full resource name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * of a resource of [supported resource
-       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-       * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fullResourceName_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The [full resource name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * of a resource of [supported resource
-       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-       * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearFullResourceName() { - - fullResourceName_ = getDefaultInstance().getFullResourceName(); - onChanged(); - return this; - } - /** - *
-       * Required. The [full resource name]
-       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * of a resource of [supported resource
-       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
-       * 
- * - * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fullResourceName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResourceSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceSelector(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IdentitySelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The identity appear in the form of principals in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-     * The examples of supported forms are:
-     * "user:mike@example.com",
-     * "group:admins@example.com",
-     * "domain:google.com",
-     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-     * Notice that wildcard characters (such as * and ?) are not supported.
-     * You must give a specific identity.
-     * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The identity. - */ - java.lang.String getIdentity(); - /** - *
-     * Required. The identity appear in the form of principals in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-     * The examples of supported forms are:
-     * "user:mike@example.com",
-     * "group:admins@example.com",
-     * "domain:google.com",
-     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-     * Notice that wildcard characters (such as * and ?) are not supported.
-     * You must give a specific identity.
-     * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for identity. - */ - com.google.protobuf.ByteString - getIdentityBytes(); - } - /** - *
-   * Specifies an identity for which to determine resource access, based on
-   * roles assigned either directly to them or to the groups they belong to,
-   * directly or indirectly.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} - */ - public static final class IdentitySelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) - IdentitySelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use IdentitySelector.newBuilder() to construct. - private IdentitySelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IdentitySelector() { - identity_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IdentitySelector(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IdentitySelector( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - identity_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); - } - - public static final int IDENTITY_FIELD_NUMBER = 1; - private volatile java.lang.Object identity_; - /** - *
-     * Required. The identity appear in the form of principals in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-     * The examples of supported forms are:
-     * "user:mike@example.com",
-     * "group:admins@example.com",
-     * "domain:google.com",
-     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-     * Notice that wildcard characters (such as * and ?) are not supported.
-     * You must give a specific identity.
-     * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The identity. - */ - @java.lang.Override - public java.lang.String getIdentity() { - java.lang.Object ref = identity_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - identity_ = s; - return s; - } - } - /** - *
-     * Required. The identity appear in the form of principals in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-     * The examples of supported forms are:
-     * "user:mike@example.com",
-     * "group:admins@example.com",
-     * "domain:google.com",
-     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-     * Notice that wildcard characters (such as * and ?) are not supported.
-     * You must give a specific identity.
-     * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for identity. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdentityBytes() { - java.lang.Object ref = identity_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - identity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identity_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(identity_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identity_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) obj; - - if (!getIdentity() - .equals(other.getIdentity())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + IDENTITY_FIELD_NUMBER; - hash = (53 * hash) + getIdentity().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Specifies an identity for which to determine resource access, based on
-     * roles assigned either directly to them or to the groups they belong to,
-     * directly or indirectly.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - identity_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector build() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(this); - result.identity_ = identity_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance()) return this; - if (!other.getIdentity().isEmpty()) { - identity_ = other.identity_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object identity_ = ""; - /** - *
-       * Required. The identity appear in the form of principals in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-       * The examples of supported forms are:
-       * "user:mike@example.com",
-       * "group:admins@example.com",
-       * "domain:google.com",
-       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-       * Notice that wildcard characters (such as * and ?) are not supported.
-       * You must give a specific identity.
-       * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The identity. - */ - public java.lang.String getIdentity() { - java.lang.Object ref = identity_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - identity_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The identity appear in the form of principals in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-       * The examples of supported forms are:
-       * "user:mike@example.com",
-       * "group:admins@example.com",
-       * "domain:google.com",
-       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-       * Notice that wildcard characters (such as * and ?) are not supported.
-       * You must give a specific identity.
-       * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for identity. - */ - public com.google.protobuf.ByteString - getIdentityBytes() { - java.lang.Object ref = identity_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - identity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The identity appear in the form of principals in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-       * The examples of supported forms are:
-       * "user:mike@example.com",
-       * "group:admins@example.com",
-       * "domain:google.com",
-       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-       * Notice that wildcard characters (such as * and ?) are not supported.
-       * You must give a specific identity.
-       * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The identity to set. - * @return This builder for chaining. - */ - public Builder setIdentity( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - identity_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The identity appear in the form of principals in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-       * The examples of supported forms are:
-       * "user:mike@example.com",
-       * "group:admins@example.com",
-       * "domain:google.com",
-       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-       * Notice that wildcard characters (such as * and ?) are not supported.
-       * You must give a specific identity.
-       * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearIdentity() { - - identity_ = getDefaultInstance().getIdentity(); - onChanged(); - return this; - } - /** - *
-       * Required. The identity appear in the form of principals in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
-       * The examples of supported forms are:
-       * "user:mike@example.com",
-       * "group:admins@example.com",
-       * "domain:google.com",
-       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
-       * Notice that wildcard characters (such as * and ?) are not supported.
-       * You must give a specific identity.
-       * 
- * - * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for identity to set. - * @return This builder for chaining. - */ - public Builder setIdentityBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - identity_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IdentitySelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IdentitySelector(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AccessSelectorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the roles. - */ - java.util.List - getRolesList(); - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of roles. - */ - int getRolesCount(); - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The roles at the given index. - */ - java.lang.String getRoles(int index); - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the roles at the given index. - */ - com.google.protobuf.ByteString - getRolesBytes(int index); - - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the permissions. - */ - java.util.List - getPermissionsList(); - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of permissions. - */ - int getPermissionsCount(); - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - java.lang.String getPermissions(int index); - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - com.google.protobuf.ByteString - getPermissionsBytes(int index); - } - /** - *
-   * Specifies roles and/or permissions to analyze, to determine both the
-   * identities possessing them and the resources they control. If multiple
-   * values are specified, results will include roles or permissions matching
-   * any of them. The total number of roles and permissions should be equal or
-   * less than 10.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} - */ - public static final class AccessSelector extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) - AccessSelectorOrBuilder { - private static final long serialVersionUID = 0L; - // Use AccessSelector.newBuilder() to construct. - private AccessSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AccessSelector() { - roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AccessSelector(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AccessSelector( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - roles_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - roles_.add(s); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - permissions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - roles_ = roles_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); - } - - public static final int ROLES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList roles_; - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the roles. - */ - public com.google.protobuf.ProtocolStringList - getRolesList() { - return roles_; - } - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of roles. - */ - public int getRolesCount() { - return roles_.size(); - } - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The roles at the given index. - */ - public java.lang.String getRoles(int index) { - return roles_.get(index); - } - /** - *
-     * Optional. The roles to appear in result.
-     * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the roles at the given index. - */ - public com.google.protobuf.ByteString - getRolesBytes(int index) { - return roles_.getByteString(index); - } - - public static final int PERMISSIONS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList permissions_; - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList - getPermissionsList() { - return permissions_; - } - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - *
-     * Optional. The permissions to appear in result.
-     * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString - getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < roles_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, roles_.getRaw(i)); - } - for (int i = 0; i < permissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < roles_.size(); i++) { - dataSize += computeStringSizeNoTag(roles_.getRaw(i)); - } - size += dataSize; - size += 1 * getRolesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < permissions_.size(); i++) { - dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getPermissionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) obj; - - if (!getRolesList() - .equals(other.getRolesList())) return false; - if (!getPermissionsList() - .equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRolesCount() > 0) { - hash = (37 * hash) + ROLES_FIELD_NUMBER; - hash = (53 * hash) + getRolesList().hashCode(); - } - if (getPermissionsCount() > 0) { - hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getPermissionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Specifies roles and/or permissions to analyze, to determine both the
-     * identities possessing them and the resources they control. If multiple
-     * values are specified, results will include roles or permissions matching
-     * any of them. The total number of roles and permissions should be equal or
-     * less than 10.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector build() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - roles_ = roles_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.roles_ = roles_; - if (((bitField0_ & 0x00000002) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.permissions_ = permissions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()) return this; - if (!other.roles_.isEmpty()) { - if (roles_.isEmpty()) { - roles_ = other.roles_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRolesIsMutable(); - roles_.addAll(other.roles_); - } - onChanged(); - } - if (!other.permissions_.isEmpty()) { - if (permissions_.isEmpty()) { - permissions_ = other.permissions_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePermissionsIsMutable(); - permissions_.addAll(other.permissions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRolesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - roles_ = new com.google.protobuf.LazyStringArrayList(roles_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the roles. - */ - public com.google.protobuf.ProtocolStringList - getRolesList() { - return roles_.getUnmodifiableView(); - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of roles. - */ - public int getRolesCount() { - return roles_.size(); - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The roles at the given index. - */ - public java.lang.String getRoles(int index) { - return roles_.get(index); - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the roles at the given index. - */ - public com.google.protobuf.ByteString - getRolesBytes(int index) { - return roles_.getByteString(index); - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index to set the value at. - * @param value The roles to set. - * @return This builder for chaining. - */ - public Builder setRoles( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRolesIsMutable(); - roles_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The roles to add. - * @return This builder for chaining. - */ - public Builder addRoles( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRolesIsMutable(); - roles_.add(value); - onChanged(); - return this; - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param values The roles to add. - * @return This builder for chaining. - */ - public Builder addAllRoles( - java.lang.Iterable values) { - ensureRolesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, roles_); - onChanged(); - return this; - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearRoles() { - roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Optional. The roles to appear in result.
-       * 
- * - * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes of the roles to add. - * @return This builder for chaining. - */ - public Builder addRolesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRolesIsMutable(); - roles_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensurePermissionsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList - getPermissionsList() { - return permissions_.getUnmodifiableView(); - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString - getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index to set the value at. - * @param value The permissions to set. - * @return This builder for chaining. - */ - public Builder setPermissions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param values The permissions to add. - * @return This builder for chaining. - */ - public Builder addAllPermissions( - java.lang.Iterable values) { - ensurePermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, permissions_); - onChanged(); - return this; - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPermissions() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * Optional. The permissions to appear in result.
-       * 
- * - * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes of the permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AccessSelector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AccessSelector(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface OptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Optional. If true, the identities section of the result will expand any
-     * Google groups appearing in an IAM policy binding.
-     * If
-     * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
-     * is specified, the identity in the result will be determined by the
-     * selector, and this flag is not allowed to set.
-     * If true, the default max expansion per group is 1000 for
-     * AssetService.AnalyzeIamPolicy][].
-     * Default is false.
-     * 
- * - * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandGroups. - */ - boolean getExpandGroups(); - - /** - *
-     * Optional. If true, the access section of result will expand any roles
-     * appearing in IAM policy bindings to include their permissions.
-     * If
-     * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
-     * is specified, the access section of the result will be determined by the
-     * selector, and this flag is not allowed to set.
-     * Default is false.
-     * 
- * - * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandRoles. - */ - boolean getExpandRoles(); - - /** - *
-     * Optional. If true and
-     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-     * is not specified, the resource section of the result will expand any
-     * resource attached to an IAM policy to include resources lower in the
-     * resource hierarchy.
-     * For example, if the request analyzes for which resources user A has
-     * permission P, and the results include an IAM policy with P on a GCP
-     * folder, the results will also include resources in that folder with
-     * permission P.
-     * If true and
-     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-     * is specified, the resource section of the result will expand the
-     * specified resource to include resources lower in the resource hierarchy.
-     * Only project or lower resources are supported. Folder and organization
-     * resource cannot be used together with this option.
-     * For example, if the request analyzes for which users have permission P on
-     * a GCP project with this option enabled, the results will include all
-     * users who have permission P on that project or any lower resource.
-     * If true, the default max expansion per resource is 1000 for
-     * AssetService.AnalyzeIamPolicy][] and 100000 for
-     * AssetService.AnalyzeIamPolicyLongrunning][].
-     * Default is false.
-     * 
- * - * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandResources. - */ - boolean getExpandResources(); - - /** - *
-     * Optional. If true, the result will output the relevant parent/child
-     * relationships between resources. Default is false.
-     * 
- * - * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputResourceEdges. - */ - boolean getOutputResourceEdges(); - - /** - *
-     * Optional. If true, the result will output the relevant membership
-     * relationships between groups and other groups, and between groups and
-     * principals. Default is false.
-     * 
- * - * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputGroupEdges. - */ - boolean getOutputGroupEdges(); - - /** - *
-     * Optional. If true, the response will include access analysis from
-     * identities to resources via service account impersonation. This is a very
-     * expensive operation, because many derived queries will be executed. We
-     * highly recommend you use
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc instead.
-     * For example, if the request analyzes for which resources user A has
-     * permission P, and there's an IAM policy states user A has
-     * iam.serviceAccounts.getAccessToken permission to a service account SA,
-     * and there's another IAM policy states service account SA has permission P
-     * to a GCP folder F, then user A potentially has access to the GCP folder
-     * F. And those advanced analysis results will be included in
-     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-     * Another example, if the request analyzes for who has
-     * permission P to a GCP folder F, and there's an IAM policy states user A
-     * has iam.serviceAccounts.actAs permission to a service account SA, and
-     * there's another IAM policy states service account SA has permission P to
-     * the GCP folder F, then user A potentially has access to the GCP folder
-     * F. And those advanced analysis results will be included in
-     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-     * Only the following permissions are considered in this analysis:
-     * * `iam.serviceAccounts.actAs`
-     * * `iam.serviceAccounts.signBlob`
-     * * `iam.serviceAccounts.signJwt`
-     * * `iam.serviceAccounts.getAccessToken`
-     * * `iam.serviceAccounts.getOpenIdToken`
-     * * `iam.serviceAccounts.implicitDelegation`
-     * Default is false.
-     * 
- * - * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The analyzeServiceAccountImpersonation. - */ - boolean getAnalyzeServiceAccountImpersonation(); - } - /** - *
-   * Contains query options.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} - */ - public static final class Options extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) - OptionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use Options.newBuilder() to construct. - private Options(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Options() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Options(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Options( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - expandGroups_ = input.readBool(); - break; - } - case 16: { - - expandRoles_ = input.readBool(); - break; - } - case 24: { - - expandResources_ = input.readBool(); - break; - } - case 32: { - - outputResourceEdges_ = input.readBool(); - break; - } - case 40: { - - outputGroupEdges_ = input.readBool(); - break; - } - case 48: { - - analyzeServiceAccountImpersonation_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); - } - - public static final int EXPAND_GROUPS_FIELD_NUMBER = 1; - private boolean expandGroups_; - /** - *
-     * Optional. If true, the identities section of the result will expand any
-     * Google groups appearing in an IAM policy binding.
-     * If
-     * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
-     * is specified, the identity in the result will be determined by the
-     * selector, and this flag is not allowed to set.
-     * If true, the default max expansion per group is 1000 for
-     * AssetService.AnalyzeIamPolicy][].
-     * Default is false.
-     * 
- * - * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandGroups. - */ - @java.lang.Override - public boolean getExpandGroups() { - return expandGroups_; - } - - public static final int EXPAND_ROLES_FIELD_NUMBER = 2; - private boolean expandRoles_; - /** - *
-     * Optional. If true, the access section of result will expand any roles
-     * appearing in IAM policy bindings to include their permissions.
-     * If
-     * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
-     * is specified, the access section of the result will be determined by the
-     * selector, and this flag is not allowed to set.
-     * Default is false.
-     * 
- * - * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandRoles. - */ - @java.lang.Override - public boolean getExpandRoles() { - return expandRoles_; - } - - public static final int EXPAND_RESOURCES_FIELD_NUMBER = 3; - private boolean expandResources_; - /** - *
-     * Optional. If true and
-     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-     * is not specified, the resource section of the result will expand any
-     * resource attached to an IAM policy to include resources lower in the
-     * resource hierarchy.
-     * For example, if the request analyzes for which resources user A has
-     * permission P, and the results include an IAM policy with P on a GCP
-     * folder, the results will also include resources in that folder with
-     * permission P.
-     * If true and
-     * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-     * is specified, the resource section of the result will expand the
-     * specified resource to include resources lower in the resource hierarchy.
-     * Only project or lower resources are supported. Folder and organization
-     * resource cannot be used together with this option.
-     * For example, if the request analyzes for which users have permission P on
-     * a GCP project with this option enabled, the results will include all
-     * users who have permission P on that project or any lower resource.
-     * If true, the default max expansion per resource is 1000 for
-     * AssetService.AnalyzeIamPolicy][] and 100000 for
-     * AssetService.AnalyzeIamPolicyLongrunning][].
-     * Default is false.
-     * 
- * - * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandResources. - */ - @java.lang.Override - public boolean getExpandResources() { - return expandResources_; - } - - public static final int OUTPUT_RESOURCE_EDGES_FIELD_NUMBER = 4; - private boolean outputResourceEdges_; - /** - *
-     * Optional. If true, the result will output the relevant parent/child
-     * relationships between resources. Default is false.
-     * 
- * - * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputResourceEdges. - */ - @java.lang.Override - public boolean getOutputResourceEdges() { - return outputResourceEdges_; - } - - public static final int OUTPUT_GROUP_EDGES_FIELD_NUMBER = 5; - private boolean outputGroupEdges_; - /** - *
-     * Optional. If true, the result will output the relevant membership
-     * relationships between groups and other groups, and between groups and
-     * principals. Default is false.
-     * 
- * - * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputGroupEdges. - */ - @java.lang.Override - public boolean getOutputGroupEdges() { - return outputGroupEdges_; - } - - public static final int ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER = 6; - private boolean analyzeServiceAccountImpersonation_; - /** - *
-     * Optional. If true, the response will include access analysis from
-     * identities to resources via service account impersonation. This is a very
-     * expensive operation, because many derived queries will be executed. We
-     * highly recommend you use
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc instead.
-     * For example, if the request analyzes for which resources user A has
-     * permission P, and there's an IAM policy states user A has
-     * iam.serviceAccounts.getAccessToken permission to a service account SA,
-     * and there's another IAM policy states service account SA has permission P
-     * to a GCP folder F, then user A potentially has access to the GCP folder
-     * F. And those advanced analysis results will be included in
-     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-     * Another example, if the request analyzes for who has
-     * permission P to a GCP folder F, and there's an IAM policy states user A
-     * has iam.serviceAccounts.actAs permission to a service account SA, and
-     * there's another IAM policy states service account SA has permission P to
-     * the GCP folder F, then user A potentially has access to the GCP folder
-     * F. And those advanced analysis results will be included in
-     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-     * Only the following permissions are considered in this analysis:
-     * * `iam.serviceAccounts.actAs`
-     * * `iam.serviceAccounts.signBlob`
-     * * `iam.serviceAccounts.signJwt`
-     * * `iam.serviceAccounts.getAccessToken`
-     * * `iam.serviceAccounts.getOpenIdToken`
-     * * `iam.serviceAccounts.implicitDelegation`
-     * Default is false.
-     * 
- * - * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The analyzeServiceAccountImpersonation. - */ - @java.lang.Override - public boolean getAnalyzeServiceAccountImpersonation() { - return analyzeServiceAccountImpersonation_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (expandGroups_ != false) { - output.writeBool(1, expandGroups_); - } - if (expandRoles_ != false) { - output.writeBool(2, expandRoles_); - } - if (expandResources_ != false) { - output.writeBool(3, expandResources_); - } - if (outputResourceEdges_ != false) { - output.writeBool(4, outputResourceEdges_); - } - if (outputGroupEdges_ != false) { - output.writeBool(5, outputGroupEdges_); - } - if (analyzeServiceAccountImpersonation_ != false) { - output.writeBool(6, analyzeServiceAccountImpersonation_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (expandGroups_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, expandGroups_); - } - if (expandRoles_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, expandRoles_); - } - if (expandResources_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, expandResources_); - } - if (outputResourceEdges_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, outputResourceEdges_); - } - if (outputGroupEdges_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, outputGroupEdges_); - } - if (analyzeServiceAccountImpersonation_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, analyzeServiceAccountImpersonation_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) obj; - - if (getExpandGroups() - != other.getExpandGroups()) return false; - if (getExpandRoles() - != other.getExpandRoles()) return false; - if (getExpandResources() - != other.getExpandResources()) return false; - if (getOutputResourceEdges() - != other.getOutputResourceEdges()) return false; - if (getOutputGroupEdges() - != other.getOutputGroupEdges()) return false; - if (getAnalyzeServiceAccountImpersonation() - != other.getAnalyzeServiceAccountImpersonation()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EXPAND_GROUPS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getExpandGroups()); - hash = (37 * hash) + EXPAND_ROLES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getExpandRoles()); - hash = (37 * hash) + EXPAND_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getExpandResources()); - hash = (37 * hash) + OUTPUT_RESOURCE_EDGES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getOutputResourceEdges()); - hash = (37 * hash) + OUTPUT_GROUP_EDGES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getOutputGroupEdges()); - hash = (37 * hash) + ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getAnalyzeServiceAccountImpersonation()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Contains query options.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - expandGroups_ = false; - - expandRoles_ = false; - - expandResources_ = false; - - outputResourceEdges_ = false; - - outputGroupEdges_ = false; - - analyzeServiceAccountImpersonation_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options build() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(this); - result.expandGroups_ = expandGroups_; - result.expandRoles_ = expandRoles_; - result.expandResources_ = expandResources_; - result.outputResourceEdges_ = outputResourceEdges_; - result.outputGroupEdges_ = outputGroupEdges_; - result.analyzeServiceAccountImpersonation_ = analyzeServiceAccountImpersonation_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()) return this; - if (other.getExpandGroups() != false) { - setExpandGroups(other.getExpandGroups()); - } - if (other.getExpandRoles() != false) { - setExpandRoles(other.getExpandRoles()); - } - if (other.getExpandResources() != false) { - setExpandResources(other.getExpandResources()); - } - if (other.getOutputResourceEdges() != false) { - setOutputResourceEdges(other.getOutputResourceEdges()); - } - if (other.getOutputGroupEdges() != false) { - setOutputGroupEdges(other.getOutputGroupEdges()); - } - if (other.getAnalyzeServiceAccountImpersonation() != false) { - setAnalyzeServiceAccountImpersonation(other.getAnalyzeServiceAccountImpersonation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean expandGroups_ ; - /** - *
-       * Optional. If true, the identities section of the result will expand any
-       * Google groups appearing in an IAM policy binding.
-       * If
-       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
-       * is specified, the identity in the result will be determined by the
-       * selector, and this flag is not allowed to set.
-       * If true, the default max expansion per group is 1000 for
-       * AssetService.AnalyzeIamPolicy][].
-       * Default is false.
-       * 
- * - * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandGroups. - */ - @java.lang.Override - public boolean getExpandGroups() { - return expandGroups_; - } - /** - *
-       * Optional. If true, the identities section of the result will expand any
-       * Google groups appearing in an IAM policy binding.
-       * If
-       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
-       * is specified, the identity in the result will be determined by the
-       * selector, and this flag is not allowed to set.
-       * If true, the default max expansion per group is 1000 for
-       * AssetService.AnalyzeIamPolicy][].
-       * Default is false.
-       * 
- * - * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The expandGroups to set. - * @return This builder for chaining. - */ - public Builder setExpandGroups(boolean value) { - - expandGroups_ = value; - onChanged(); - return this; - } - /** - *
-       * Optional. If true, the identities section of the result will expand any
-       * Google groups appearing in an IAM policy binding.
-       * If
-       * [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
-       * is specified, the identity in the result will be determined by the
-       * selector, and this flag is not allowed to set.
-       * If true, the default max expansion per group is 1000 for
-       * AssetService.AnalyzeIamPolicy][].
-       * Default is false.
-       * 
- * - * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearExpandGroups() { - - expandGroups_ = false; - onChanged(); - return this; - } - - private boolean expandRoles_ ; - /** - *
-       * Optional. If true, the access section of result will expand any roles
-       * appearing in IAM policy bindings to include their permissions.
-       * If
-       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
-       * is specified, the access section of the result will be determined by the
-       * selector, and this flag is not allowed to set.
-       * Default is false.
-       * 
- * - * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandRoles. - */ - @java.lang.Override - public boolean getExpandRoles() { - return expandRoles_; - } - /** - *
-       * Optional. If true, the access section of result will expand any roles
-       * appearing in IAM policy bindings to include their permissions.
-       * If
-       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
-       * is specified, the access section of the result will be determined by the
-       * selector, and this flag is not allowed to set.
-       * Default is false.
-       * 
- * - * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The expandRoles to set. - * @return This builder for chaining. - */ - public Builder setExpandRoles(boolean value) { - - expandRoles_ = value; - onChanged(); - return this; - } - /** - *
-       * Optional. If true, the access section of result will expand any roles
-       * appearing in IAM policy bindings to include their permissions.
-       * If
-       * [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
-       * is specified, the access section of the result will be determined by the
-       * selector, and this flag is not allowed to set.
-       * Default is false.
-       * 
- * - * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearExpandRoles() { - - expandRoles_ = false; - onChanged(); - return this; - } - - private boolean expandResources_ ; - /** - *
-       * Optional. If true and
-       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-       * is not specified, the resource section of the result will expand any
-       * resource attached to an IAM policy to include resources lower in the
-       * resource hierarchy.
-       * For example, if the request analyzes for which resources user A has
-       * permission P, and the results include an IAM policy with P on a GCP
-       * folder, the results will also include resources in that folder with
-       * permission P.
-       * If true and
-       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-       * is specified, the resource section of the result will expand the
-       * specified resource to include resources lower in the resource hierarchy.
-       * Only project or lower resources are supported. Folder and organization
-       * resource cannot be used together with this option.
-       * For example, if the request analyzes for which users have permission P on
-       * a GCP project with this option enabled, the results will include all
-       * users who have permission P on that project or any lower resource.
-       * If true, the default max expansion per resource is 1000 for
-       * AssetService.AnalyzeIamPolicy][] and 100000 for
-       * AssetService.AnalyzeIamPolicyLongrunning][].
-       * Default is false.
-       * 
- * - * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The expandResources. - */ - @java.lang.Override - public boolean getExpandResources() { - return expandResources_; - } - /** - *
-       * Optional. If true and
-       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-       * is not specified, the resource section of the result will expand any
-       * resource attached to an IAM policy to include resources lower in the
-       * resource hierarchy.
-       * For example, if the request analyzes for which resources user A has
-       * permission P, and the results include an IAM policy with P on a GCP
-       * folder, the results will also include resources in that folder with
-       * permission P.
-       * If true and
-       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-       * is specified, the resource section of the result will expand the
-       * specified resource to include resources lower in the resource hierarchy.
-       * Only project or lower resources are supported. Folder and organization
-       * resource cannot be used together with this option.
-       * For example, if the request analyzes for which users have permission P on
-       * a GCP project with this option enabled, the results will include all
-       * users who have permission P on that project or any lower resource.
-       * If true, the default max expansion per resource is 1000 for
-       * AssetService.AnalyzeIamPolicy][] and 100000 for
-       * AssetService.AnalyzeIamPolicyLongrunning][].
-       * Default is false.
-       * 
- * - * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The expandResources to set. - * @return This builder for chaining. - */ - public Builder setExpandResources(boolean value) { - - expandResources_ = value; - onChanged(); - return this; - } - /** - *
-       * Optional. If true and
-       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-       * is not specified, the resource section of the result will expand any
-       * resource attached to an IAM policy to include resources lower in the
-       * resource hierarchy.
-       * For example, if the request analyzes for which resources user A has
-       * permission P, and the results include an IAM policy with P on a GCP
-       * folder, the results will also include resources in that folder with
-       * permission P.
-       * If true and
-       * [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
-       * is specified, the resource section of the result will expand the
-       * specified resource to include resources lower in the resource hierarchy.
-       * Only project or lower resources are supported. Folder and organization
-       * resource cannot be used together with this option.
-       * For example, if the request analyzes for which users have permission P on
-       * a GCP project with this option enabled, the results will include all
-       * users who have permission P on that project or any lower resource.
-       * If true, the default max expansion per resource is 1000 for
-       * AssetService.AnalyzeIamPolicy][] and 100000 for
-       * AssetService.AnalyzeIamPolicyLongrunning][].
-       * Default is false.
-       * 
- * - * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearExpandResources() { - - expandResources_ = false; - onChanged(); - return this; - } - - private boolean outputResourceEdges_ ; - /** - *
-       * Optional. If true, the result will output the relevant parent/child
-       * relationships between resources. Default is false.
-       * 
- * - * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputResourceEdges. - */ - @java.lang.Override - public boolean getOutputResourceEdges() { - return outputResourceEdges_; - } - /** - *
-       * Optional. If true, the result will output the relevant parent/child
-       * relationships between resources. Default is false.
-       * 
- * - * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The outputResourceEdges to set. - * @return This builder for chaining. - */ - public Builder setOutputResourceEdges(boolean value) { - - outputResourceEdges_ = value; - onChanged(); - return this; - } - /** - *
-       * Optional. If true, the result will output the relevant parent/child
-       * relationships between resources. Default is false.
-       * 
- * - * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearOutputResourceEdges() { - - outputResourceEdges_ = false; - onChanged(); - return this; - } - - private boolean outputGroupEdges_ ; - /** - *
-       * Optional. If true, the result will output the relevant membership
-       * relationships between groups and other groups, and between groups and
-       * principals. Default is false.
-       * 
- * - * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputGroupEdges. - */ - @java.lang.Override - public boolean getOutputGroupEdges() { - return outputGroupEdges_; - } - /** - *
-       * Optional. If true, the result will output the relevant membership
-       * relationships between groups and other groups, and between groups and
-       * principals. Default is false.
-       * 
- * - * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The outputGroupEdges to set. - * @return This builder for chaining. - */ - public Builder setOutputGroupEdges(boolean value) { - - outputGroupEdges_ = value; - onChanged(); - return this; - } - /** - *
-       * Optional. If true, the result will output the relevant membership
-       * relationships between groups and other groups, and between groups and
-       * principals. Default is false.
-       * 
- * - * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearOutputGroupEdges() { - - outputGroupEdges_ = false; - onChanged(); - return this; - } - - private boolean analyzeServiceAccountImpersonation_ ; - /** - *
-       * Optional. If true, the response will include access analysis from
-       * identities to resources via service account impersonation. This is a very
-       * expensive operation, because many derived queries will be executed. We
-       * highly recommend you use
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc instead.
-       * For example, if the request analyzes for which resources user A has
-       * permission P, and there's an IAM policy states user A has
-       * iam.serviceAccounts.getAccessToken permission to a service account SA,
-       * and there's another IAM policy states service account SA has permission P
-       * to a GCP folder F, then user A potentially has access to the GCP folder
-       * F. And those advanced analysis results will be included in
-       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-       * Another example, if the request analyzes for who has
-       * permission P to a GCP folder F, and there's an IAM policy states user A
-       * has iam.serviceAccounts.actAs permission to a service account SA, and
-       * there's another IAM policy states service account SA has permission P to
-       * the GCP folder F, then user A potentially has access to the GCP folder
-       * F. And those advanced analysis results will be included in
-       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-       * Only the following permissions are considered in this analysis:
-       * * `iam.serviceAccounts.actAs`
-       * * `iam.serviceAccounts.signBlob`
-       * * `iam.serviceAccounts.signJwt`
-       * * `iam.serviceAccounts.getAccessToken`
-       * * `iam.serviceAccounts.getOpenIdToken`
-       * * `iam.serviceAccounts.implicitDelegation`
-       * Default is false.
-       * 
- * - * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The analyzeServiceAccountImpersonation. - */ - @java.lang.Override - public boolean getAnalyzeServiceAccountImpersonation() { - return analyzeServiceAccountImpersonation_; - } - /** - *
-       * Optional. If true, the response will include access analysis from
-       * identities to resources via service account impersonation. This is a very
-       * expensive operation, because many derived queries will be executed. We
-       * highly recommend you use
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc instead.
-       * For example, if the request analyzes for which resources user A has
-       * permission P, and there's an IAM policy states user A has
-       * iam.serviceAccounts.getAccessToken permission to a service account SA,
-       * and there's another IAM policy states service account SA has permission P
-       * to a GCP folder F, then user A potentially has access to the GCP folder
-       * F. And those advanced analysis results will be included in
-       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-       * Another example, if the request analyzes for who has
-       * permission P to a GCP folder F, and there's an IAM policy states user A
-       * has iam.serviceAccounts.actAs permission to a service account SA, and
-       * there's another IAM policy states service account SA has permission P to
-       * the GCP folder F, then user A potentially has access to the GCP folder
-       * F. And those advanced analysis results will be included in
-       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-       * Only the following permissions are considered in this analysis:
-       * * `iam.serviceAccounts.actAs`
-       * * `iam.serviceAccounts.signBlob`
-       * * `iam.serviceAccounts.signJwt`
-       * * `iam.serviceAccounts.getAccessToken`
-       * * `iam.serviceAccounts.getOpenIdToken`
-       * * `iam.serviceAccounts.implicitDelegation`
-       * Default is false.
-       * 
- * - * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The analyzeServiceAccountImpersonation to set. - * @return This builder for chaining. - */ - public Builder setAnalyzeServiceAccountImpersonation(boolean value) { - - analyzeServiceAccountImpersonation_ = value; - onChanged(); - return this; - } - /** - *
-       * Optional. If true, the response will include access analysis from
-       * identities to resources via service account impersonation. This is a very
-       * expensive operation, because many derived queries will be executed. We
-       * highly recommend you use
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc instead.
-       * For example, if the request analyzes for which resources user A has
-       * permission P, and there's an IAM policy states user A has
-       * iam.serviceAccounts.getAccessToken permission to a service account SA,
-       * and there's another IAM policy states service account SA has permission P
-       * to a GCP folder F, then user A potentially has access to the GCP folder
-       * F. And those advanced analysis results will be included in
-       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-       * Another example, if the request analyzes for who has
-       * permission P to a GCP folder F, and there's an IAM policy states user A
-       * has iam.serviceAccounts.actAs permission to a service account SA, and
-       * there's another IAM policy states service account SA has permission P to
-       * the GCP folder F, then user A potentially has access to the GCP folder
-       * F. And those advanced analysis results will be included in
-       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
-       * Only the following permissions are considered in this analysis:
-       * * `iam.serviceAccounts.actAs`
-       * * `iam.serviceAccounts.signBlob`
-       * * `iam.serviceAccounts.signJwt`
-       * * `iam.serviceAccounts.getAccessToken`
-       * * `iam.serviceAccounts.getOpenIdToken`
-       * * `iam.serviceAccounts.implicitDelegation`
-       * Default is false.
-       * 
- * - * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearAnalyzeServiceAccountImpersonation() { - - analyzeServiceAccountImpersonation_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Options parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Options(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ConditionContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The hypothetical access timestamp to evaluate IAM conditions. Note that
-     * this value must not be earlier than the current time; otherwise, an
-     * INVALID_ARGUMENT error will be returned.
-     * 
- * - * .google.protobuf.Timestamp access_time = 1; - * @return Whether the accessTime field is set. - */ - boolean hasAccessTime(); - /** - *
-     * The hypothetical access timestamp to evaluate IAM conditions. Note that
-     * this value must not be earlier than the current time; otherwise, an
-     * INVALID_ARGUMENT error will be returned.
-     * 
- * - * .google.protobuf.Timestamp access_time = 1; - * @return The accessTime. - */ - com.google.protobuf.Timestamp getAccessTime(); - /** - *
-     * The hypothetical access timestamp to evaluate IAM conditions. Note that
-     * this value must not be earlier than the current time; otherwise, an
-     * INVALID_ARGUMENT error will be returned.
-     * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder(); - - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.TimeContextCase getTimeContextCase(); - } - /** - *
-   * The IAM conditions context.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} - */ - public static final class ConditionContext extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) - ConditionContextOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConditionContext.newBuilder() to construct. - private ConditionContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConditionContext() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConditionContext(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ConditionContext( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (timeContextCase_ == 1) { - subBuilder = ((com.google.protobuf.Timestamp) timeContext_).toBuilder(); - } - timeContext_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) timeContext_); - timeContext_ = subBuilder.buildPartial(); - } - timeContextCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); - } - - private int timeContextCase_ = 0; - private java.lang.Object timeContext_; - public enum TimeContextCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ACCESS_TIME(1), - TIMECONTEXT_NOT_SET(0); - private final int value; - private TimeContextCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TimeContextCase valueOf(int value) { - return forNumber(value); - } - - public static TimeContextCase forNumber(int value) { - switch (value) { - case 1: return ACCESS_TIME; - case 0: return TIMECONTEXT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TimeContextCase - getTimeContextCase() { - return TimeContextCase.forNumber( - timeContextCase_); - } - - public static final int ACCESS_TIME_FIELD_NUMBER = 1; - /** - *
-     * The hypothetical access timestamp to evaluate IAM conditions. Note that
-     * this value must not be earlier than the current time; otherwise, an
-     * INVALID_ARGUMENT error will be returned.
-     * 
- * - * .google.protobuf.Timestamp access_time = 1; - * @return Whether the accessTime field is set. - */ - @java.lang.Override - public boolean hasAccessTime() { - return timeContextCase_ == 1; - } - /** - *
-     * The hypothetical access timestamp to evaluate IAM conditions. Note that
-     * this value must not be earlier than the current time; otherwise, an
-     * INVALID_ARGUMENT error will be returned.
-     * 
- * - * .google.protobuf.Timestamp access_time = 1; - * @return The accessTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getAccessTime() { - if (timeContextCase_ == 1) { - return (com.google.protobuf.Timestamp) timeContext_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - *
-     * The hypothetical access timestamp to evaluate IAM conditions. Note that
-     * this value must not be earlier than the current time; otherwise, an
-     * INVALID_ARGUMENT error will be returned.
-     * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { - if (timeContextCase_ == 1) { - return (com.google.protobuf.Timestamp) timeContext_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (timeContextCase_ == 1) { - output.writeMessage(1, (com.google.protobuf.Timestamp) timeContext_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (timeContextCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.protobuf.Timestamp) timeContext_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) obj; - - if (!getTimeContextCase().equals(other.getTimeContextCase())) return false; - switch (timeContextCase_) { - case 1: - if (!getAccessTime() - .equals(other.getAccessTime())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (timeContextCase_) { - case 1: - hash = (37 * hash) + ACCESS_TIME_FIELD_NUMBER; - hash = (53 * hash) + getAccessTime().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The IAM conditions context.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - timeContextCase_ = 0; - timeContext_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext build() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(this); - if (timeContextCase_ == 1) { - if (accessTimeBuilder_ == null) { - result.timeContext_ = timeContext_; - } else { - result.timeContext_ = accessTimeBuilder_.build(); - } - } - result.timeContextCase_ = timeContextCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance()) return this; - switch (other.getTimeContextCase()) { - case ACCESS_TIME: { - mergeAccessTime(other.getAccessTime()); - break; - } - case TIMECONTEXT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int timeContextCase_ = 0; - private java.lang.Object timeContext_; - public TimeContextCase - getTimeContextCase() { - return TimeContextCase.forNumber( - timeContextCase_); - } - - public Builder clearTimeContext() { - timeContextCase_ = 0; - timeContext_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> accessTimeBuilder_; - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - * @return Whether the accessTime field is set. - */ - @java.lang.Override - public boolean hasAccessTime() { - return timeContextCase_ == 1; - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - * @return The accessTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getAccessTime() { - if (accessTimeBuilder_ == null) { - if (timeContextCase_ == 1) { - return (com.google.protobuf.Timestamp) timeContext_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (timeContextCase_ == 1) { - return accessTimeBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - public Builder setAccessTime(com.google.protobuf.Timestamp value) { - if (accessTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timeContext_ = value; - onChanged(); - } else { - accessTimeBuilder_.setMessage(value); - } - timeContextCase_ = 1; - return this; - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - public Builder setAccessTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (accessTimeBuilder_ == null) { - timeContext_ = builderForValue.build(); - onChanged(); - } else { - accessTimeBuilder_.setMessage(builderForValue.build()); - } - timeContextCase_ = 1; - return this; - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - public Builder mergeAccessTime(com.google.protobuf.Timestamp value) { - if (accessTimeBuilder_ == null) { - if (timeContextCase_ == 1 && - timeContext_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - timeContext_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) timeContext_) - .mergeFrom(value).buildPartial(); - } else { - timeContext_ = value; - } - onChanged(); - } else { - if (timeContextCase_ == 1) { - accessTimeBuilder_.mergeFrom(value); - } else { - accessTimeBuilder_.setMessage(value); - } - } - timeContextCase_ = 1; - return this; - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - public Builder clearAccessTime() { - if (accessTimeBuilder_ == null) { - if (timeContextCase_ == 1) { - timeContextCase_ = 0; - timeContext_ = null; - onChanged(); - } - } else { - if (timeContextCase_ == 1) { - timeContextCase_ = 0; - timeContext_ = null; - } - accessTimeBuilder_.clear(); - } - return this; - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getAccessTimeBuilder() { - return getAccessTimeFieldBuilder().getBuilder(); - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { - if ((timeContextCase_ == 1) && (accessTimeBuilder_ != null)) { - return accessTimeBuilder_.getMessageOrBuilder(); - } else { - if (timeContextCase_ == 1) { - return (com.google.protobuf.Timestamp) timeContext_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-       * The hypothetical access timestamp to evaluate IAM conditions. Note that
-       * this value must not be earlier than the current time; otherwise, an
-       * INVALID_ARGUMENT error will be returned.
-       * 
- * - * .google.protobuf.Timestamp access_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getAccessTimeFieldBuilder() { - if (accessTimeBuilder_ == null) { - if (!(timeContextCase_ == 1)) { - timeContext_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - accessTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) timeContext_, - getParentForChildren(), - isClean()); - timeContext_ = null; - } - timeContextCase_ = 1; - onChanged();; - return accessTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConditionContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConditionContext(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int SCOPE_FIELD_NUMBER = 1; - private volatile java.lang.Object scope_; - /** - *
-   * Required. The relative name of the root asset. Only resources and IAM
-   * policies within the scope will be analyzed.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - @java.lang.Override - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } - } - /** - *
-   * Required. The relative name of the root asset. Only resources and IAM
-   * policies within the scope will be analyzed.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; - /** - *
-   * Optional. Specifies a resource for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the resourceSelector field is set. - */ - @java.lang.Override - public boolean hasResourceSelector() { - return resourceSelector_ != null; - } - /** - *
-   * Optional. Specifies a resource for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The resourceSelector. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { - return resourceSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() : resourceSelector_; - } - /** - *
-   * Optional. Specifies a resource for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder() { - return getResourceSelector(); - } - - public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; - /** - *
-   * Optional. Specifies an identity for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the identitySelector field is set. - */ - @java.lang.Override - public boolean hasIdentitySelector() { - return identitySelector_ != null; - } - /** - *
-   * Optional. Specifies an identity for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The identitySelector. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { - return identitySelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() : identitySelector_; - } - /** - *
-   * Optional. Specifies an identity for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder() { - return getIdentitySelector(); - } - - public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; - /** - *
-   * Optional. Specifies roles or permissions for analysis. This is optional.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the accessSelector field is set. - */ - @java.lang.Override - public boolean hasAccessSelector() { - return accessSelector_ != null; - } - /** - *
-   * Optional. Specifies roles or permissions for analysis. This is optional.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The accessSelector. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { - return accessSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() : accessSelector_; - } - /** - *
-   * Optional. Specifies roles or permissions for analysis. This is optional.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder() { - return getAccessSelector(); - } - - public static final int OPTIONS_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; - /** - *
-   * Optional. The query options.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the options field is set. - */ - @java.lang.Override - public boolean hasOptions() { - return options_ != null; - } - /** - *
-   * Optional. The query options.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The options. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { - return options_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() : options_; - } - /** - *
-   * Optional. The query options.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { - return getOptions(); - } - - public static final int CONDITION_CONTEXT_FIELD_NUMBER = 6; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; - /** - *
-   * Optional. The hypothetical context for IAM conditions evaluation.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the conditionContext field is set. - */ - @java.lang.Override - public boolean hasConditionContext() { - return conditionContext_ != null; - } - /** - *
-   * Optional. The hypothetical context for IAM conditions evaluation.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The conditionContext. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { - return conditionContext_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() : conditionContext_; - } - /** - *
-   * Optional. The hypothetical context for IAM conditions evaluation.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder() { - return getConditionContext(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); - } - if (resourceSelector_ != null) { - output.writeMessage(2, getResourceSelector()); - } - if (identitySelector_ != null) { - output.writeMessage(3, getIdentitySelector()); - } - if (accessSelector_ != null) { - output.writeMessage(4, getAccessSelector()); - } - if (options_ != null) { - output.writeMessage(5, getOptions()); - } - if (conditionContext_ != null) { - output.writeMessage(6, getConditionContext()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); - } - if (resourceSelector_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getResourceSelector()); - } - if (identitySelector_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getIdentitySelector()); - } - if (accessSelector_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getAccessSelector()); - } - if (options_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getOptions()); - } - if (conditionContext_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getConditionContext()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisQuery other = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) obj; - - if (!getScope() - .equals(other.getScope())) return false; - if (hasResourceSelector() != other.hasResourceSelector()) return false; - if (hasResourceSelector()) { - if (!getResourceSelector() - .equals(other.getResourceSelector())) return false; - } - if (hasIdentitySelector() != other.hasIdentitySelector()) return false; - if (hasIdentitySelector()) { - if (!getIdentitySelector() - .equals(other.getIdentitySelector())) return false; - } - if (hasAccessSelector() != other.hasAccessSelector()) return false; - if (hasAccessSelector()) { - if (!getAccessSelector() - .equals(other.getAccessSelector())) return false; - } - if (hasOptions() != other.hasOptions()) return false; - if (hasOptions()) { - if (!getOptions() - .equals(other.getOptions())) return false; - } - if (hasConditionContext() != other.hasConditionContext()) return false; - if (hasConditionContext()) { - if (!getConditionContext() - .equals(other.getConditionContext())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScope().hashCode(); - if (hasResourceSelector()) { - hash = (37 * hash) + RESOURCE_SELECTOR_FIELD_NUMBER; - hash = (53 * hash) + getResourceSelector().hashCode(); - } - if (hasIdentitySelector()) { - hash = (37 * hash) + IDENTITY_SELECTOR_FIELD_NUMBER; - hash = (53 * hash) + getIdentitySelector().hashCode(); - } - if (hasAccessSelector()) { - hash = (37 * hash) + ACCESS_SELECTOR_FIELD_NUMBER; - hash = (53 * hash) + getAccessSelector().hashCode(); - } - if (hasOptions()) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + getOptions().hashCode(); - } - if (hasConditionContext()) { - hash = (37 * hash) + CONDITION_CONTEXT_FIELD_NUMBER; - hash = (53 * hash) + getConditionContext().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisQuery prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * IAM policy analysis query message.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) - com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - if (resourceSelectorBuilder_ == null) { - resourceSelector_ = null; - } else { - resourceSelector_ = null; - resourceSelectorBuilder_ = null; - } - if (identitySelectorBuilder_ == null) { - identitySelector_ = null; - } else { - identitySelector_ = null; - identitySelectorBuilder_ = null; - } - if (accessSelectorBuilder_ == null) { - accessSelector_ = null; - } else { - accessSelector_ = null; - accessSelectorBuilder_ = null; - } - if (optionsBuilder_ == null) { - options_ = null; - } else { - options_ = null; - optionsBuilder_ = null; - } - if (conditionContextBuilder_ == null) { - conditionContext_ = null; - } else { - conditionContext_ = null; - conditionContextBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery build() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(this); - result.scope_ = scope_; - if (resourceSelectorBuilder_ == null) { - result.resourceSelector_ = resourceSelector_; - } else { - result.resourceSelector_ = resourceSelectorBuilder_.build(); - } - if (identitySelectorBuilder_ == null) { - result.identitySelector_ = identitySelector_; - } else { - result.identitySelector_ = identitySelectorBuilder_.build(); - } - if (accessSelectorBuilder_ == null) { - result.accessSelector_ = accessSelector_; - } else { - result.accessSelector_ = accessSelectorBuilder_.build(); - } - if (optionsBuilder_ == null) { - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } - if (conditionContextBuilder_ == null) { - result.conditionContext_ = conditionContext_; - } else { - result.conditionContext_ = conditionContextBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance()) return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (other.hasResourceSelector()) { - mergeResourceSelector(other.getResourceSelector()); - } - if (other.hasIdentitySelector()) { - mergeIdentitySelector(other.getIdentitySelector()); - } - if (other.hasAccessSelector()) { - mergeAccessSelector(other.getAccessSelector()); - } - if (other.hasOptions()) { - mergeOptions(other.getOptions()); - } - if (other.hasConditionContext()) { - mergeConditionContext(other.getConditionContext()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object scope_ = ""; - /** - *
-     * Required. The relative name of the root asset. Only resources and IAM
-     * policies within the scope will be analyzed.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. Only resources and IAM
-     * policies within the scope will be analyzed.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. Only resources and IAM
-     * policies within the scope will be analyzed.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - scope_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. Only resources and IAM
-     * policies within the scope will be analyzed.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearScope() { - - scope_ = getDefaultInstance().getScope(); - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. Only resources and IAM
-     * policies within the scope will be analyzed.
-     * This can only be an organization number (such as "organizations/123"), a
-     * folder number (such as "folders/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345").
-     * To know how to get organization id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-     * To know how to get folder or project id, visit [here
-     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - scope_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> resourceSelectorBuilder_; - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the resourceSelector field is set. - */ - public boolean hasResourceSelector() { - return resourceSelectorBuilder_ != null || resourceSelector_ != null; - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The resourceSelector. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { - if (resourceSelectorBuilder_ == null) { - return resourceSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() : resourceSelector_; - } else { - return resourceSelectorBuilder_.getMessage(); - } - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setResourceSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { - if (resourceSelectorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resourceSelector_ = value; - onChanged(); - } else { - resourceSelectorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setResourceSelector( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder builderForValue) { - if (resourceSelectorBuilder_ == null) { - resourceSelector_ = builderForValue.build(); - onChanged(); - } else { - resourceSelectorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeResourceSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { - if (resourceSelectorBuilder_ == null) { - if (resourceSelector_ != null) { - resourceSelector_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.newBuilder(resourceSelector_).mergeFrom(value).buildPartial(); - } else { - resourceSelector_ = value; - } - onChanged(); - } else { - resourceSelectorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearResourceSelector() { - if (resourceSelectorBuilder_ == null) { - resourceSelector_ = null; - onChanged(); - } else { - resourceSelector_ = null; - resourceSelectorBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder getResourceSelectorBuilder() { - - onChanged(); - return getResourceSelectorFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder() { - if (resourceSelectorBuilder_ != null) { - return resourceSelectorBuilder_.getMessageOrBuilder(); - } else { - return resourceSelector_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() : resourceSelector_; - } - } - /** - *
-     * Optional. Specifies a resource for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> - getResourceSelectorFieldBuilder() { - if (resourceSelectorBuilder_ == null) { - resourceSelectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>( - getResourceSelector(), - getParentForChildren(), - isClean()); - resourceSelector_ = null; - } - return resourceSelectorBuilder_; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> identitySelectorBuilder_; - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the identitySelector field is set. - */ - public boolean hasIdentitySelector() { - return identitySelectorBuilder_ != null || identitySelector_ != null; - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The identitySelector. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { - if (identitySelectorBuilder_ == null) { - return identitySelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() : identitySelector_; - } else { - return identitySelectorBuilder_.getMessage(); - } - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setIdentitySelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { - if (identitySelectorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - identitySelector_ = value; - onChanged(); - } else { - identitySelectorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setIdentitySelector( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder builderForValue) { - if (identitySelectorBuilder_ == null) { - identitySelector_ = builderForValue.build(); - onChanged(); - } else { - identitySelectorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeIdentitySelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { - if (identitySelectorBuilder_ == null) { - if (identitySelector_ != null) { - identitySelector_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.newBuilder(identitySelector_).mergeFrom(value).buildPartial(); - } else { - identitySelector_ = value; - } - onChanged(); - } else { - identitySelectorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearIdentitySelector() { - if (identitySelectorBuilder_ == null) { - identitySelector_ = null; - onChanged(); - } else { - identitySelector_ = null; - identitySelectorBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder getIdentitySelectorBuilder() { - - onChanged(); - return getIdentitySelectorFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder() { - if (identitySelectorBuilder_ != null) { - return identitySelectorBuilder_.getMessageOrBuilder(); - } else { - return identitySelector_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() : identitySelector_; - } - } - /** - *
-     * Optional. Specifies an identity for analysis.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> - getIdentitySelectorFieldBuilder() { - if (identitySelectorBuilder_ == null) { - identitySelectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>( - getIdentitySelector(), - getParentForChildren(), - isClean()); - identitySelector_ = null; - } - return identitySelectorBuilder_; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> accessSelectorBuilder_; - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the accessSelector field is set. - */ - public boolean hasAccessSelector() { - return accessSelectorBuilder_ != null || accessSelector_ != null; - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The accessSelector. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { - if (accessSelectorBuilder_ == null) { - return accessSelector_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() : accessSelector_; - } else { - return accessSelectorBuilder_.getMessage(); - } - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setAccessSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { - if (accessSelectorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessSelector_ = value; - onChanged(); - } else { - accessSelectorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setAccessSelector( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder builderForValue) { - if (accessSelectorBuilder_ == null) { - accessSelector_ = builderForValue.build(); - onChanged(); - } else { - accessSelectorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeAccessSelector(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { - if (accessSelectorBuilder_ == null) { - if (accessSelector_ != null) { - accessSelector_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.newBuilder(accessSelector_).mergeFrom(value).buildPartial(); - } else { - accessSelector_ = value; - } - onChanged(); - } else { - accessSelectorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearAccessSelector() { - if (accessSelectorBuilder_ == null) { - accessSelector_ = null; - onChanged(); - } else { - accessSelector_ = null; - accessSelectorBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder getAccessSelectorBuilder() { - - onChanged(); - return getAccessSelectorFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder() { - if (accessSelectorBuilder_ != null) { - return accessSelectorBuilder_.getMessageOrBuilder(); - } else { - return accessSelector_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() : accessSelector_; - } - } - /** - *
-     * Optional. Specifies roles or permissions for analysis. This is optional.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> - getAccessSelectorFieldBuilder() { - if (accessSelectorBuilder_ == null) { - accessSelectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>( - getAccessSelector(), - getParentForChildren(), - isClean()); - accessSelector_ = null; - } - return accessSelectorBuilder_; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> optionsBuilder_; - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the options field is set. - */ - public boolean hasOptions() { - return optionsBuilder_ != null || options_ != null; - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The options. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { - if (optionsBuilder_ == null) { - return options_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() : options_; - } else { - return optionsBuilder_.getMessage(); - } - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { - if (optionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - options_ = value; - onChanged(); - } else { - optionsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setOptions( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder builderForValue) { - if (optionsBuilder_ == null) { - options_ = builderForValue.build(); - onChanged(); - } else { - optionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { - if (optionsBuilder_ == null) { - if (options_ != null) { - options_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.newBuilder(options_).mergeFrom(value).buildPartial(); - } else { - options_ = value; - } - onChanged(); - } else { - optionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = null; - onChanged(); - } else { - options_ = null; - optionsBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder getOptionsBuilder() { - - onChanged(); - return getOptionsFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { - if (optionsBuilder_ != null) { - return optionsBuilder_.getMessageOrBuilder(); - } else { - return options_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() : options_; - } - } - /** - *
-     * Optional. The query options.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> - getOptionsFieldBuilder() { - if (optionsBuilder_ == null) { - optionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder>( - getOptions(), - getParentForChildren(), - isClean()); - options_ = null; - } - return optionsBuilder_; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> conditionContextBuilder_; - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the conditionContext field is set. - */ - public boolean hasConditionContext() { - return conditionContextBuilder_ != null || conditionContext_ != null; - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The conditionContext. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { - if (conditionContextBuilder_ == null) { - return conditionContext_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() : conditionContext_; - } else { - return conditionContextBuilder_.getMessage(); - } - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setConditionContext(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { - if (conditionContextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - conditionContext_ = value; - onChanged(); - } else { - conditionContextBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setConditionContext( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder builderForValue) { - if (conditionContextBuilder_ == null) { - conditionContext_ = builderForValue.build(); - onChanged(); - } else { - conditionContextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeConditionContext(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { - if (conditionContextBuilder_ == null) { - if (conditionContext_ != null) { - conditionContext_ = - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.newBuilder(conditionContext_).mergeFrom(value).buildPartial(); - } else { - conditionContext_ = value; - } - onChanged(); - } else { - conditionContextBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearConditionContext() { - if (conditionContextBuilder_ == null) { - conditionContext_ = null; - onChanged(); - } else { - conditionContext_ = null; - conditionContextBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder getConditionContextBuilder() { - - onChanged(); - return getConditionContextFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder() { - if (conditionContextBuilder_ != null) { - return conditionContextBuilder_.getMessageOrBuilder(); - } else { - return conditionContext_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() : conditionContext_; - } - } - /** - *
-     * Optional. The hypothetical context for IAM conditions evaluation.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> - getConditionContextFieldBuilder() { - if (conditionContextBuilder_ == null) { - conditionContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder>( - getConditionContext(), - getParentForChildren(), - isClean()); - conditionContext_ = null; - } - return conditionContextBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicyAnalysisQuery parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisQuery(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java deleted file mode 100644 index ed674b9206e1..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java +++ /dev/null @@ -1,180 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface IamPolicyAnalysisQueryOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The relative name of the root asset. Only resources and IAM
-   * policies within the scope will be analyzed.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - java.lang.String getScope(); - /** - *
-   * Required. The relative name of the root asset. Only resources and IAM
-   * policies within the scope will be analyzed.
-   * This can only be an organization number (such as "organizations/123"), a
-   * folder number (such as "folders/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345").
-   * To know how to get organization id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
-   * To know how to get folder or project id, visit [here
-   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - com.google.protobuf.ByteString - getScopeBytes(); - - /** - *
-   * Optional. Specifies a resource for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the resourceSelector field is set. - */ - boolean hasResourceSelector(); - /** - *
-   * Optional. Specifies a resource for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The resourceSelector. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector(); - /** - *
-   * Optional. Specifies a resource for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder getResourceSelectorOrBuilder(); - - /** - *
-   * Optional. Specifies an identity for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the identitySelector field is set. - */ - boolean hasIdentitySelector(); - /** - *
-   * Optional. Specifies an identity for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The identitySelector. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector(); - /** - *
-   * Optional. Specifies an identity for analysis.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder getIdentitySelectorOrBuilder(); - - /** - *
-   * Optional. Specifies roles or permissions for analysis. This is optional.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the accessSelector field is set. - */ - boolean hasAccessSelector(); - /** - *
-   * Optional. Specifies roles or permissions for analysis. This is optional.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The accessSelector. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector(); - /** - *
-   * Optional. Specifies roles or permissions for analysis. This is optional.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder(); - - /** - *
-   * Optional. The query options.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the options field is set. - */ - boolean hasOptions(); - /** - *
-   * Optional. The query options.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The options. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions(); - /** - *
-   * Optional. The query options.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder(); - - /** - *
-   * Optional. The hypothetical context for IAM conditions evaluation.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the conditionContext field is set. - */ - boolean hasConditionContext(); - /** - *
-   * Optional. The hypothetical context for IAM conditions evaluation.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The conditionContext. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext(); - /** - *
-   * Optional. The hypothetical context for IAM conditions evaluation.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder getConditionContextOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java deleted file mode 100644 index 751df6709dc7..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java +++ /dev/null @@ -1,9843 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * IAM Policy analysis result, consisting of one IAM policy binding and derived
- * access control lists.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult} - */ -public final class IamPolicyAnalysisResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult) - IamPolicyAnalysisResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use IamPolicyAnalysisResult.newBuilder() to construct. - private IamPolicyAnalysisResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicyAnalysisResult() { - attachedResourceFullName_ = ""; - accessControlLists_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicyAnalysisResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicyAnalysisResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - attachedResourceFullName_ = s; - break; - } - case 18: { - com.google.iam.v1.Binding.Builder subBuilder = null; - if (iamBinding_ != null) { - subBuilder = iamBinding_.toBuilder(); - } - iamBinding_ = input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamBinding_); - iamBinding_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - accessControlLists_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - accessControlLists_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.parser(), extensionRegistry)); - break; - } - case 34: { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder subBuilder = null; - if (identityList_ != null) { - subBuilder = identityList_.toBuilder(); - } - identityList_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(identityList_); - identityList_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - - fullyExplored_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - accessControlLists_ = java.util.Collections.unmodifiableList(accessControlLists_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder.class); - } - - public interface ResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * 
- * - * string full_resource_name = 1; - * @return The fullResourceName. - */ - java.lang.String getFullResourceName(); - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * 
- * - * string full_resource_name = 1; - * @return The bytes for fullResourceName. - */ - com.google.protobuf.ByteString - getFullResourceNameBytes(); - - /** - *
-     * The analysis state of this resource.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return Whether the analysisState field is set. - */ - boolean hasAnalysisState(); - /** - *
-     * The analysis state of this resource.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return The analysisState. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); - /** - *
-     * The analysis state of this resource.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); - } - /** - *
-   * A Google Cloud resource under analysis.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Resource} - */ - public static final class Resource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) - ResourceOrBuilder { - private static final long serialVersionUID = 0L; - // Use Resource.newBuilder() to construct. - private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Resource() { - fullResourceName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Resource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Resource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - fullResourceName_ = s; - break; - } - case 18: { - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; - if (analysisState_ != null) { - subBuilder = analysisState_.toBuilder(); - } - analysisState_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisState_); - analysisState_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder.class); - } - - public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object fullResourceName_; - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * 
- * - * string full_resource_name = 1; - * @return The fullResourceName. - */ - @java.lang.Override - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * 
- * - * string full_resource_name = 1; - * @return The bytes for fullResourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANALYSIS_STATE_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; - /** - *
-     * The analysis state of this resource.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return Whether the analysisState field is set. - */ - @java.lang.Override - public boolean hasAnalysisState() { - return analysisState_ != null; - } - /** - *
-     * The analysis state of this resource.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return The analysisState. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { - return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } - /** - *
-     * The analysis state of this resource.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { - return getAnalysisState(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); - } - if (analysisState_ != null) { - output.writeMessage(2, getAnalysisState()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); - } - if (analysisState_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getAnalysisState()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) obj; - - if (!getFullResourceName() - .equals(other.getFullResourceName())) return false; - if (hasAnalysisState() != other.hasAnalysisState()) return false; - if (hasAnalysisState()) { - if (!getAnalysisState() - .equals(other.getAnalysisState())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFullResourceName().hashCode(); - if (hasAnalysisState()) { - hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisState().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A Google Cloud resource under analysis.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Resource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) - com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - fullResourceName_ = ""; - - if (analysisStateBuilder_ == null) { - analysisState_ = null; - } else { - analysisState_ = null; - analysisStateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource build() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource(this); - result.fullResourceName_ = fullResourceName_; - if (analysisStateBuilder_ == null) { - result.analysisState_ = analysisState_; - } else { - result.analysisState_ = analysisStateBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()) return this; - if (!other.getFullResourceName().isEmpty()) { - fullResourceName_ = other.fullResourceName_; - onChanged(); - } - if (other.hasAnalysisState()) { - mergeAnalysisState(other.getAnalysisState()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object fullResourceName_ = ""; - /** - *
-       * The [full resource
-       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * 
- * - * string full_resource_name = 1; - * @return The fullResourceName. - */ - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The [full resource
-       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * 
- * - * string full_resource_name = 1; - * @return The bytes for fullResourceName. - */ - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The [full resource
-       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * 
- * - * string full_resource_name = 1; - * @param value The fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fullResourceName_ = value; - onChanged(); - return this; - } - /** - *
-       * The [full resource
-       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * 
- * - * string full_resource_name = 1; - * @return This builder for chaining. - */ - public Builder clearFullResourceName() { - - fullResourceName_ = getDefaultInstance().getFullResourceName(); - onChanged(); - return this; - } - /** - *
-       * The [full resource
-       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-       * 
- * - * string full_resource_name = 1; - * @param value The bytes for fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fullResourceName_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> analysisStateBuilder_; - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return Whether the analysisState field is set. - */ - public boolean hasAnalysisState() { - return analysisStateBuilder_ != null || analysisState_ != null; - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return The analysisState. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { - if (analysisStateBuilder_ == null) { - return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } else { - return analysisStateBuilder_.getMessage(); - } - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (analysisStateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisState_ = value; - onChanged(); - } else { - analysisStateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder setAnalysisState( - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { - if (analysisStateBuilder_ == null) { - analysisState_ = builderForValue.build(); - onChanged(); - } else { - analysisStateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (analysisStateBuilder_ == null) { - if (analysisState_ != null) { - analysisState_ = - com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_).mergeFrom(value).buildPartial(); - } else { - analysisState_ = value; - } - onChanged(); - } else { - analysisStateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder clearAnalysisState() { - if (analysisStateBuilder_ == null) { - analysisState_ = null; - onChanged(); - } else { - analysisState_ = null; - analysisStateBuilder_ = null; - } - - return this; - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { - - onChanged(); - return getAnalysisStateFieldBuilder().getBuilder(); - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { - if (analysisStateBuilder_ != null) { - return analysisStateBuilder_.getMessageOrBuilder(); - } else { - return analysisState_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } - } - /** - *
-       * The analysis state of this resource.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> - getAnalysisStateFieldBuilder() { - if (analysisStateBuilder_ == null) { - analysisStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( - getAnalysisState(), - getParentForChildren(), - isClean()); - analysisState_ = null; - } - return analysisStateBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Resource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AccessOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The role.
-     * 
- * - * string role = 1; - * @return Whether the role field is set. - */ - boolean hasRole(); - /** - *
-     * The role.
-     * 
- * - * string role = 1; - * @return The role. - */ - java.lang.String getRole(); - /** - *
-     * The role.
-     * 
- * - * string role = 1; - * @return The bytes for role. - */ - com.google.protobuf.ByteString - getRoleBytes(); - - /** - *
-     * The permission.
-     * 
- * - * string permission = 2; - * @return Whether the permission field is set. - */ - boolean hasPermission(); - /** - *
-     * The permission.
-     * 
- * - * string permission = 2; - * @return The permission. - */ - java.lang.String getPermission(); - /** - *
-     * The permission.
-     * 
- * - * string permission = 2; - * @return The bytes for permission. - */ - com.google.protobuf.ByteString - getPermissionBytes(); - - /** - *
-     * The analysis state of this access.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - * @return Whether the analysisState field is set. - */ - boolean hasAnalysisState(); - /** - *
-     * The analysis state of this access.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - * @return The analysisState. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); - /** - *
-     * The analysis state of this access.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); - - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.OneofAccessCase getOneofAccessCase(); - } - /** - *
-   * An IAM role or permission under analysis.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Access} - */ - public static final class Access extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) - AccessOrBuilder { - private static final long serialVersionUID = 0L; - // Use Access.newBuilder() to construct. - private Access(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Access() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Access(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Access( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - oneofAccessCase_ = 1; - oneofAccess_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - oneofAccessCase_ = 2; - oneofAccess_ = s; - break; - } - case 26: { - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; - if (analysisState_ != null) { - subBuilder = analysisState_.toBuilder(); - } - analysisState_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisState_); - analysisState_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder.class); - } - - private int oneofAccessCase_ = 0; - private java.lang.Object oneofAccess_; - public enum OneofAccessCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ROLE(1), - PERMISSION(2), - ONEOFACCESS_NOT_SET(0); - private final int value; - private OneofAccessCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static OneofAccessCase valueOf(int value) { - return forNumber(value); - } - - public static OneofAccessCase forNumber(int value) { - switch (value) { - case 1: return ROLE; - case 2: return PERMISSION; - case 0: return ONEOFACCESS_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public OneofAccessCase - getOneofAccessCase() { - return OneofAccessCase.forNumber( - oneofAccessCase_); - } - - public static final int ROLE_FIELD_NUMBER = 1; - /** - *
-     * The role.
-     * 
- * - * string role = 1; - * @return Whether the role field is set. - */ - public boolean hasRole() { - return oneofAccessCase_ == 1; - } - /** - *
-     * The role.
-     * 
- * - * string role = 1; - * @return The role. - */ - public java.lang.String getRole() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 1) { - ref = oneofAccess_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oneofAccessCase_ == 1) { - oneofAccess_ = s; - } - return s; - } - } - /** - *
-     * The role.
-     * 
- * - * string role = 1; - * @return The bytes for role. - */ - public com.google.protobuf.ByteString - getRoleBytes() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 1) { - ref = oneofAccess_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oneofAccessCase_ == 1) { - oneofAccess_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PERMISSION_FIELD_NUMBER = 2; - /** - *
-     * The permission.
-     * 
- * - * string permission = 2; - * @return Whether the permission field is set. - */ - public boolean hasPermission() { - return oneofAccessCase_ == 2; - } - /** - *
-     * The permission.
-     * 
- * - * string permission = 2; - * @return The permission. - */ - public java.lang.String getPermission() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 2) { - ref = oneofAccess_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oneofAccessCase_ == 2) { - oneofAccess_ = s; - } - return s; - } - } - /** - *
-     * The permission.
-     * 
- * - * string permission = 2; - * @return The bytes for permission. - */ - public com.google.protobuf.ByteString - getPermissionBytes() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 2) { - ref = oneofAccess_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oneofAccessCase_ == 2) { - oneofAccess_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANALYSIS_STATE_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; - /** - *
-     * The analysis state of this access.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - * @return Whether the analysisState field is set. - */ - @java.lang.Override - public boolean hasAnalysisState() { - return analysisState_ != null; - } - /** - *
-     * The analysis state of this access.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - * @return The analysisState. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { - return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } - /** - *
-     * The analysis state of this access.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { - return getAnalysisState(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (oneofAccessCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, oneofAccess_); - } - if (oneofAccessCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, oneofAccess_); - } - if (analysisState_ != null) { - output.writeMessage(3, getAnalysisState()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (oneofAccessCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, oneofAccess_); - } - if (oneofAccessCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, oneofAccess_); - } - if (analysisState_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAnalysisState()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) obj; - - if (hasAnalysisState() != other.hasAnalysisState()) return false; - if (hasAnalysisState()) { - if (!getAnalysisState() - .equals(other.getAnalysisState())) return false; - } - if (!getOneofAccessCase().equals(other.getOneofAccessCase())) return false; - switch (oneofAccessCase_) { - case 1: - if (!getRole() - .equals(other.getRole())) return false; - break; - case 2: - if (!getPermission() - .equals(other.getPermission())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAnalysisState()) { - hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisState().hashCode(); - } - switch (oneofAccessCase_) { - case 1: - hash = (37 * hash) + ROLE_FIELD_NUMBER; - hash = (53 * hash) + getRole().hashCode(); - break; - case 2: - hash = (37 * hash) + PERMISSION_FIELD_NUMBER; - hash = (53 * hash) + getPermission().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * An IAM role or permission under analysis.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Access} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (analysisStateBuilder_ == null) { - analysisState_ = null; - } else { - analysisState_ = null; - analysisStateBuilder_ = null; - } - oneofAccessCase_ = 0; - oneofAccess_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access build() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access(this); - if (oneofAccessCase_ == 1) { - result.oneofAccess_ = oneofAccess_; - } - if (oneofAccessCase_ == 2) { - result.oneofAccess_ = oneofAccess_; - } - if (analysisStateBuilder_ == null) { - result.analysisState_ = analysisState_; - } else { - result.analysisState_ = analysisStateBuilder_.build(); - } - result.oneofAccessCase_ = oneofAccessCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()) return this; - if (other.hasAnalysisState()) { - mergeAnalysisState(other.getAnalysisState()); - } - switch (other.getOneofAccessCase()) { - case ROLE: { - oneofAccessCase_ = 1; - oneofAccess_ = other.oneofAccess_; - onChanged(); - break; - } - case PERMISSION: { - oneofAccessCase_ = 2; - oneofAccess_ = other.oneofAccess_; - onChanged(); - break; - } - case ONEOFACCESS_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int oneofAccessCase_ = 0; - private java.lang.Object oneofAccess_; - public OneofAccessCase - getOneofAccessCase() { - return OneofAccessCase.forNumber( - oneofAccessCase_); - } - - public Builder clearOneofAccess() { - oneofAccessCase_ = 0; - oneofAccess_ = null; - onChanged(); - return this; - } - - - /** - *
-       * The role.
-       * 
- * - * string role = 1; - * @return Whether the role field is set. - */ - @java.lang.Override - public boolean hasRole() { - return oneofAccessCase_ == 1; - } - /** - *
-       * The role.
-       * 
- * - * string role = 1; - * @return The role. - */ - @java.lang.Override - public java.lang.String getRole() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 1) { - ref = oneofAccess_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oneofAccessCase_ == 1) { - oneofAccess_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The role.
-       * 
- * - * string role = 1; - * @return The bytes for role. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRoleBytes() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 1) { - ref = oneofAccess_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oneofAccessCase_ == 1) { - oneofAccess_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The role.
-       * 
- * - * string role = 1; - * @param value The role to set. - * @return This builder for chaining. - */ - public Builder setRole( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - oneofAccessCase_ = 1; - oneofAccess_ = value; - onChanged(); - return this; - } - /** - *
-       * The role.
-       * 
- * - * string role = 1; - * @return This builder for chaining. - */ - public Builder clearRole() { - if (oneofAccessCase_ == 1) { - oneofAccessCase_ = 0; - oneofAccess_ = null; - onChanged(); - } - return this; - } - /** - *
-       * The role.
-       * 
- * - * string role = 1; - * @param value The bytes for role to set. - * @return This builder for chaining. - */ - public Builder setRoleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - oneofAccessCase_ = 1; - oneofAccess_ = value; - onChanged(); - return this; - } - - /** - *
-       * The permission.
-       * 
- * - * string permission = 2; - * @return Whether the permission field is set. - */ - @java.lang.Override - public boolean hasPermission() { - return oneofAccessCase_ == 2; - } - /** - *
-       * The permission.
-       * 
- * - * string permission = 2; - * @return The permission. - */ - @java.lang.Override - public java.lang.String getPermission() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 2) { - ref = oneofAccess_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (oneofAccessCase_ == 2) { - oneofAccess_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The permission.
-       * 
- * - * string permission = 2; - * @return The bytes for permission. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPermissionBytes() { - java.lang.Object ref = ""; - if (oneofAccessCase_ == 2) { - ref = oneofAccess_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (oneofAccessCase_ == 2) { - oneofAccess_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The permission.
-       * 
- * - * string permission = 2; - * @param value The permission to set. - * @return This builder for chaining. - */ - public Builder setPermission( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - oneofAccessCase_ = 2; - oneofAccess_ = value; - onChanged(); - return this; - } - /** - *
-       * The permission.
-       * 
- * - * string permission = 2; - * @return This builder for chaining. - */ - public Builder clearPermission() { - if (oneofAccessCase_ == 2) { - oneofAccessCase_ = 0; - oneofAccess_ = null; - onChanged(); - } - return this; - } - /** - *
-       * The permission.
-       * 
- * - * string permission = 2; - * @param value The bytes for permission to set. - * @return This builder for chaining. - */ - public Builder setPermissionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - oneofAccessCase_ = 2; - oneofAccess_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> analysisStateBuilder_; - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - * @return Whether the analysisState field is set. - */ - public boolean hasAnalysisState() { - return analysisStateBuilder_ != null || analysisState_ != null; - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - * @return The analysisState. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { - if (analysisStateBuilder_ == null) { - return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } else { - return analysisStateBuilder_.getMessage(); - } - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (analysisStateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisState_ = value; - onChanged(); - } else { - analysisStateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - public Builder setAnalysisState( - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { - if (analysisStateBuilder_ == null) { - analysisState_ = builderForValue.build(); - onChanged(); - } else { - analysisStateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (analysisStateBuilder_ == null) { - if (analysisState_ != null) { - analysisState_ = - com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_).mergeFrom(value).buildPartial(); - } else { - analysisState_ = value; - } - onChanged(); - } else { - analysisStateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - public Builder clearAnalysisState() { - if (analysisStateBuilder_ == null) { - analysisState_ = null; - onChanged(); - } else { - analysisState_ = null; - analysisStateBuilder_ = null; - } - - return this; - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { - - onChanged(); - return getAnalysisStateFieldBuilder().getBuilder(); - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { - if (analysisStateBuilder_ != null) { - return analysisStateBuilder_.getMessageOrBuilder(); - } else { - return analysisState_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } - } - /** - *
-       * The analysis state of this access.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> - getAnalysisStateFieldBuilder() { - if (analysisStateBuilder_ == null) { - analysisStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( - getAnalysisState(), - getParentForChildren(), - isClean()); - analysisState_ = null; - } - return analysisStateBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Access parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Access(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IdentityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The identity name in any form of members appear in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-     * as:
-     * - user:foo@google.com
-     * - group:group1@google.com
-     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-     * - projectOwner:some_project_id
-     * - domain:google.com
-     * - allUsers
-     * - etc.
-     * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * The identity name in any form of members appear in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-     * as:
-     * - user:foo@google.com
-     * - group:group1@google.com
-     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-     * - projectOwner:some_project_id
-     * - domain:google.com
-     * - allUsers
-     * - etc.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-     * The analysis state of this identity.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return Whether the analysisState field is set. - */ - boolean hasAnalysisState(); - /** - *
-     * The analysis state of this identity.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return The analysisState. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); - /** - *
-     * The analysis state of this identity.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); - } - /** - *
-   * An identity under analysis.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Identity} - */ - public static final class Identity extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) - IdentityOrBuilder { - private static final long serialVersionUID = 0L; - // Use Identity.newBuilder() to construct. - private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Identity() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Identity(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Identity( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; - if (analysisState_ != null) { - subBuilder = analysisState_.toBuilder(); - } - analysisState_ = input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(analysisState_); - analysisState_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-     * The identity name in any form of members appear in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-     * as:
-     * - user:foo@google.com
-     * - group:group1@google.com
-     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-     * - projectOwner:some_project_id
-     * - domain:google.com
-     * - allUsers
-     * - etc.
-     * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-     * The identity name in any form of members appear in
-     * [IAM policy
-     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-     * as:
-     * - user:foo@google.com
-     * - group:group1@google.com
-     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-     * - projectOwner:some_project_id
-     * - domain:google.com
-     * - allUsers
-     * - etc.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANALYSIS_STATE_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; - /** - *
-     * The analysis state of this identity.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return Whether the analysisState field is set. - */ - @java.lang.Override - public boolean hasAnalysisState() { - return analysisState_ != null; - } - /** - *
-     * The analysis state of this identity.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return The analysisState. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { - return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } - /** - *
-     * The analysis state of this identity.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { - return getAnalysisState(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (analysisState_ != null) { - output.writeMessage(2, getAnalysisState()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (analysisState_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getAnalysisState()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) obj; - - if (!getName() - .equals(other.getName())) return false; - if (hasAnalysisState() != other.hasAnalysisState()) return false; - if (hasAnalysisState()) { - if (!getAnalysisState() - .equals(other.getAnalysisState())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasAnalysisState()) { - hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; - hash = (53 * hash) + getAnalysisState().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * An identity under analysis.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Identity} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (analysisStateBuilder_ == null) { - analysisState_ = null; - } else { - analysisState_ = null; - analysisStateBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity build() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity(this); - result.name_ = name_; - if (analysisStateBuilder_ == null) { - result.analysisState_ = analysisState_; - } else { - result.analysisState_ = analysisStateBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasAnalysisState()) { - mergeAnalysisState(other.getAnalysisState()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-       * The identity name in any form of members appear in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-       * as:
-       * - user:foo@google.com
-       * - group:group1@google.com
-       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-       * - projectOwner:some_project_id
-       * - domain:google.com
-       * - allUsers
-       * - etc.
-       * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The identity name in any form of members appear in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-       * as:
-       * - user:foo@google.com
-       * - group:group1@google.com
-       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-       * - projectOwner:some_project_id
-       * - domain:google.com
-       * - allUsers
-       * - etc.
-       * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The identity name in any form of members appear in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-       * as:
-       * - user:foo@google.com
-       * - group:group1@google.com
-       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-       * - projectOwner:some_project_id
-       * - domain:google.com
-       * - allUsers
-       * - etc.
-       * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-       * The identity name in any form of members appear in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-       * as:
-       * - user:foo@google.com
-       * - group:group1@google.com
-       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-       * - projectOwner:some_project_id
-       * - domain:google.com
-       * - allUsers
-       * - etc.
-       * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-       * The identity name in any form of members appear in
-       * [IAM policy
-       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
-       * as:
-       * - user:foo@google.com
-       * - group:group1@google.com
-       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
-       * - projectOwner:some_project_id
-       * - domain:google.com
-       * - allUsers
-       * - etc.
-       * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> analysisStateBuilder_; - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return Whether the analysisState field is set. - */ - public boolean hasAnalysisState() { - return analysisStateBuilder_ != null || analysisState_ != null; - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - * @return The analysisState. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { - if (analysisStateBuilder_ == null) { - return analysisState_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } else { - return analysisStateBuilder_.getMessage(); - } - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (analysisStateBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - analysisState_ = value; - onChanged(); - } else { - analysisStateBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder setAnalysisState( - com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { - if (analysisStateBuilder_ == null) { - analysisState_ = builderForValue.build(); - onChanged(); - } else { - analysisStateBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { - if (analysisStateBuilder_ == null) { - if (analysisState_ != null) { - analysisState_ = - com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_).mergeFrom(value).buildPartial(); - } else { - analysisState_ = value; - } - onChanged(); - } else { - analysisStateBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public Builder clearAnalysisState() { - if (analysisStateBuilder_ == null) { - analysisState_ = null; - onChanged(); - } else { - analysisState_ = null; - analysisStateBuilder_ = null; - } - - return this; - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { - - onChanged(); - return getAnalysisStateFieldBuilder().getBuilder(); - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { - if (analysisStateBuilder_ != null) { - return analysisStateBuilder_.getMessageOrBuilder(); - } else { - return analysisState_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() : analysisState_; - } - } - /** - *
-       * The analysis state of this identity.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> - getAnalysisStateFieldBuilder() { - if (analysisStateBuilder_ == null) { - analysisStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisState, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( - getAnalysisState(), - getParentForChildren(), - isClean()); - analysisState_ = null; - } - return analysisStateBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Identity parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Identity(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface EdgeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The source node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string source_node = 1; - * @return The sourceNode. - */ - java.lang.String getSourceNode(); - /** - *
-     * The source node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string source_node = 1; - * @return The bytes for sourceNode. - */ - com.google.protobuf.ByteString - getSourceNodeBytes(); - - /** - *
-     * The target node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string target_node = 2; - * @return The targetNode. - */ - java.lang.String getTargetNode(); - /** - *
-     * The target node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string target_node = 2; - * @return The bytes for targetNode. - */ - com.google.protobuf.ByteString - getTargetNodeBytes(); - } - /** - *
-   * A directional edge.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Edge} - */ - public static final class Edge extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) - EdgeOrBuilder { - private static final long serialVersionUID = 0L; - // Use Edge.newBuilder() to construct. - private Edge(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Edge() { - sourceNode_ = ""; - targetNode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Edge(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Edge( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceNode_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - targetNode_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder.class); - } - - public static final int SOURCE_NODE_FIELD_NUMBER = 1; - private volatile java.lang.Object sourceNode_; - /** - *
-     * The source node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string source_node = 1; - * @return The sourceNode. - */ - @java.lang.Override - public java.lang.String getSourceNode() { - java.lang.Object ref = sourceNode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceNode_ = s; - return s; - } - } - /** - *
-     * The source node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string source_node = 1; - * @return The bytes for sourceNode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceNodeBytes() { - java.lang.Object ref = sourceNode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceNode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_NODE_FIELD_NUMBER = 2; - private volatile java.lang.Object targetNode_; - /** - *
-     * The target node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string target_node = 2; - * @return The targetNode. - */ - @java.lang.Override - public java.lang.String getTargetNode() { - java.lang.Object ref = targetNode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetNode_ = s; - return s; - } - } - /** - *
-     * The target node of the edge. For example, it could be a full resource
-     * name for a resource node or an email of an identity.
-     * 
- * - * string target_node = 2; - * @return The bytes for targetNode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTargetNodeBytes() { - java.lang.Object ref = targetNode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetNode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceNode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceNode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetNode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetNode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceNode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceNode_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetNode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetNode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) obj; - - if (!getSourceNode() - .equals(other.getSourceNode())) return false; - if (!getTargetNode() - .equals(other.getTargetNode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SOURCE_NODE_FIELD_NUMBER; - hash = (53 * hash) + getSourceNode().hashCode(); - hash = (37 * hash) + TARGET_NODE_FIELD_NUMBER; - hash = (53 * hash) + getTargetNode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * A directional edge.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Edge} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) - com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - sourceNode_ = ""; - - targetNode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge build() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge(this); - result.sourceNode_ = sourceNode_; - result.targetNode_ = targetNode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()) return this; - if (!other.getSourceNode().isEmpty()) { - sourceNode_ = other.sourceNode_; - onChanged(); - } - if (!other.getTargetNode().isEmpty()) { - targetNode_ = other.targetNode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object sourceNode_ = ""; - /** - *
-       * The source node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string source_node = 1; - * @return The sourceNode. - */ - public java.lang.String getSourceNode() { - java.lang.Object ref = sourceNode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceNode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The source node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string source_node = 1; - * @return The bytes for sourceNode. - */ - public com.google.protobuf.ByteString - getSourceNodeBytes() { - java.lang.Object ref = sourceNode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceNode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The source node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string source_node = 1; - * @param value The sourceNode to set. - * @return This builder for chaining. - */ - public Builder setSourceNode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceNode_ = value; - onChanged(); - return this; - } - /** - *
-       * The source node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string source_node = 1; - * @return This builder for chaining. - */ - public Builder clearSourceNode() { - - sourceNode_ = getDefaultInstance().getSourceNode(); - onChanged(); - return this; - } - /** - *
-       * The source node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string source_node = 1; - * @param value The bytes for sourceNode to set. - * @return This builder for chaining. - */ - public Builder setSourceNodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceNode_ = value; - onChanged(); - return this; - } - - private java.lang.Object targetNode_ = ""; - /** - *
-       * The target node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string target_node = 2; - * @return The targetNode. - */ - public java.lang.String getTargetNode() { - java.lang.Object ref = targetNode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetNode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The target node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string target_node = 2; - * @return The bytes for targetNode. - */ - public com.google.protobuf.ByteString - getTargetNodeBytes() { - java.lang.Object ref = targetNode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetNode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The target node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string target_node = 2; - * @param value The targetNode to set. - * @return This builder for chaining. - */ - public Builder setTargetNode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetNode_ = value; - onChanged(); - return this; - } - /** - *
-       * The target node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string target_node = 2; - * @return This builder for chaining. - */ - public Builder clearTargetNode() { - - targetNode_ = getDefaultInstance().getTargetNode(); - onChanged(); - return this; - } - /** - *
-       * The target node of the edge. For example, it could be a full resource
-       * name for a resource node or an email of an identity.
-       * 
- * - * string target_node = 2; - * @param value The bytes for targetNode to set. - * @return This builder for chaining. - */ - public Builder setTargetNodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetNode_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Edge parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Edge(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AccessControlListOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - java.util.List - getResourcesList(); - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index); - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - int getResourcesCount(); - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - java.util.List - getResourcesOrBuilderList(); - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder getResourcesOrBuilder( - int index); - - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - java.util.List - getAccessesList(); - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index); - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - int getAccessesCount(); - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - java.util.List - getAccessesOrBuilderList(); - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( - int index); - - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - java.util.List - getResourceEdgesList(); - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index); - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - int getResourceEdgesCount(); - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - java.util.List - getResourceEdgesOrBuilderList(); - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( - int index); - - /** - *
-     * Condition evaluation for this AccessControlList, if there is a condition
-     * defined in the above IAM policy binding.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - * @return Whether the conditionEvaluation field is set. - */ - boolean hasConditionEvaluation(); - /** - *
-     * Condition evaluation for this AccessControlList, if there is a condition
-     * defined in the above IAM policy binding.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - * @return The conditionEvaluation. - */ - com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation(); - /** - *
-     * Condition evaluation for this AccessControlList, if there is a condition
-     * defined in the above IAM policy binding.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - com.google.cloud.asset.v1.ConditionEvaluationOrBuilder getConditionEvaluationOrBuilder(); - } - /** - *
-   * An access control list, derived from the above IAM policy binding, which
-   * contains a set of resources and accesses. May include one
-   * item from each set to compose an access control entry.
-   * NOTICE that there could be multiple access control lists for one IAM policy
-   * binding. The access control lists are created based on resource and access
-   * combinations.
-   * For example, assume we have the following cases in one IAM policy binding:
-   * - Permission P1 and P2 apply to resource R1 and R2;
-   * - Permission P3 applies to resource R2 and R3;
-   * This will result in the following access control lists:
-   * - AccessControlList 1: [R1, R2], [P1, P2]
-   * - AccessControlList 2: [R2, R3], [P3]
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList} - */ - public static final class AccessControlList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) - AccessControlListOrBuilder { - private static final long serialVersionUID = 0L; - // Use AccessControlList.newBuilder() to construct. - private AccessControlList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AccessControlList() { - resources_ = java.util.Collections.emptyList(); - accesses_ = java.util.Collections.emptyList(); - resourceEdges_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AccessControlList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AccessControlList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resources_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - accesses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - accesses_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - resourceEdges_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - resourceEdges_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.parser(), extensionRegistry)); - break; - } - case 34: { - com.google.cloud.asset.v1.ConditionEvaluation.Builder subBuilder = null; - if (conditionEvaluation_ != null) { - subBuilder = conditionEvaluation_.toBuilder(); - } - conditionEvaluation_ = input.readMessage(com.google.cloud.asset.v1.ConditionEvaluation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(conditionEvaluation_); - conditionEvaluation_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - resources_ = java.util.Collections.unmodifiableList(resources_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - accesses_ = java.util.Collections.unmodifiableList(accesses_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - resourceEdges_ = java.util.Collections.unmodifiableList(resourceEdges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder.class); - } - - public static final int RESOURCES_FIELD_NUMBER = 1; - private java.util.List resources_; - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - @java.lang.Override - public java.util.List getResourcesList() { - return resources_; - } - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - @java.lang.Override - public java.util.List - getResourcesOrBuilderList() { - return resources_; - } - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - @java.lang.Override - public int getResourcesCount() { - return resources_.size(); - } - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index) { - return resources_.get(index); - } - /** - *
-     * The resources that match one of the following conditions:
-     * - The resource_selector, if it is specified in request;
-     * - Otherwise, resources reachable from the policy attached resource.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder getResourcesOrBuilder( - int index) { - return resources_.get(index); - } - - public static final int ACCESSES_FIELD_NUMBER = 2; - private java.util.List accesses_; - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - @java.lang.Override - public java.util.List getAccessesList() { - return accesses_; - } - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - @java.lang.Override - public java.util.List - getAccessesOrBuilderList() { - return accesses_; - } - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - @java.lang.Override - public int getAccessesCount() { - return accesses_.size(); - } - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index) { - return accesses_.get(index); - } - /** - *
-     * The accesses that match one of the following conditions:
-     * - The access_selector, if it is specified in request;
-     * - Otherwise, access specifiers reachable from the policy binding's role.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( - int index) { - return accesses_.get(index); - } - - public static final int RESOURCE_EDGES_FIELD_NUMBER = 3; - private java.util.List resourceEdges_; - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - @java.lang.Override - public java.util.List getResourceEdgesList() { - return resourceEdges_; - } - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - @java.lang.Override - public java.util.List - getResourceEdgesOrBuilderList() { - return resourceEdges_; - } - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - @java.lang.Override - public int getResourceEdgesCount() { - return resourceEdges_.size(); - } - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index) { - return resourceEdges_.get(index); - } - /** - *
-     * Resource edges of the graph starting from the policy attached
-     * resource to any descendant resources. The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains the full resource name of a parent resource and
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains the full resource name of a child resource. This field is
-     * present only if the output_resource_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( - int index) { - return resourceEdges_.get(index); - } - - public static final int CONDITION_EVALUATION_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1.ConditionEvaluation conditionEvaluation_; - /** - *
-     * Condition evaluation for this AccessControlList, if there is a condition
-     * defined in the above IAM policy binding.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - * @return Whether the conditionEvaluation field is set. - */ - @java.lang.Override - public boolean hasConditionEvaluation() { - return conditionEvaluation_ != null; - } - /** - *
-     * Condition evaluation for this AccessControlList, if there is a condition
-     * defined in the above IAM policy binding.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - * @return The conditionEvaluation. - */ - @java.lang.Override - public com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation() { - return conditionEvaluation_ == null ? com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() : conditionEvaluation_; - } - /** - *
-     * Condition evaluation for this AccessControlList, if there is a condition
-     * defined in the above IAM policy binding.
-     * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.ConditionEvaluationOrBuilder getConditionEvaluationOrBuilder() { - return getConditionEvaluation(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < resources_.size(); i++) { - output.writeMessage(1, resources_.get(i)); - } - for (int i = 0; i < accesses_.size(); i++) { - output.writeMessage(2, accesses_.get(i)); - } - for (int i = 0; i < resourceEdges_.size(); i++) { - output.writeMessage(3, resourceEdges_.get(i)); - } - if (conditionEvaluation_ != null) { - output.writeMessage(4, getConditionEvaluation()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < resources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, resources_.get(i)); - } - for (int i = 0; i < accesses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, accesses_.get(i)); - } - for (int i = 0; i < resourceEdges_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, resourceEdges_.get(i)); - } - if (conditionEvaluation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getConditionEvaluation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) obj; - - if (!getResourcesList() - .equals(other.getResourcesList())) return false; - if (!getAccessesList() - .equals(other.getAccessesList())) return false; - if (!getResourceEdgesList() - .equals(other.getResourceEdgesList())) return false; - if (hasConditionEvaluation() != other.hasConditionEvaluation()) return false; - if (hasConditionEvaluation()) { - if (!getConditionEvaluation() - .equals(other.getConditionEvaluation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResourcesCount() > 0) { - hash = (37 * hash) + RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getResourcesList().hashCode(); - } - if (getAccessesCount() > 0) { - hash = (37 * hash) + ACCESSES_FIELD_NUMBER; - hash = (53 * hash) + getAccessesList().hashCode(); - } - if (getResourceEdgesCount() > 0) { - hash = (37 * hash) + RESOURCE_EDGES_FIELD_NUMBER; - hash = (53 * hash) + getResourceEdgesList().hashCode(); - } - if (hasConditionEvaluation()) { - hash = (37 * hash) + CONDITION_EVALUATION_FIELD_NUMBER; - hash = (53 * hash) + getConditionEvaluation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * An access control list, derived from the above IAM policy binding, which
-     * contains a set of resources and accesses. May include one
-     * item from each set to compose an access control entry.
-     * NOTICE that there could be multiple access control lists for one IAM policy
-     * binding. The access control lists are created based on resource and access
-     * combinations.
-     * For example, assume we have the following cases in one IAM policy binding:
-     * - Permission P1 and P2 apply to resource R1 and R2;
-     * - Permission P3 applies to resource R2 and R3;
-     * This will result in the following access control lists:
-     * - AccessControlList 1: [R1, R2], [P1, P2]
-     * - AccessControlList 2: [R2, R3], [P3]
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResourcesFieldBuilder(); - getAccessesFieldBuilder(); - getResourceEdgesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (resourcesBuilder_ == null) { - resources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resourcesBuilder_.clear(); - } - if (accessesBuilder_ == null) { - accesses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - accessesBuilder_.clear(); - } - if (resourceEdgesBuilder_ == null) { - resourceEdges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - resourceEdgesBuilder_.clear(); - } - if (conditionEvaluationBuilder_ == null) { - conditionEvaluation_ = null; - } else { - conditionEvaluation_ = null; - conditionEvaluationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList build() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList(this); - int from_bitField0_ = bitField0_; - if (resourcesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - resources_ = java.util.Collections.unmodifiableList(resources_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.resources_ = resources_; - } else { - result.resources_ = resourcesBuilder_.build(); - } - if (accessesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - accesses_ = java.util.Collections.unmodifiableList(accesses_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.accesses_ = accesses_; - } else { - result.accesses_ = accessesBuilder_.build(); - } - if (resourceEdgesBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - resourceEdges_ = java.util.Collections.unmodifiableList(resourceEdges_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.resourceEdges_ = resourceEdges_; - } else { - result.resourceEdges_ = resourceEdgesBuilder_.build(); - } - if (conditionEvaluationBuilder_ == null) { - result.conditionEvaluation_ = conditionEvaluation_; - } else { - result.conditionEvaluation_ = conditionEvaluationBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance()) return this; - if (resourcesBuilder_ == null) { - if (!other.resources_.isEmpty()) { - if (resources_.isEmpty()) { - resources_ = other.resources_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResourcesIsMutable(); - resources_.addAll(other.resources_); - } - onChanged(); - } - } else { - if (!other.resources_.isEmpty()) { - if (resourcesBuilder_.isEmpty()) { - resourcesBuilder_.dispose(); - resourcesBuilder_ = null; - resources_ = other.resources_; - bitField0_ = (bitField0_ & ~0x00000001); - resourcesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResourcesFieldBuilder() : null; - } else { - resourcesBuilder_.addAllMessages(other.resources_); - } - } - } - if (accessesBuilder_ == null) { - if (!other.accesses_.isEmpty()) { - if (accesses_.isEmpty()) { - accesses_ = other.accesses_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAccessesIsMutable(); - accesses_.addAll(other.accesses_); - } - onChanged(); - } - } else { - if (!other.accesses_.isEmpty()) { - if (accessesBuilder_.isEmpty()) { - accessesBuilder_.dispose(); - accessesBuilder_ = null; - accesses_ = other.accesses_; - bitField0_ = (bitField0_ & ~0x00000002); - accessesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAccessesFieldBuilder() : null; - } else { - accessesBuilder_.addAllMessages(other.accesses_); - } - } - } - if (resourceEdgesBuilder_ == null) { - if (!other.resourceEdges_.isEmpty()) { - if (resourceEdges_.isEmpty()) { - resourceEdges_ = other.resourceEdges_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureResourceEdgesIsMutable(); - resourceEdges_.addAll(other.resourceEdges_); - } - onChanged(); - } - } else { - if (!other.resourceEdges_.isEmpty()) { - if (resourceEdgesBuilder_.isEmpty()) { - resourceEdgesBuilder_.dispose(); - resourceEdgesBuilder_ = null; - resourceEdges_ = other.resourceEdges_; - bitField0_ = (bitField0_ & ~0x00000004); - resourceEdgesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResourceEdgesFieldBuilder() : null; - } else { - resourceEdgesBuilder_.addAllMessages(other.resourceEdges_); - } - } - } - if (other.hasConditionEvaluation()) { - mergeConditionEvaluation(other.getConditionEvaluation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List resources_ = - java.util.Collections.emptyList(); - private void ensureResourcesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - resources_ = new java.util.ArrayList(resources_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> resourcesBuilder_; - - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public java.util.List getResourcesList() { - if (resourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(resources_); - } else { - return resourcesBuilder_.getMessageList(); - } - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public int getResourcesCount() { - if (resourcesBuilder_ == null) { - return resources_.size(); - } else { - return resourcesBuilder_.getCount(); - } - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index) { - if (resourcesBuilder_ == null) { - return resources_.get(index); - } else { - return resourcesBuilder_.getMessage(index); - } - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder setResources( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { - if (resourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourcesIsMutable(); - resources_.set(index, value); - onChanged(); - } else { - resourcesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder setResources( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { - if (resourcesBuilder_ == null) { - ensureResourcesIsMutable(); - resources_.set(index, builderForValue.build()); - onChanged(); - } else { - resourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder addResources(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { - if (resourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourcesIsMutable(); - resources_.add(value); - onChanged(); - } else { - resourcesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder addResources( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { - if (resourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourcesIsMutable(); - resources_.add(index, value); - onChanged(); - } else { - resourcesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder addResources( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { - if (resourcesBuilder_ == null) { - ensureResourcesIsMutable(); - resources_.add(builderForValue.build()); - onChanged(); - } else { - resourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder addResources( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { - if (resourcesBuilder_ == null) { - ensureResourcesIsMutable(); - resources_.add(index, builderForValue.build()); - onChanged(); - } else { - resourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder addAllResources( - java.lang.Iterable values) { - if (resourcesBuilder_ == null) { - ensureResourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resources_); - onChanged(); - } else { - resourcesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder clearResources() { - if (resourcesBuilder_ == null) { - resources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resourcesBuilder_.clear(); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public Builder removeResources(int index) { - if (resourcesBuilder_ == null) { - ensureResourcesIsMutable(); - resources_.remove(index); - onChanged(); - } else { - resourcesBuilder_.remove(index); - } - return this; - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder getResourcesBuilder( - int index) { - return getResourcesFieldBuilder().getBuilder(index); - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder getResourcesOrBuilder( - int index) { - if (resourcesBuilder_ == null) { - return resources_.get(index); } else { - return resourcesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public java.util.List - getResourcesOrBuilderList() { - if (resourcesBuilder_ != null) { - return resourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(resources_); - } - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder addResourcesBuilder() { - return getResourcesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()); - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder addResourcesBuilder( - int index) { - return getResourcesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()); - } - /** - *
-       * The resources that match one of the following conditions:
-       * - The resource_selector, if it is specified in request;
-       * - Otherwise, resources reachable from the policy attached resource.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; - */ - public java.util.List - getResourcesBuilderList() { - return getResourcesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> - getResourcesFieldBuilder() { - if (resourcesBuilder_ == null) { - resourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder>( - resources_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - resources_ = null; - } - return resourcesBuilder_; - } - - private java.util.List accesses_ = - java.util.Collections.emptyList(); - private void ensureAccessesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - accesses_ = new java.util.ArrayList(accesses_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> accessesBuilder_; - - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public java.util.List getAccessesList() { - if (accessesBuilder_ == null) { - return java.util.Collections.unmodifiableList(accesses_); - } else { - return accessesBuilder_.getMessageList(); - } - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public int getAccessesCount() { - if (accessesBuilder_ == null) { - return accesses_.size(); - } else { - return accessesBuilder_.getCount(); - } - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index) { - if (accessesBuilder_ == null) { - return accesses_.get(index); - } else { - return accessesBuilder_.getMessage(index); - } - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder setAccesses( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { - if (accessesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessesIsMutable(); - accesses_.set(index, value); - onChanged(); - } else { - accessesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder setAccesses( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { - if (accessesBuilder_ == null) { - ensureAccessesIsMutable(); - accesses_.set(index, builderForValue.build()); - onChanged(); - } else { - accessesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder addAccesses(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { - if (accessesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessesIsMutable(); - accesses_.add(value); - onChanged(); - } else { - accessesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder addAccesses( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { - if (accessesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessesIsMutable(); - accesses_.add(index, value); - onChanged(); - } else { - accessesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder addAccesses( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { - if (accessesBuilder_ == null) { - ensureAccessesIsMutable(); - accesses_.add(builderForValue.build()); - onChanged(); - } else { - accessesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder addAccesses( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { - if (accessesBuilder_ == null) { - ensureAccessesIsMutable(); - accesses_.add(index, builderForValue.build()); - onChanged(); - } else { - accessesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder addAllAccesses( - java.lang.Iterable values) { - if (accessesBuilder_ == null) { - ensureAccessesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, accesses_); - onChanged(); - } else { - accessesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder clearAccesses() { - if (accessesBuilder_ == null) { - accesses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - accessesBuilder_.clear(); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public Builder removeAccesses(int index) { - if (accessesBuilder_ == null) { - ensureAccessesIsMutable(); - accesses_.remove(index); - onChanged(); - } else { - accessesBuilder_.remove(index); - } - return this; - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder getAccessesBuilder( - int index) { - return getAccessesFieldBuilder().getBuilder(index); - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( - int index) { - if (accessesBuilder_ == null) { - return accesses_.get(index); } else { - return accessesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public java.util.List - getAccessesOrBuilderList() { - if (accessesBuilder_ != null) { - return accessesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(accesses_); - } - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder addAccessesBuilder() { - return getAccessesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()); - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder addAccessesBuilder( - int index) { - return getAccessesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()); - } - /** - *
-       * The accesses that match one of the following conditions:
-       * - The access_selector, if it is specified in request;
-       * - Otherwise, access specifiers reachable from the policy binding's role.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; - */ - public java.util.List - getAccessesBuilderList() { - return getAccessesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> - getAccessesFieldBuilder() { - if (accessesBuilder_ == null) { - accessesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder>( - accesses_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - accesses_ = null; - } - return accessesBuilder_; - } - - private java.util.List resourceEdges_ = - java.util.Collections.emptyList(); - private void ensureResourceEdgesIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - resourceEdges_ = new java.util.ArrayList(resourceEdges_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> resourceEdgesBuilder_; - - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public java.util.List getResourceEdgesList() { - if (resourceEdgesBuilder_ == null) { - return java.util.Collections.unmodifiableList(resourceEdges_); - } else { - return resourceEdgesBuilder_.getMessageList(); - } - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public int getResourceEdgesCount() { - if (resourceEdgesBuilder_ == null) { - return resourceEdges_.size(); - } else { - return resourceEdgesBuilder_.getCount(); - } - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index) { - if (resourceEdgesBuilder_ == null) { - return resourceEdges_.get(index); - } else { - return resourceEdgesBuilder_.getMessage(index); - } - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder setResourceEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { - if (resourceEdgesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceEdgesIsMutable(); - resourceEdges_.set(index, value); - onChanged(); - } else { - resourceEdgesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder setResourceEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { - if (resourceEdgesBuilder_ == null) { - ensureResourceEdgesIsMutable(); - resourceEdges_.set(index, builderForValue.build()); - onChanged(); - } else { - resourceEdgesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder addResourceEdges(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { - if (resourceEdgesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceEdgesIsMutable(); - resourceEdges_.add(value); - onChanged(); - } else { - resourceEdgesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder addResourceEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { - if (resourceEdgesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResourceEdgesIsMutable(); - resourceEdges_.add(index, value); - onChanged(); - } else { - resourceEdgesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder addResourceEdges( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { - if (resourceEdgesBuilder_ == null) { - ensureResourceEdgesIsMutable(); - resourceEdges_.add(builderForValue.build()); - onChanged(); - } else { - resourceEdgesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder addResourceEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { - if (resourceEdgesBuilder_ == null) { - ensureResourceEdgesIsMutable(); - resourceEdges_.add(index, builderForValue.build()); - onChanged(); - } else { - resourceEdgesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder addAllResourceEdges( - java.lang.Iterable values) { - if (resourceEdgesBuilder_ == null) { - ensureResourceEdgesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, resourceEdges_); - onChanged(); - } else { - resourceEdgesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder clearResourceEdges() { - if (resourceEdgesBuilder_ == null) { - resourceEdges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - resourceEdgesBuilder_.clear(); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public Builder removeResourceEdges(int index) { - if (resourceEdgesBuilder_ == null) { - ensureResourceEdgesIsMutable(); - resourceEdges_.remove(index); - onChanged(); - } else { - resourceEdgesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder getResourceEdgesBuilder( - int index) { - return getResourceEdgesFieldBuilder().getBuilder(index); - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( - int index) { - if (resourceEdgesBuilder_ == null) { - return resourceEdges_.get(index); } else { - return resourceEdgesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public java.util.List - getResourceEdgesOrBuilderList() { - if (resourceEdgesBuilder_ != null) { - return resourceEdgesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(resourceEdges_); - } - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addResourceEdgesBuilder() { - return getResourceEdgesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addResourceEdgesBuilder( - int index) { - return getResourceEdgesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); - } - /** - *
-       * Resource edges of the graph starting from the policy attached
-       * resource to any descendant resources. The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains the full resource name of a parent resource and
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains the full resource name of a child resource. This field is
-       * present only if the output_resource_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; - */ - public java.util.List - getResourceEdgesBuilderList() { - return getResourceEdgesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> - getResourceEdgesFieldBuilder() { - if (resourceEdgesBuilder_ == null) { - resourceEdgesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder>( - resourceEdges_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - resourceEdges_ = null; - } - return resourceEdgesBuilder_; - } - - private com.google.cloud.asset.v1.ConditionEvaluation conditionEvaluation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.ConditionEvaluation, com.google.cloud.asset.v1.ConditionEvaluation.Builder, com.google.cloud.asset.v1.ConditionEvaluationOrBuilder> conditionEvaluationBuilder_; - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - * @return Whether the conditionEvaluation field is set. - */ - public boolean hasConditionEvaluation() { - return conditionEvaluationBuilder_ != null || conditionEvaluation_ != null; - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - * @return The conditionEvaluation. - */ - public com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation() { - if (conditionEvaluationBuilder_ == null) { - return conditionEvaluation_ == null ? com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() : conditionEvaluation_; - } else { - return conditionEvaluationBuilder_.getMessage(); - } - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - public Builder setConditionEvaluation(com.google.cloud.asset.v1.ConditionEvaluation value) { - if (conditionEvaluationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - conditionEvaluation_ = value; - onChanged(); - } else { - conditionEvaluationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - public Builder setConditionEvaluation( - com.google.cloud.asset.v1.ConditionEvaluation.Builder builderForValue) { - if (conditionEvaluationBuilder_ == null) { - conditionEvaluation_ = builderForValue.build(); - onChanged(); - } else { - conditionEvaluationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - public Builder mergeConditionEvaluation(com.google.cloud.asset.v1.ConditionEvaluation value) { - if (conditionEvaluationBuilder_ == null) { - if (conditionEvaluation_ != null) { - conditionEvaluation_ = - com.google.cloud.asset.v1.ConditionEvaluation.newBuilder(conditionEvaluation_).mergeFrom(value).buildPartial(); - } else { - conditionEvaluation_ = value; - } - onChanged(); - } else { - conditionEvaluationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - public Builder clearConditionEvaluation() { - if (conditionEvaluationBuilder_ == null) { - conditionEvaluation_ = null; - onChanged(); - } else { - conditionEvaluation_ = null; - conditionEvaluationBuilder_ = null; - } - - return this; - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - public com.google.cloud.asset.v1.ConditionEvaluation.Builder getConditionEvaluationBuilder() { - - onChanged(); - return getConditionEvaluationFieldBuilder().getBuilder(); - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - public com.google.cloud.asset.v1.ConditionEvaluationOrBuilder getConditionEvaluationOrBuilder() { - if (conditionEvaluationBuilder_ != null) { - return conditionEvaluationBuilder_.getMessageOrBuilder(); - } else { - return conditionEvaluation_ == null ? - com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() : conditionEvaluation_; - } - } - /** - *
-       * Condition evaluation for this AccessControlList, if there is a condition
-       * defined in the above IAM policy binding.
-       * 
- * - * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.ConditionEvaluation, com.google.cloud.asset.v1.ConditionEvaluation.Builder, com.google.cloud.asset.v1.ConditionEvaluationOrBuilder> - getConditionEvaluationFieldBuilder() { - if (conditionEvaluationBuilder_ == null) { - conditionEvaluationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.ConditionEvaluation, com.google.cloud.asset.v1.ConditionEvaluation.Builder, com.google.cloud.asset.v1.ConditionEvaluationOrBuilder>( - getConditionEvaluation(), - getParentForChildren(), - isClean()); - conditionEvaluation_ = null; - } - return conditionEvaluationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AccessControlList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AccessControlList(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IdentityListOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - java.util.List - getIdentitiesList(); - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index); - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - int getIdentitiesCount(); - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - java.util.List - getIdentitiesOrBuilderList(); - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder getIdentitiesOrBuilder( - int index); - - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - java.util.List - getGroupEdgesList(); - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index); - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - int getGroupEdgesCount(); - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - java.util.List - getGroupEdgesOrBuilderList(); - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( - int index); - } - /** - *
-   * The identities and group edges.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList} - */ - public static final class IdentityList extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) - IdentityListOrBuilder { - private static final long serialVersionUID = 0L; - // Use IdentityList.newBuilder() to construct. - private IdentityList(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IdentityList() { - identities_ = java.util.Collections.emptyList(); - groupEdges_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IdentityList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IdentityList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - identities_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - identities_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - groupEdges_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - groupEdges_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - identities_ = java.util.Collections.unmodifiableList(identities_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - groupEdges_ = java.util.Collections.unmodifiableList(groupEdges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder.class); - } - - public static final int IDENTITIES_FIELD_NUMBER = 1; - private java.util.List identities_; - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - @java.lang.Override - public java.util.List getIdentitiesList() { - return identities_; - } - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - @java.lang.Override - public java.util.List - getIdentitiesOrBuilderList() { - return identities_; - } - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - @java.lang.Override - public int getIdentitiesCount() { - return identities_.size(); - } - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index) { - return identities_.get(index); - } - /** - *
-     * Only the identities that match one of the following conditions will be
-     * presented:
-     * - The identity_selector, if it is specified in request;
-     * - Otherwise, identities reachable from the policy binding's members.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder getIdentitiesOrBuilder( - int index) { - return identities_.get(index); - } - - public static final int GROUP_EDGES_FIELD_NUMBER = 2; - private java.util.List groupEdges_; - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - @java.lang.Override - public java.util.List getGroupEdgesList() { - return groupEdges_; - } - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - @java.lang.Override - public java.util.List - getGroupEdgesOrBuilderList() { - return groupEdges_; - } - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - @java.lang.Override - public int getGroupEdgesCount() { - return groupEdges_.size(); - } - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index) { - return groupEdges_.get(index); - } - /** - *
-     * Group identity edges of the graph starting from the binding's
-     * group members to any node of the
-     * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-     * The
-     * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-     * contains a group, such as `group:parent@google.com`. The
-     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-     * contains a member of the group, such as `group:child@google.com` or
-     * `user:foo@google.com`. This field is present only if the
-     * output_group_edges option is enabled in request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( - int index) { - return groupEdges_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < identities_.size(); i++) { - output.writeMessage(1, identities_.get(i)); - } - for (int i = 0; i < groupEdges_.size(); i++) { - output.writeMessage(2, groupEdges_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < identities_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, identities_.get(i)); - } - for (int i = 0; i < groupEdges_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, groupEdges_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) obj; - - if (!getIdentitiesList() - .equals(other.getIdentitiesList())) return false; - if (!getGroupEdgesList() - .equals(other.getGroupEdgesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIdentitiesCount() > 0) { - hash = (37 * hash) + IDENTITIES_FIELD_NUMBER; - hash = (53 * hash) + getIdentitiesList().hashCode(); - } - if (getGroupEdgesCount() > 0) { - hash = (37 * hash) + GROUP_EDGES_FIELD_NUMBER; - hash = (53 * hash) + getGroupEdgesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The identities and group edges.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getIdentitiesFieldBuilder(); - getGroupEdgesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (identitiesBuilder_ == null) { - identities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - identitiesBuilder_.clear(); - } - if (groupEdgesBuilder_ == null) { - groupEdges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - groupEdgesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList build() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList(this); - int from_bitField0_ = bitField0_; - if (identitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - identities_ = java.util.Collections.unmodifiableList(identities_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.identities_ = identities_; - } else { - result.identities_ = identitiesBuilder_.build(); - } - if (groupEdgesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - groupEdges_ = java.util.Collections.unmodifiableList(groupEdges_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.groupEdges_ = groupEdges_; - } else { - result.groupEdges_ = groupEdgesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance()) return this; - if (identitiesBuilder_ == null) { - if (!other.identities_.isEmpty()) { - if (identities_.isEmpty()) { - identities_ = other.identities_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIdentitiesIsMutable(); - identities_.addAll(other.identities_); - } - onChanged(); - } - } else { - if (!other.identities_.isEmpty()) { - if (identitiesBuilder_.isEmpty()) { - identitiesBuilder_.dispose(); - identitiesBuilder_ = null; - identities_ = other.identities_; - bitField0_ = (bitField0_ & ~0x00000001); - identitiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getIdentitiesFieldBuilder() : null; - } else { - identitiesBuilder_.addAllMessages(other.identities_); - } - } - } - if (groupEdgesBuilder_ == null) { - if (!other.groupEdges_.isEmpty()) { - if (groupEdges_.isEmpty()) { - groupEdges_ = other.groupEdges_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureGroupEdgesIsMutable(); - groupEdges_.addAll(other.groupEdges_); - } - onChanged(); - } - } else { - if (!other.groupEdges_.isEmpty()) { - if (groupEdgesBuilder_.isEmpty()) { - groupEdgesBuilder_.dispose(); - groupEdgesBuilder_ = null; - groupEdges_ = other.groupEdges_; - bitField0_ = (bitField0_ & ~0x00000002); - groupEdgesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGroupEdgesFieldBuilder() : null; - } else { - groupEdgesBuilder_.addAllMessages(other.groupEdges_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List identities_ = - java.util.Collections.emptyList(); - private void ensureIdentitiesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - identities_ = new java.util.ArrayList(identities_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> identitiesBuilder_; - - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public java.util.List getIdentitiesList() { - if (identitiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(identities_); - } else { - return identitiesBuilder_.getMessageList(); - } - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public int getIdentitiesCount() { - if (identitiesBuilder_ == null) { - return identities_.size(); - } else { - return identitiesBuilder_.getCount(); - } - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index) { - if (identitiesBuilder_ == null) { - return identities_.get(index); - } else { - return identitiesBuilder_.getMessage(index); - } - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder setIdentities( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { - if (identitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentitiesIsMutable(); - identities_.set(index, value); - onChanged(); - } else { - identitiesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder setIdentities( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { - if (identitiesBuilder_ == null) { - ensureIdentitiesIsMutable(); - identities_.set(index, builderForValue.build()); - onChanged(); - } else { - identitiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder addIdentities(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { - if (identitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentitiesIsMutable(); - identities_.add(value); - onChanged(); - } else { - identitiesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder addIdentities( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { - if (identitiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIdentitiesIsMutable(); - identities_.add(index, value); - onChanged(); - } else { - identitiesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder addIdentities( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { - if (identitiesBuilder_ == null) { - ensureIdentitiesIsMutable(); - identities_.add(builderForValue.build()); - onChanged(); - } else { - identitiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder addIdentities( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { - if (identitiesBuilder_ == null) { - ensureIdentitiesIsMutable(); - identities_.add(index, builderForValue.build()); - onChanged(); - } else { - identitiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder addAllIdentities( - java.lang.Iterable values) { - if (identitiesBuilder_ == null) { - ensureIdentitiesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, identities_); - onChanged(); - } else { - identitiesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder clearIdentities() { - if (identitiesBuilder_ == null) { - identities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - identitiesBuilder_.clear(); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public Builder removeIdentities(int index) { - if (identitiesBuilder_ == null) { - ensureIdentitiesIsMutable(); - identities_.remove(index); - onChanged(); - } else { - identitiesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder getIdentitiesBuilder( - int index) { - return getIdentitiesFieldBuilder().getBuilder(index); - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder getIdentitiesOrBuilder( - int index) { - if (identitiesBuilder_ == null) { - return identities_.get(index); } else { - return identitiesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public java.util.List - getIdentitiesOrBuilderList() { - if (identitiesBuilder_ != null) { - return identitiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(identities_); - } - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder addIdentitiesBuilder() { - return getIdentitiesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()); - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder addIdentitiesBuilder( - int index) { - return getIdentitiesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()); - } - /** - *
-       * Only the identities that match one of the following conditions will be
-       * presented:
-       * - The identity_selector, if it is specified in request;
-       * - Otherwise, identities reachable from the policy binding's members.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; - */ - public java.util.List - getIdentitiesBuilderList() { - return getIdentitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> - getIdentitiesFieldBuilder() { - if (identitiesBuilder_ == null) { - identitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder>( - identities_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - identities_ = null; - } - return identitiesBuilder_; - } - - private java.util.List groupEdges_ = - java.util.Collections.emptyList(); - private void ensureGroupEdgesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - groupEdges_ = new java.util.ArrayList(groupEdges_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> groupEdgesBuilder_; - - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public java.util.List getGroupEdgesList() { - if (groupEdgesBuilder_ == null) { - return java.util.Collections.unmodifiableList(groupEdges_); - } else { - return groupEdgesBuilder_.getMessageList(); - } - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public int getGroupEdgesCount() { - if (groupEdgesBuilder_ == null) { - return groupEdges_.size(); - } else { - return groupEdgesBuilder_.getCount(); - } - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index) { - if (groupEdgesBuilder_ == null) { - return groupEdges_.get(index); - } else { - return groupEdgesBuilder_.getMessage(index); - } - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder setGroupEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { - if (groupEdgesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupEdgesIsMutable(); - groupEdges_.set(index, value); - onChanged(); - } else { - groupEdgesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder setGroupEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { - if (groupEdgesBuilder_ == null) { - ensureGroupEdgesIsMutable(); - groupEdges_.set(index, builderForValue.build()); - onChanged(); - } else { - groupEdgesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder addGroupEdges(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { - if (groupEdgesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupEdgesIsMutable(); - groupEdges_.add(value); - onChanged(); - } else { - groupEdgesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder addGroupEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { - if (groupEdgesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureGroupEdgesIsMutable(); - groupEdges_.add(index, value); - onChanged(); - } else { - groupEdgesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder addGroupEdges( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { - if (groupEdgesBuilder_ == null) { - ensureGroupEdgesIsMutable(); - groupEdges_.add(builderForValue.build()); - onChanged(); - } else { - groupEdgesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder addGroupEdges( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { - if (groupEdgesBuilder_ == null) { - ensureGroupEdgesIsMutable(); - groupEdges_.add(index, builderForValue.build()); - onChanged(); - } else { - groupEdgesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder addAllGroupEdges( - java.lang.Iterable values) { - if (groupEdgesBuilder_ == null) { - ensureGroupEdgesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, groupEdges_); - onChanged(); - } else { - groupEdgesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder clearGroupEdges() { - if (groupEdgesBuilder_ == null) { - groupEdges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - groupEdgesBuilder_.clear(); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public Builder removeGroupEdges(int index) { - if (groupEdgesBuilder_ == null) { - ensureGroupEdgesIsMutable(); - groupEdges_.remove(index); - onChanged(); - } else { - groupEdgesBuilder_.remove(index); - } - return this; - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder getGroupEdgesBuilder( - int index) { - return getGroupEdgesFieldBuilder().getBuilder(index); - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( - int index) { - if (groupEdgesBuilder_ == null) { - return groupEdges_.get(index); } else { - return groupEdgesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public java.util.List - getGroupEdgesOrBuilderList() { - if (groupEdgesBuilder_ != null) { - return groupEdgesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(groupEdges_); - } - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addGroupEdgesBuilder() { - return getGroupEdgesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addGroupEdgesBuilder( - int index) { - return getGroupEdgesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); - } - /** - *
-       * Group identity edges of the graph starting from the binding's
-       * group members to any node of the
-       * [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities].
-       * The
-       * [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
-       * contains a group, such as `group:parent@google.com`. The
-       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node]
-       * contains a member of the group, such as `group:child@google.com` or
-       * `user:foo@google.com`. This field is present only if the
-       * output_group_edges option is enabled in request.
-       * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; - */ - public java.util.List - getGroupEdgesBuilderList() { - return getGroupEdgesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> - getGroupEdgesFieldBuilder() { - if (groupEdgesBuilder_ == null) { - groupEdgesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder>( - groupEdges_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - groupEdges_ = null; - } - return groupEdgesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IdentityList parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IdentityList(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int ATTACHED_RESOURCE_FULL_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object attachedResourceFullName_; - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of the resource to which the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * policy attaches.
-   * 
- * - * string attached_resource_full_name = 1; - * @return The attachedResourceFullName. - */ - @java.lang.Override - public java.lang.String getAttachedResourceFullName() { - java.lang.Object ref = attachedResourceFullName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attachedResourceFullName_ = s; - return s; - } - } - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of the resource to which the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * policy attaches.
-   * 
- * - * string attached_resource_full_name = 1; - * @return The bytes for attachedResourceFullName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttachedResourceFullNameBytes() { - java.lang.Object ref = attachedResourceFullName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attachedResourceFullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IAM_BINDING_FIELD_NUMBER = 2; - private com.google.iam.v1.Binding iamBinding_; - /** - *
-   * The Cloud IAM policy binding under analysis.
-   * 
- * - * .google.iam.v1.Binding iam_binding = 2; - * @return Whether the iamBinding field is set. - */ - @java.lang.Override - public boolean hasIamBinding() { - return iamBinding_ != null; - } - /** - *
-   * The Cloud IAM policy binding under analysis.
-   * 
- * - * .google.iam.v1.Binding iam_binding = 2; - * @return The iamBinding. - */ - @java.lang.Override - public com.google.iam.v1.Binding getIamBinding() { - return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; - } - /** - *
-   * The Cloud IAM policy binding under analysis.
-   * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - @java.lang.Override - public com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder() { - return getIamBinding(); - } - - public static final int ACCESS_CONTROL_LISTS_FIELD_NUMBER = 3; - private java.util.List accessControlLists_; - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - @java.lang.Override - public java.util.List getAccessControlListsList() { - return accessControlLists_; - } - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - @java.lang.Override - public java.util.List - getAccessControlListsOrBuilderList() { - return accessControlLists_; - } - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - @java.lang.Override - public int getAccessControlListsCount() { - return accessControlLists_.size(); - } - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists(int index) { - return accessControlLists_.get(index); - } - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder getAccessControlListsOrBuilder( - int index) { - return accessControlLists_.get(index); - } - - public static final int IDENTITY_LIST_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identityList_; - /** - *
-   * The identity list derived from members of the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match identity selector specified in the request.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - * @return Whether the identityList field is set. - */ - @java.lang.Override - public boolean hasIdentityList() { - return identityList_ != null; - } - /** - *
-   * The identity list derived from members of the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match identity selector specified in the request.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - * @return The identityList. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList() { - return identityList_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() : identityList_; - } - /** - *
-   * The identity list derived from members of the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match identity selector specified in the request.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder getIdentityListOrBuilder() { - return getIdentityList(); - } - - public static final int FULLY_EXPLORED_FIELD_NUMBER = 5; - private boolean fullyExplored_; - /** - *
-   * Represents whether all analyses on the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * have successfully finished.
-   * 
- * - * bool fully_explored = 5; - * @return The fullyExplored. - */ - @java.lang.Override - public boolean getFullyExplored() { - return fullyExplored_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResourceFullName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachedResourceFullName_); - } - if (iamBinding_ != null) { - output.writeMessage(2, getIamBinding()); - } - for (int i = 0; i < accessControlLists_.size(); i++) { - output.writeMessage(3, accessControlLists_.get(i)); - } - if (identityList_ != null) { - output.writeMessage(4, getIdentityList()); - } - if (fullyExplored_ != false) { - output.writeBool(5, fullyExplored_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachedResourceFullName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachedResourceFullName_); - } - if (iamBinding_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getIamBinding()); - } - for (int i = 0; i < accessControlLists_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, accessControlLists_.get(i)); - } - if (identityList_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIdentityList()); - } - if (fullyExplored_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, fullyExplored_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisResult other = (com.google.cloud.asset.v1.IamPolicyAnalysisResult) obj; - - if (!getAttachedResourceFullName() - .equals(other.getAttachedResourceFullName())) return false; - if (hasIamBinding() != other.hasIamBinding()) return false; - if (hasIamBinding()) { - if (!getIamBinding() - .equals(other.getIamBinding())) return false; - } - if (!getAccessControlListsList() - .equals(other.getAccessControlListsList())) return false; - if (hasIdentityList() != other.hasIdentityList()) return false; - if (hasIdentityList()) { - if (!getIdentityList() - .equals(other.getIdentityList())) return false; - } - if (getFullyExplored() - != other.getFullyExplored()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ATTACHED_RESOURCE_FULL_NAME_FIELD_NUMBER; - hash = (53 * hash) + getAttachedResourceFullName().hashCode(); - if (hasIamBinding()) { - hash = (37 * hash) + IAM_BINDING_FIELD_NUMBER; - hash = (53 * hash) + getIamBinding().hashCode(); - } - if (getAccessControlListsCount() > 0) { - hash = (37 * hash) + ACCESS_CONTROL_LISTS_FIELD_NUMBER; - hash = (53 * hash) + getAccessControlListsList().hashCode(); - } - if (hasIdentityList()) { - hash = (37 * hash) + IDENTITY_LIST_FIELD_NUMBER; - hash = (53 * hash) + getIdentityList().hashCode(); - } - hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFullyExplored()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * IAM Policy analysis result, consisting of one IAM policy binding and derived
-   * access control lists.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult) - com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.class, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAccessControlListsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - attachedResourceFullName_ = ""; - - if (iamBindingBuilder_ == null) { - iamBinding_ = null; - } else { - iamBinding_ = null; - iamBindingBuilder_ = null; - } - if (accessControlListsBuilder_ == null) { - accessControlLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - accessControlListsBuilder_.clear(); - } - if (identityListBuilder_ == null) { - identityList_ = null; - } else { - identityList_ = null; - identityListBuilder_ = null; - } - fullyExplored_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult build() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisResult result = new com.google.cloud.asset.v1.IamPolicyAnalysisResult(this); - int from_bitField0_ = bitField0_; - result.attachedResourceFullName_ = attachedResourceFullName_; - if (iamBindingBuilder_ == null) { - result.iamBinding_ = iamBinding_; - } else { - result.iamBinding_ = iamBindingBuilder_.build(); - } - if (accessControlListsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - accessControlLists_ = java.util.Collections.unmodifiableList(accessControlLists_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.accessControlLists_ = accessControlLists_; - } else { - result.accessControlLists_ = accessControlListsBuilder_.build(); - } - if (identityListBuilder_ == null) { - result.identityList_ = identityList_; - } else { - result.identityList_ = identityListBuilder_.build(); - } - result.fullyExplored_ = fullyExplored_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisResult) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()) return this; - if (!other.getAttachedResourceFullName().isEmpty()) { - attachedResourceFullName_ = other.attachedResourceFullName_; - onChanged(); - } - if (other.hasIamBinding()) { - mergeIamBinding(other.getIamBinding()); - } - if (accessControlListsBuilder_ == null) { - if (!other.accessControlLists_.isEmpty()) { - if (accessControlLists_.isEmpty()) { - accessControlLists_ = other.accessControlLists_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAccessControlListsIsMutable(); - accessControlLists_.addAll(other.accessControlLists_); - } - onChanged(); - } - } else { - if (!other.accessControlLists_.isEmpty()) { - if (accessControlListsBuilder_.isEmpty()) { - accessControlListsBuilder_.dispose(); - accessControlListsBuilder_ = null; - accessControlLists_ = other.accessControlLists_; - bitField0_ = (bitField0_ & ~0x00000001); - accessControlListsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAccessControlListsFieldBuilder() : null; - } else { - accessControlListsBuilder_.addAllMessages(other.accessControlLists_); - } - } - } - if (other.hasIdentityList()) { - mergeIdentityList(other.getIdentityList()); - } - if (other.getFullyExplored() != false) { - setFullyExplored(other.getFullyExplored()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object attachedResourceFullName_ = ""; - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of the resource to which the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * policy attaches.
-     * 
- * - * string attached_resource_full_name = 1; - * @return The attachedResourceFullName. - */ - public java.lang.String getAttachedResourceFullName() { - java.lang.Object ref = attachedResourceFullName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attachedResourceFullName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of the resource to which the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * policy attaches.
-     * 
- * - * string attached_resource_full_name = 1; - * @return The bytes for attachedResourceFullName. - */ - public com.google.protobuf.ByteString - getAttachedResourceFullNameBytes() { - java.lang.Object ref = attachedResourceFullName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attachedResourceFullName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of the resource to which the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * policy attaches.
-     * 
- * - * string attached_resource_full_name = 1; - * @param value The attachedResourceFullName to set. - * @return This builder for chaining. - */ - public Builder setAttachedResourceFullName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - attachedResourceFullName_ = value; - onChanged(); - return this; - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of the resource to which the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * policy attaches.
-     * 
- * - * string attached_resource_full_name = 1; - * @return This builder for chaining. - */ - public Builder clearAttachedResourceFullName() { - - attachedResourceFullName_ = getDefaultInstance().getAttachedResourceFullName(); - onChanged(); - return this; - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * of the resource to which the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * policy attaches.
-     * 
- * - * string attached_resource_full_name = 1; - * @param value The bytes for attachedResourceFullName to set. - * @return This builder for chaining. - */ - public Builder setAttachedResourceFullNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - attachedResourceFullName_ = value; - onChanged(); - return this; - } - - private com.google.iam.v1.Binding iamBinding_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Binding, com.google.iam.v1.Binding.Builder, com.google.iam.v1.BindingOrBuilder> iamBindingBuilder_; - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - * @return Whether the iamBinding field is set. - */ - public boolean hasIamBinding() { - return iamBindingBuilder_ != null || iamBinding_ != null; - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - * @return The iamBinding. - */ - public com.google.iam.v1.Binding getIamBinding() { - if (iamBindingBuilder_ == null) { - return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; - } else { - return iamBindingBuilder_.getMessage(); - } - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - public Builder setIamBinding(com.google.iam.v1.Binding value) { - if (iamBindingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - iamBinding_ = value; - onChanged(); - } else { - iamBindingBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - public Builder setIamBinding( - com.google.iam.v1.Binding.Builder builderForValue) { - if (iamBindingBuilder_ == null) { - iamBinding_ = builderForValue.build(); - onChanged(); - } else { - iamBindingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - public Builder mergeIamBinding(com.google.iam.v1.Binding value) { - if (iamBindingBuilder_ == null) { - if (iamBinding_ != null) { - iamBinding_ = - com.google.iam.v1.Binding.newBuilder(iamBinding_).mergeFrom(value).buildPartial(); - } else { - iamBinding_ = value; - } - onChanged(); - } else { - iamBindingBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - public Builder clearIamBinding() { - if (iamBindingBuilder_ == null) { - iamBinding_ = null; - onChanged(); - } else { - iamBinding_ = null; - iamBindingBuilder_ = null; - } - - return this; - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - public com.google.iam.v1.Binding.Builder getIamBindingBuilder() { - - onChanged(); - return getIamBindingFieldBuilder().getBuilder(); - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - public com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder() { - if (iamBindingBuilder_ != null) { - return iamBindingBuilder_.getMessageOrBuilder(); - } else { - return iamBinding_ == null ? - com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; - } - } - /** - *
-     * The Cloud IAM policy binding under analysis.
-     * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Binding, com.google.iam.v1.Binding.Builder, com.google.iam.v1.BindingOrBuilder> - getIamBindingFieldBuilder() { - if (iamBindingBuilder_ == null) { - iamBindingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Binding, com.google.iam.v1.Binding.Builder, com.google.iam.v1.BindingOrBuilder>( - getIamBinding(), - getParentForChildren(), - isClean()); - iamBinding_ = null; - } - return iamBindingBuilder_; - } - - private java.util.List accessControlLists_ = - java.util.Collections.emptyList(); - private void ensureAccessControlListsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - accessControlLists_ = new java.util.ArrayList(accessControlLists_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> accessControlListsBuilder_; - - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public java.util.List getAccessControlListsList() { - if (accessControlListsBuilder_ == null) { - return java.util.Collections.unmodifiableList(accessControlLists_); - } else { - return accessControlListsBuilder_.getMessageList(); - } - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public int getAccessControlListsCount() { - if (accessControlListsBuilder_ == null) { - return accessControlLists_.size(); - } else { - return accessControlListsBuilder_.getCount(); - } - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists(int index) { - if (accessControlListsBuilder_ == null) { - return accessControlLists_.get(index); - } else { - return accessControlListsBuilder_.getMessage(index); - } - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder setAccessControlLists( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { - if (accessControlListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessControlListsIsMutable(); - accessControlLists_.set(index, value); - onChanged(); - } else { - accessControlListsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder setAccessControlLists( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder builderForValue) { - if (accessControlListsBuilder_ == null) { - ensureAccessControlListsIsMutable(); - accessControlLists_.set(index, builderForValue.build()); - onChanged(); - } else { - accessControlListsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder addAccessControlLists(com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { - if (accessControlListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessControlListsIsMutable(); - accessControlLists_.add(value); - onChanged(); - } else { - accessControlListsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder addAccessControlLists( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { - if (accessControlListsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAccessControlListsIsMutable(); - accessControlLists_.add(index, value); - onChanged(); - } else { - accessControlListsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder addAccessControlLists( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder builderForValue) { - if (accessControlListsBuilder_ == null) { - ensureAccessControlListsIsMutable(); - accessControlLists_.add(builderForValue.build()); - onChanged(); - } else { - accessControlListsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder addAccessControlLists( - int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder builderForValue) { - if (accessControlListsBuilder_ == null) { - ensureAccessControlListsIsMutable(); - accessControlLists_.add(index, builderForValue.build()); - onChanged(); - } else { - accessControlListsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder addAllAccessControlLists( - java.lang.Iterable values) { - if (accessControlListsBuilder_ == null) { - ensureAccessControlListsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, accessControlLists_); - onChanged(); - } else { - accessControlListsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder clearAccessControlLists() { - if (accessControlListsBuilder_ == null) { - accessControlLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - accessControlListsBuilder_.clear(); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public Builder removeAccessControlLists(int index) { - if (accessControlListsBuilder_ == null) { - ensureAccessControlListsIsMutable(); - accessControlLists_.remove(index); - onChanged(); - } else { - accessControlListsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder getAccessControlListsBuilder( - int index) { - return getAccessControlListsFieldBuilder().getBuilder(index); - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder getAccessControlListsOrBuilder( - int index) { - if (accessControlListsBuilder_ == null) { - return accessControlLists_.get(index); } else { - return accessControlListsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public java.util.List - getAccessControlListsOrBuilderList() { - if (accessControlListsBuilder_ != null) { - return accessControlListsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(accessControlLists_); - } - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder addAccessControlListsBuilder() { - return getAccessControlListsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance()); - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder addAccessControlListsBuilder( - int index) { - return getAccessControlListsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.getDefaultInstance()); - } - /** - *
-     * The access control lists derived from the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match resource and access selectors specified in
-     * the request.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - public java.util.List - getAccessControlListsBuilderList() { - return getAccessControlListsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> - getAccessControlListsFieldBuilder() { - if (accessControlListsBuilder_ == null) { - accessControlListsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder>( - accessControlLists_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - accessControlLists_ = null; - } - return accessControlListsBuilder_; - } - - private com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identityList_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder> identityListBuilder_; - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - * @return Whether the identityList field is set. - */ - public boolean hasIdentityList() { - return identityListBuilder_ != null || identityList_ != null; - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - * @return The identityList. - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList() { - if (identityListBuilder_ == null) { - return identityList_ == null ? com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() : identityList_; - } else { - return identityListBuilder_.getMessage(); - } - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - public Builder setIdentityList(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList value) { - if (identityListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - identityList_ = value; - onChanged(); - } else { - identityListBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - public Builder setIdentityList( - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder builderForValue) { - if (identityListBuilder_ == null) { - identityList_ = builderForValue.build(); - onChanged(); - } else { - identityListBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - public Builder mergeIdentityList(com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList value) { - if (identityListBuilder_ == null) { - if (identityList_ != null) { - identityList_ = - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.newBuilder(identityList_).mergeFrom(value).buildPartial(); - } else { - identityList_ = value; - } - onChanged(); - } else { - identityListBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - public Builder clearIdentityList() { - if (identityListBuilder_ == null) { - identityList_ = null; - onChanged(); - } else { - identityList_ = null; - identityListBuilder_ = null; - } - - return this; - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder getIdentityListBuilder() { - - onChanged(); - return getIdentityListFieldBuilder().getBuilder(); - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder getIdentityListOrBuilder() { - if (identityListBuilder_ != null) { - return identityListBuilder_.getMessageOrBuilder(); - } else { - return identityList_ == null ? - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() : identityList_; - } - } - /** - *
-     * The identity list derived from members of the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * that match or potentially match identity selector specified in the request.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder> - getIdentityListFieldBuilder() { - if (identityListBuilder_ == null) { - identityListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder>( - getIdentityList(), - getParentForChildren(), - isClean()); - identityList_ = null; - } - return identityListBuilder_; - } - - private boolean fullyExplored_ ; - /** - *
-     * Represents whether all analyses on the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * have successfully finished.
-     * 
- * - * bool fully_explored = 5; - * @return The fullyExplored. - */ - @java.lang.Override - public boolean getFullyExplored() { - return fullyExplored_; - } - /** - *
-     * Represents whether all analyses on the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * have successfully finished.
-     * 
- * - * bool fully_explored = 5; - * @param value The fullyExplored to set. - * @return This builder for chaining. - */ - public Builder setFullyExplored(boolean value) { - - fullyExplored_ = value; - onChanged(); - return this; - } - /** - *
-     * Represents whether all analyses on the
-     * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-     * have successfully finished.
-     * 
- * - * bool fully_explored = 5; - * @return This builder for chaining. - */ - public Builder clearFullyExplored() { - - fullyExplored_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicyAnalysisResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java deleted file mode 100644 index bea6a4a1378e..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java +++ /dev/null @@ -1,168 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface IamPolicyAnalysisResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of the resource to which the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * policy attaches.
-   * 
- * - * string attached_resource_full_name = 1; - * @return The attachedResourceFullName. - */ - java.lang.String getAttachedResourceFullName(); - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * of the resource to which the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * policy attaches.
-   * 
- * - * string attached_resource_full_name = 1; - * @return The bytes for attachedResourceFullName. - */ - com.google.protobuf.ByteString - getAttachedResourceFullNameBytes(); - - /** - *
-   * The Cloud IAM policy binding under analysis.
-   * 
- * - * .google.iam.v1.Binding iam_binding = 2; - * @return Whether the iamBinding field is set. - */ - boolean hasIamBinding(); - /** - *
-   * The Cloud IAM policy binding under analysis.
-   * 
- * - * .google.iam.v1.Binding iam_binding = 2; - * @return The iamBinding. - */ - com.google.iam.v1.Binding getIamBinding(); - /** - *
-   * The Cloud IAM policy binding under analysis.
-   * 
- * - * .google.iam.v1.Binding iam_binding = 2; - */ - com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder(); - - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - java.util.List - getAccessControlListsList(); - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists(int index); - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - int getAccessControlListsCount(); - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - java.util.List - getAccessControlListsOrBuilderList(); - /** - *
-   * The access control lists derived from the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match resource and access selectors specified in
-   * the request.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder getAccessControlListsOrBuilder( - int index); - - /** - *
-   * The identity list derived from members of the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match identity selector specified in the request.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - * @return Whether the identityList field is set. - */ - boolean hasIdentityList(); - /** - *
-   * The identity list derived from members of the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match identity selector specified in the request.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - * @return The identityList. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList(); - /** - *
-   * The identity list derived from members of the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * that match or potentially match identity selector specified in the request.
-   * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder getIdentityListOrBuilder(); - - /** - *
-   * Represents whether all analyses on the
-   * [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding]
-   * have successfully finished.
-   * 
- * - * bool fully_explored = 5; - * @return The fullyExplored. - */ - boolean getFullyExplored(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java deleted file mode 100644 index adf8f9efae81..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java +++ /dev/null @@ -1,756 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Represents the detailed state of an entity under analysis, such as a
- * resource, an identity or an access.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState} - */ -public final class IamPolicyAnalysisState extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisState) - IamPolicyAnalysisStateOrBuilder { -private static final long serialVersionUID = 0L; - // Use IamPolicyAnalysisState.newBuilder() to construct. - private IamPolicyAnalysisState(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicyAnalysisState() { - code_ = 0; - cause_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicyAnalysisState(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicyAnalysisState( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - code_ = rawValue; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - cause_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisState.class, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class); - } - - public static final int CODE_FIELD_NUMBER = 1; - private int code_; - /** - *
-   * The Google standard error code that best describes the state.
-   * For example:
-   * - OK means the analysis on this entity has been successfully finished;
-   * - PERMISSION_DENIED means an access denied error is encountered;
-   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-   * in time;
-   * 
- * - * .google.rpc.Code code = 1; - * @return The enum numeric value on the wire for code. - */ - @java.lang.Override public int getCodeValue() { - return code_; - } - /** - *
-   * The Google standard error code that best describes the state.
-   * For example:
-   * - OK means the analysis on this entity has been successfully finished;
-   * - PERMISSION_DENIED means an access denied error is encountered;
-   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-   * in time;
-   * 
- * - * .google.rpc.Code code = 1; - * @return The code. - */ - @java.lang.Override public com.google.rpc.Code getCode() { - @SuppressWarnings("deprecation") - com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); - return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; - } - - public static final int CAUSE_FIELD_NUMBER = 2; - private volatile java.lang.Object cause_; - /** - *
-   * The human-readable description of the cause of failure.
-   * 
- * - * string cause = 2; - * @return The cause. - */ - @java.lang.Override - public java.lang.String getCause() { - java.lang.Object ref = cause_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cause_ = s; - return s; - } - } - /** - *
-   * The human-readable description of the cause of failure.
-   * 
- * - * string cause = 2; - * @return The bytes for cause. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCauseBytes() { - java.lang.Object ref = cause_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cause_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (code_ != com.google.rpc.Code.OK.getNumber()) { - output.writeEnum(1, code_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cause_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (code_ != com.google.rpc.Code.OK.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, code_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cause_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cause_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisState)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicyAnalysisState other = (com.google.cloud.asset.v1.IamPolicyAnalysisState) obj; - - if (code_ != other.code_) return false; - if (!getCause() - .equals(other.getCause())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CODE_FIELD_NUMBER; - hash = (53 * hash) + code_; - hash = (37 * hash) + CAUSE_FIELD_NUMBER; - hash = (53 * hash) + getCause().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisState prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Represents the detailed state of an entity under analysis, such as a
-   * resource, an identity or an access.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisState) - com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicyAnalysisState.class, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - code_ = 0; - - cause_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState build() { - com.google.cloud.asset.v1.IamPolicyAnalysisState result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState buildPartial() { - com.google.cloud.asset.v1.IamPolicyAnalysisState result = new com.google.cloud.asset.v1.IamPolicyAnalysisState(this); - result.code_ = code_; - result.cause_ = cause_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicyAnalysisState) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisState)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisState other) { - if (other == com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()) return this; - if (other.code_ != 0) { - setCodeValue(other.getCodeValue()); - } - if (!other.getCause().isEmpty()) { - cause_ = other.cause_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicyAnalysisState parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisState) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int code_ = 0; - /** - *
-     * The Google standard error code that best describes the state.
-     * For example:
-     * - OK means the analysis on this entity has been successfully finished;
-     * - PERMISSION_DENIED means an access denied error is encountered;
-     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-     * in time;
-     * 
- * - * .google.rpc.Code code = 1; - * @return The enum numeric value on the wire for code. - */ - @java.lang.Override public int getCodeValue() { - return code_; - } - /** - *
-     * The Google standard error code that best describes the state.
-     * For example:
-     * - OK means the analysis on this entity has been successfully finished;
-     * - PERMISSION_DENIED means an access denied error is encountered;
-     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-     * in time;
-     * 
- * - * .google.rpc.Code code = 1; - * @param value The enum numeric value on the wire for code to set. - * @return This builder for chaining. - */ - public Builder setCodeValue(int value) { - - code_ = value; - onChanged(); - return this; - } - /** - *
-     * The Google standard error code that best describes the state.
-     * For example:
-     * - OK means the analysis on this entity has been successfully finished;
-     * - PERMISSION_DENIED means an access denied error is encountered;
-     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-     * in time;
-     * 
- * - * .google.rpc.Code code = 1; - * @return The code. - */ - @java.lang.Override - public com.google.rpc.Code getCode() { - @SuppressWarnings("deprecation") - com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); - return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; - } - /** - *
-     * The Google standard error code that best describes the state.
-     * For example:
-     * - OK means the analysis on this entity has been successfully finished;
-     * - PERMISSION_DENIED means an access denied error is encountered;
-     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-     * in time;
-     * 
- * - * .google.rpc.Code code = 1; - * @param value The code to set. - * @return This builder for chaining. - */ - public Builder setCode(com.google.rpc.Code value) { - if (value == null) { - throw new NullPointerException(); - } - - code_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The Google standard error code that best describes the state.
-     * For example:
-     * - OK means the analysis on this entity has been successfully finished;
-     * - PERMISSION_DENIED means an access denied error is encountered;
-     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-     * in time;
-     * 
- * - * .google.rpc.Code code = 1; - * @return This builder for chaining. - */ - public Builder clearCode() { - - code_ = 0; - onChanged(); - return this; - } - - private java.lang.Object cause_ = ""; - /** - *
-     * The human-readable description of the cause of failure.
-     * 
- * - * string cause = 2; - * @return The cause. - */ - public java.lang.String getCause() { - java.lang.Object ref = cause_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - cause_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The human-readable description of the cause of failure.
-     * 
- * - * string cause = 2; - * @return The bytes for cause. - */ - public com.google.protobuf.ByteString - getCauseBytes() { - java.lang.Object ref = cause_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - cause_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The human-readable description of the cause of failure.
-     * 
- * - * string cause = 2; - * @param value The cause to set. - * @return This builder for chaining. - */ - public Builder setCause( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - cause_ = value; - onChanged(); - return this; - } - /** - *
-     * The human-readable description of the cause of failure.
-     * 
- * - * string cause = 2; - * @return This builder for chaining. - */ - public Builder clearCause() { - - cause_ = getDefaultInstance().getCause(); - onChanged(); - return this; - } - /** - *
-     * The human-readable description of the cause of failure.
-     * 
- * - * string cause = 2; - * @param value The bytes for cause to set. - * @return This builder for chaining. - */ - public Builder setCauseBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - cause_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicyAnalysisState) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisState) - private static final com.google.cloud.asset.v1.IamPolicyAnalysisState DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisState(); - } - - public static com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicyAnalysisState parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicyAnalysisState(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java deleted file mode 100644 index 6208f59f108b..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface IamPolicyAnalysisStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisState) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The Google standard error code that best describes the state.
-   * For example:
-   * - OK means the analysis on this entity has been successfully finished;
-   * - PERMISSION_DENIED means an access denied error is encountered;
-   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-   * in time;
-   * 
- * - * .google.rpc.Code code = 1; - * @return The enum numeric value on the wire for code. - */ - int getCodeValue(); - /** - *
-   * The Google standard error code that best describes the state.
-   * For example:
-   * - OK means the analysis on this entity has been successfully finished;
-   * - PERMISSION_DENIED means an access denied error is encountered;
-   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
-   * in time;
-   * 
- * - * .google.rpc.Code code = 1; - * @return The code. - */ - com.google.rpc.Code getCode(); - - /** - *
-   * The human-readable description of the cause of failure.
-   * 
- * - * string cause = 2; - * @return The cause. - */ - java.lang.String getCause(); - /** - *
-   * The human-readable description of the cause of failure.
-   * 
- * - * string cause = 2; - * @return The bytes for cause. - */ - com.google.protobuf.ByteString - getCauseBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java deleted file mode 100644 index 1d71cd11bfab..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java +++ /dev/null @@ -1,3817 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A result of IAM Policy search, containing information of an IAM policy.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult} - */ -public final class IamPolicySearchResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicySearchResult) - IamPolicySearchResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use IamPolicySearchResult.newBuilder() to construct. - private IamPolicySearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicySearchResult() { - resource_ = ""; - assetType_ = ""; - project_ = ""; - folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - organization_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicySearchResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicySearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 26: { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder subBuilder = null; - if (explanation_ != null) { - subBuilder = explanation_.toBuilder(); - } - explanation_ = input.readMessage(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(explanation_); - explanation_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - folders_.add(s); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - organization_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = folders_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicySearchResult.class, com.google.cloud.asset.v1.IamPolicySearchResult.Builder.class); - } - - public interface ExplanationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicySearchResult.Explanation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - int getMatchedPermissionsCount(); - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - boolean containsMatchedPermissions( - java.lang.String key); - /** - * Use {@link #getMatchedPermissionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getMatchedPermissions(); - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - java.util.Map - getMatchedPermissionsMap(); - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - - /* nullable */ -com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions defaultValue); - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrThrow( - java.lang.String key); - } - /** - *
-   * Explanation about the IAM policy search result.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation} - */ - public static final class Explanation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation) - ExplanationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Explanation.newBuilder() to construct. - private Explanation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Explanation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Explanation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Explanation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - matchedPermissions_ = com.google.protobuf.MapField.newMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - matchedPermissions__ = input.readMessage( - MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - matchedPermissions_.getMutableMap().put( - matchedPermissions__.getKey(), matchedPermissions__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetMatchedPermissions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder.class); - } - - public interface PermissionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @return A list containing the permissions. - */ - java.util.List - getPermissionsList(); - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @return The count of permissions. - */ - int getPermissionsCount(); - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - java.lang.String getPermissions(int index); - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - com.google.protobuf.ByteString - getPermissionsBytes(int index); - } - /** - *
-     * IAM permissions
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions} - */ - public static final class Permissions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) - PermissionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use Permissions.newBuilder() to construct. - private Permissions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Permissions() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Permissions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Permissions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.Builder.class); - } - - public static final int PERMISSIONS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList permissions_; - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList - getPermissionsList() { - return permissions_; - } - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - *
-       * A list of permissions. A sample permission string: `compute.disk.get`.
-       * 
- * - * repeated string permissions = 1; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString - getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < permissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < permissions_.size(); i++) { - dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getPermissionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions other = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) obj; - - if (!getPermissionsList() - .equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPermissionsCount() > 0) { - hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getPermissionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-       * IAM permissions
-       * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.PermissionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_Permissions_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions build() { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions buildPartial() { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions result = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.permissions_ = permissions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions other) { - if (other == com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.getDefaultInstance()) return this; - if (!other.permissions_.isEmpty()) { - if (permissions_.isEmpty()) { - permissions_ = other.permissions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePermissionsIsMutable(); - permissions_.addAll(other.permissions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensurePermissionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); - bitField0_ |= 0x00000001; - } - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList - getPermissionsList() { - return permissions_.getUnmodifiableView(); - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString - getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @param index The index to set the value at. - * @param value The permissions to set. - * @return This builder for chaining. - */ - public Builder setPermissions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.set(index, value); - onChanged(); - return this; - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @param value The permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @param values The permissions to add. - * @return This builder for chaining. - */ - public Builder addAllPermissions( - java.lang.Iterable values) { - ensurePermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, permissions_); - onChanged(); - return this; - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @return This builder for chaining. - */ - public Builder clearPermissions() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-         * A list of permissions. A sample permission string: `compute.disk.get`.
-         * 
- * - * repeated string permissions = 1; - * @param value The bytes of the permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions) - private static final com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions(); - } - - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Permissions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Permissions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int MATCHED_PERMISSIONS_FIELD_NUMBER = 1; - private static final class MatchedPermissionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matchedPermissions_; - private com.google.protobuf.MapField - internalGetMatchedPermissions() { - if (matchedPermissions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - } - return matchedPermissions_; - } - - public int getMatchedPermissionsCount() { - return internalGetMatchedPermissions().getMap().size(); - } - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - - @java.lang.Override - public boolean containsMatchedPermissions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetMatchedPermissions().getMap().containsKey(key); - } - /** - * Use {@link #getMatchedPermissionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMatchedPermissions() { - return getMatchedPermissionsMap(); - } - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public java.util.Map getMatchedPermissionsMap() { - return internalGetMatchedPermissions().getMap(); - } - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrDefault( - java.lang.String key, - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * The map from roles to their included permissions that match the
-     * permission query (i.e., a query containing `policy.role.permissions:`).
-     * Example: if query `policy.role.permissions:compute.disk.get`
-     * matches a policy binding that contains owner role, the
-     * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-     * roles can also be found in the returned `policy` bindings. Note that the
-     * map is populated only for requests with permission queries.
-     * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetMatchedPermissions(), - MatchedPermissionsDefaultEntryHolder.defaultEntry, - 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetMatchedPermissions().getMap().entrySet()) { - com.google.protobuf.MapEntry - matchedPermissions__ = MatchedPermissionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, matchedPermissions__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation other = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation) obj; - - if (!internalGetMatchedPermissions().equals( - other.internalGetMatchedPermissions())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetMatchedPermissions().getMap().isEmpty()) { - hash = (37 * hash) + MATCHED_PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetMatchedPermissions().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Explanation about the IAM policy search result.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult.Explanation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicySearchResult.Explanation) - com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetMatchedPermissions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 1: - return internalGetMutableMatchedPermissions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableMatchedPermissions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation build() { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation buildPartial() { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation result = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation(this); - int from_bitField0_ = bitField0_; - result.matchedPermissions_ = internalGetMatchedPermissions(); - result.matchedPermissions_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicySearchResult.Explanation) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicySearchResult.Explanation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation other) { - if (other == com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance()) return this; - internalGetMutableMatchedPermissions().mergeFrom( - other.internalGetMatchedPermissions()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicySearchResult.Explanation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matchedPermissions_; - private com.google.protobuf.MapField - internalGetMatchedPermissions() { - if (matchedPermissions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - } - return matchedPermissions_; - } - private com.google.protobuf.MapField - internalGetMutableMatchedPermissions() { - onChanged();; - if (matchedPermissions_ == null) { - matchedPermissions_ = com.google.protobuf.MapField.newMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - } - if (!matchedPermissions_.isMutable()) { - matchedPermissions_ = matchedPermissions_.copy(); - } - return matchedPermissions_; - } - - public int getMatchedPermissionsCount() { - return internalGetMatchedPermissions().getMap().size(); - } - /** - *
-       * The map from roles to their included permissions that match the
-       * permission query (i.e., a query containing `policy.role.permissions:`).
-       * Example: if query `policy.role.permissions:compute.disk.get`
-       * matches a policy binding that contains owner role, the
-       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-       * roles can also be found in the returned `policy` bindings. Note that the
-       * map is populated only for requests with permission queries.
-       * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - - @java.lang.Override - public boolean containsMatchedPermissions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetMatchedPermissions().getMap().containsKey(key); - } - /** - * Use {@link #getMatchedPermissionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMatchedPermissions() { - return getMatchedPermissionsMap(); - } - /** - *
-       * The map from roles to their included permissions that match the
-       * permission query (i.e., a query containing `policy.role.permissions:`).
-       * Example: if query `policy.role.permissions:compute.disk.get`
-       * matches a policy binding that contains owner role, the
-       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-       * roles can also be found in the returned `policy` bindings. Note that the
-       * map is populated only for requests with permission queries.
-       * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public java.util.Map getMatchedPermissionsMap() { - return internalGetMatchedPermissions().getMap(); - } - /** - *
-       * The map from roles to their included permissions that match the
-       * permission query (i.e., a query containing `policy.role.permissions:`).
-       * Example: if query `policy.role.permissions:compute.disk.get`
-       * matches a policy binding that contains owner role, the
-       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-       * roles can also be found in the returned `policy` bindings. Note that the
-       * map is populated only for requests with permission queries.
-       * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrDefault( - java.lang.String key, - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * The map from roles to their included permissions that match the
-       * permission query (i.e., a query containing `policy.role.permissions:`).
-       * Example: if query `policy.role.permissions:compute.disk.get`
-       * matches a policy binding that contains owner role, the
-       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-       * roles can also be found in the returned `policy` bindings. Note that the
-       * map is populated only for requests with permission queries.
-       * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions getMatchedPermissionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearMatchedPermissions() { - internalGetMutableMatchedPermissions().getMutableMap() - .clear(); - return this; - } - /** - *
-       * The map from roles to their included permissions that match the
-       * permission query (i.e., a query containing `policy.role.permissions:`).
-       * Example: if query `policy.role.permissions:compute.disk.get`
-       * matches a policy binding that contains owner role, the
-       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-       * roles can also be found in the returned `policy` bindings. Note that the
-       * map is populated only for requests with permission queries.
-       * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - - public Builder removeMatchedPermissions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableMatchedPermissions().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableMatchedPermissions() { - return internalGetMutableMatchedPermissions().getMutableMap(); - } - /** - *
-       * The map from roles to their included permissions that match the
-       * permission query (i.e., a query containing `policy.role.permissions:`).
-       * Example: if query `policy.role.permissions:compute.disk.get`
-       * matches a policy binding that contains owner role, the
-       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-       * roles can also be found in the returned `policy` bindings. Note that the
-       * map is populated only for requests with permission queries.
-       * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - public Builder putMatchedPermissions( - java.lang.String key, - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableMatchedPermissions().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * The map from roles to their included permissions that match the
-       * permission query (i.e., a query containing `policy.role.permissions:`).
-       * Example: if query `policy.role.permissions:compute.disk.get`
-       * matches a policy binding that contains owner role, the
-       * matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
-       * roles can also be found in the returned `policy` bindings. Note that the
-       * map is populated only for requests with permission queries.
-       * 
- * - * map<string, .google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions> matched_permissions = 1; - */ - - public Builder putAllMatchedPermissions( - java.util.Map values) { - internalGetMutableMatchedPermissions().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult.Explanation) - private static final com.google.cloud.asset.v1.IamPolicySearchResult.Explanation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicySearchResult.Explanation(); - } - - public static com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Explanation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Explanation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object resource_; - /** - *
-   * The full resource name of the resource associated with this IAM policy.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `resource`:
-   * * use a field query. Example: `resource:organizations/123`
-   * 
- * - * string resource = 1; - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - *
-   * The full resource name of the resource associated with this IAM policy.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `resource`:
-   * * use a field query. Example: `resource:organizations/123`
-   * 
- * - * string resource = 1; - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 5; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of the resource associated with this IAM policy. Example:
-   * `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_types` field in your search request.
-   * 
- * - * string asset_type = 5; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of the resource associated with this IAM policy. Example:
-   * `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_types` field in your search request.
-   * 
- * - * string asset_type = 5; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 2; - private volatile java.lang.Object project_; - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, this field will be empty.
-   * To search against the `project`:
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 2; - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } - } - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, this field will be empty.
-   * To search against the `project`:
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 2; - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FOLDERS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList folders_; - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @return A list containing the folders. - */ - public com.google.protobuf.ProtocolStringList - getFoldersList() { - return folders_; - } - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @return The count of folders. - */ - public int getFoldersCount() { - return folders_.size(); - } - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @param index The index of the element to return. - * @return The folders at the given index. - */ - public java.lang.String getFolders(int index) { - return folders_.get(index); - } - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @param index The index of the value to return. - * @return The bytes of the folders at the given index. - */ - public com.google.protobuf.ByteString - getFoldersBytes(int index) { - return folders_.getByteString(index); - } - - public static final int ORGANIZATION_FIELD_NUMBER = 7; - private volatile java.lang.Object organization_; - /** - *
-   * The organization that the IAM policy belongs to, in the form
-   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * IAM policy belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 7; - * @return The organization. - */ - @java.lang.Override - public java.lang.String getOrganization() { - java.lang.Object ref = organization_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - organization_ = s; - return s; - } - } - /** - *
-   * The organization that the IAM policy belongs to, in the form
-   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * IAM policy belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 7; - * @return The bytes for organization. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrganizationBytes() { - java.lang.Object ref = organization_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - organization_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POLICY_FIELD_NUMBER = 3; - private com.google.iam.v1.Policy policy_; - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g., an empty query), this contains all the bindings.
-   * To search against the `policy` bindings:
-   * * use a field query:
-   *     - query by the policy contained members. Example:
-   *       `policy:amy@gmail.com`
-   *     - query by the policy contained roles. Example:
-   *       `policy:roles/compute.admin`
-   *     - query by the policy contained roles' included permissions. Example:
-   *       `policy.role.permissions:compute.instances.create`
-   * 
- * - * .google.iam.v1.Policy policy = 3; - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g., an empty query), this contains all the bindings.
-   * To search against the `policy` bindings:
-   * * use a field query:
-   *     - query by the policy contained members. Example:
-   *       `policy:amy@gmail.com`
-   *     - query by the policy contained roles. Example:
-   *       `policy:roles/compute.admin`
-   *     - query by the policy contained roles' included permissions. Example:
-   *       `policy.role.permissions:compute.instances.create`
-   * 
- * - * .google.iam.v1.Policy policy = 3; - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getPolicy() { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g., an empty query), this contains all the bindings.
-   * To search against the `policy` bindings:
-   * * use a field query:
-   *     - query by the policy contained members. Example:
-   *       `policy:amy@gmail.com`
-   *     - query by the policy contained roles. Example:
-   *       `policy:roles/compute.admin`
-   *     - query by the policy contained roles' included permissions. Example:
-   *       `policy.role.permissions:compute.instances.create`
-   * 
- * - * .google.iam.v1.Policy policy = 3; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - public static final int EXPLANATION_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation_; - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - * @return Whether the explanation field is set. - */ - @java.lang.Override - public boolean hasExplanation() { - return explanation_ != null; - } - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - * @return The explanation. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getExplanation() { - return explanation_ == null ? com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; - } - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { - return getExplanation(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_); - } - if (policy_ != null) { - output.writeMessage(3, getPolicy()); - } - if (explanation_ != null) { - output.writeMessage(4, getExplanation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, assetType_); - } - for (int i = 0; i < folders_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, folders_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, organization_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_); - } - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getPolicy()); - } - if (explanation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getExplanation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, assetType_); - } - { - int dataSize = 0; - for (int i = 0; i < folders_.size(); i++) { - dataSize += computeStringSizeNoTag(folders_.getRaw(i)); - } - size += dataSize; - size += 1 * getFoldersList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, organization_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.IamPolicySearchResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.IamPolicySearchResult other = (com.google.cloud.asset.v1.IamPolicySearchResult) obj; - - if (!getResource() - .equals(other.getResource())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (!getProject() - .equals(other.getProject())) return false; - if (!getFoldersList() - .equals(other.getFoldersList())) return false; - if (!getOrganization() - .equals(other.getOrganization())) return false; - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy() - .equals(other.getPolicy())) return false; - } - if (hasExplanation() != other.hasExplanation()) return false; - if (hasExplanation()) { - if (!getExplanation() - .equals(other.getExplanation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - if (getFoldersCount() > 0) { - hash = (37 * hash) + FOLDERS_FIELD_NUMBER; - hash = (53 * hash) + getFoldersList().hashCode(); - } - hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; - hash = (53 * hash) + getOrganization().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - if (hasExplanation()) { - hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; - hash = (53 * hash) + getExplanation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.IamPolicySearchResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.IamPolicySearchResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A result of IAM Policy search, containing information of an IAM policy.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.IamPolicySearchResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicySearchResult) - com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.IamPolicySearchResult.class, com.google.cloud.asset.v1.IamPolicySearchResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.IamPolicySearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resource_ = ""; - - assetType_ = ""; - - project_ = ""; - - folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - organization_ = ""; - - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - if (explanationBuilder_ == null) { - explanation_ = null; - } else { - explanation_ = null; - explanationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult build() { - com.google.cloud.asset.v1.IamPolicySearchResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult buildPartial() { - com.google.cloud.asset.v1.IamPolicySearchResult result = new com.google.cloud.asset.v1.IamPolicySearchResult(this); - int from_bitField0_ = bitField0_; - result.resource_ = resource_; - result.assetType_ = assetType_; - result.project_ = project_; - if (((bitField0_ & 0x00000001) != 0)) { - folders_ = folders_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.folders_ = folders_; - result.organization_ = organization_; - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - if (explanationBuilder_ == null) { - result.explanation_ = explanation_; - } else { - result.explanation_ = explanationBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.IamPolicySearchResult) { - return mergeFrom((com.google.cloud.asset.v1.IamPolicySearchResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicySearchResult other) { - if (other == com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance()) return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - onChanged(); - } - if (!other.folders_.isEmpty()) { - if (folders_.isEmpty()) { - folders_ = other.folders_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFoldersIsMutable(); - folders_.addAll(other.folders_); - } - onChanged(); - } - if (!other.getOrganization().isEmpty()) { - organization_ = other.organization_; - onChanged(); - } - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - if (other.hasExplanation()) { - mergeExplanation(other.getExplanation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.IamPolicySearchResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.IamPolicySearchResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object resource_ = ""; - /** - *
-     * The full resource name of the resource associated with this IAM policy.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `resource`:
-     * * use a field query. Example: `resource:organizations/123`
-     * 
- * - * string resource = 1; - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full resource name of the resource associated with this IAM policy.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `resource`:
-     * * use a field query. Example: `resource:organizations/123`
-     * 
- * - * string resource = 1; - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full resource name of the resource associated with this IAM policy.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `resource`:
-     * * use a field query. Example: `resource:organizations/123`
-     * 
- * - * string resource = 1; - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } - /** - *
-     * The full resource name of the resource associated with this IAM policy.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `resource`:
-     * * use a field query. Example: `resource:organizations/123`
-     * 
- * - * string resource = 1; - * @return This builder for chaining. - */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } - /** - *
-     * The full resource name of the resource associated with this IAM policy.
-     * Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `resource`:
-     * * use a field query. Example: `resource:organizations/123`
-     * 
- * - * string resource = 1; - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of the resource associated with this IAM policy. Example:
-     * `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_types` field in your search request.
-     * 
- * - * string asset_type = 5; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the resource associated with this IAM policy. Example:
-     * `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_types` field in your search request.
-     * 
- * - * string asset_type = 5; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the resource associated with this IAM policy. Example:
-     * `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_types` field in your search request.
-     * 
- * - * string asset_type = 5; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the resource associated with this IAM policy. Example:
-     * `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_types` field in your search request.
-     * 
- * - * string asset_type = 5; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of the resource associated with this IAM policy. Example:
-     * `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_types` field in your search request.
-     * 
- * - * string asset_type = 5; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, this field will be empty.
-     * To search against the `project`:
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 2; - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, this field will be empty.
-     * To search against the `project`:
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 2; - * @return The bytes for project. - */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, this field will be empty.
-     * To search against the `project`:
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 2; - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - project_ = value; - onChanged(); - return this; - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, this field will be empty.
-     * To search against the `project`:
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 2; - * @return This builder for chaining. - */ - public Builder clearProject() { - - project_ = getDefaultInstance().getProject(); - onChanged(); - return this; - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, this field will be empty.
-     * To search against the `project`:
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 2; - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - project_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureFoldersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - folders_ = new com.google.protobuf.LazyStringArrayList(folders_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @return A list containing the folders. - */ - public com.google.protobuf.ProtocolStringList - getFoldersList() { - return folders_.getUnmodifiableView(); - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @return The count of folders. - */ - public int getFoldersCount() { - return folders_.size(); - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @param index The index of the element to return. - * @return The folders at the given index. - */ - public java.lang.String getFolders(int index) { - return folders_.get(index); - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @param index The index of the value to return. - * @return The bytes of the folders at the given index. - */ - public com.google.protobuf.ByteString - getFoldersBytes(int index) { - return folders_.getByteString(index); - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @param index The index to set the value at. - * @param value The folders to set. - * @return This builder for chaining. - */ - public Builder setFolders( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFoldersIsMutable(); - folders_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @param value The folders to add. - * @return This builder for chaining. - */ - public Builder addFolders( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFoldersIsMutable(); - folders_.add(value); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @param values The folders to add. - * @return This builder for chaining. - */ - public Builder addAllFolders( - java.lang.Iterable values) { - ensureFoldersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, folders_); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @return This builder for chaining. - */ - public Builder clearFolders() { - folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that the IAM policy belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 6; - * @param value The bytes of the folders to add. - * @return This builder for chaining. - */ - public Builder addFoldersBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFoldersIsMutable(); - folders_.add(value); - onChanged(); - return this; - } - - private java.lang.Object organization_ = ""; - /** - *
-     * The organization that the IAM policy belongs to, in the form
-     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * IAM policy belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 7; - * @return The organization. - */ - public java.lang.String getOrganization() { - java.lang.Object ref = organization_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - organization_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The organization that the IAM policy belongs to, in the form
-     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * IAM policy belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 7; - * @return The bytes for organization. - */ - public com.google.protobuf.ByteString - getOrganizationBytes() { - java.lang.Object ref = organization_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - organization_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The organization that the IAM policy belongs to, in the form
-     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * IAM policy belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 7; - * @param value The organization to set. - * @return This builder for chaining. - */ - public Builder setOrganization( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - organization_ = value; - onChanged(); - return this; - } - /** - *
-     * The organization that the IAM policy belongs to, in the form
-     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * IAM policy belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 7; - * @return This builder for chaining. - */ - public Builder clearOrganization() { - - organization_ = getDefaultInstance().getOrganization(); - onChanged(); - return this; - } - /** - *
-     * The organization that the IAM policy belongs to, in the form
-     * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * IAM policy belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 7; - * @param value The bytes for organization to set. - * @return This builder for chaining. - */ - public Builder setOrganizationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - organization_ = value; - onChanged(); - return this; - } - - private com.google.iam.v1.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> policyBuilder_; - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - * @return The policy. - */ - public com.google.iam.v1.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - */ - public Builder setPolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - */ - public Builder setPolicy( - com.google.iam.v1.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - */ - public Builder mergePolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - */ - public com.google.iam.v1.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - */ - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? - com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g., an empty query), this contains all the bindings.
-     * To search against the `policy` bindings:
-     * * use a field query:
-     *     - query by the policy contained members. Example:
-     *       `policy:amy@gmail.com`
-     *     - query by the policy contained roles. Example:
-     *       `policy:roles/compute.admin`
-     *     - query by the policy contained roles' included permissions. Example:
-     *       `policy.role.permissions:compute.instances.create`
-     * 
- * - * .google.iam.v1.Policy policy = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( - getPolicy(), - getParentForChildren(), - isClean()); - policy_ = null; - } - return policyBuilder_; - } - - private com.google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder> explanationBuilder_; - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - * @return Whether the explanation field is set. - */ - public boolean hasExplanation() { - return explanationBuilder_ != null || explanation_ != null; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - * @return The explanation. - */ - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getExplanation() { - if (explanationBuilder_ == null) { - return explanation_ == null ? com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; - } else { - return explanationBuilder_.getMessage(); - } - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - public Builder setExplanation(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation value) { - if (explanationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - explanation_ = value; - onChanged(); - } else { - explanationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - public Builder setExplanation( - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder builderForValue) { - if (explanationBuilder_ == null) { - explanation_ = builderForValue.build(); - onChanged(); - } else { - explanationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - public Builder mergeExplanation(com.google.cloud.asset.v1.IamPolicySearchResult.Explanation value) { - if (explanationBuilder_ == null) { - if (explanation_ != null) { - explanation_ = - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.newBuilder(explanation_).mergeFrom(value).buildPartial(); - } else { - explanation_ = value; - } - onChanged(); - } else { - explanationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - public Builder clearExplanation() { - if (explanationBuilder_ == null) { - explanation_ = null; - onChanged(); - } else { - explanation_ = null; - explanationBuilder_ = null; - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - public com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder getExplanationBuilder() { - - onChanged(); - return getExplanationFieldBuilder().getBuilder(); - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - public com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { - if (explanationBuilder_ != null) { - return explanationBuilder_.getMessageOrBuilder(); - } else { - return explanation_ == null ? - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; - } - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder> - getExplanationFieldBuilder() { - if (explanationBuilder_ == null) { - explanationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder>( - getExplanation(), - getParentForChildren(), - isClean()); - explanation_ = null; - } - return explanationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.IamPolicySearchResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicySearchResult) - private static final com.google.cloud.asset.v1.IamPolicySearchResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicySearchResult(); - } - - public static com.google.cloud.asset.v1.IamPolicySearchResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicySearchResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicySearchResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java deleted file mode 100644 index 6958f7f88c6c..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java +++ /dev/null @@ -1,288 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface IamPolicySearchResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicySearchResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The full resource name of the resource associated with this IAM policy.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `resource`:
-   * * use a field query. Example: `resource:organizations/123`
-   * 
- * - * string resource = 1; - * @return The resource. - */ - java.lang.String getResource(); - /** - *
-   * The full resource name of the resource associated with this IAM policy.
-   * Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `resource`:
-   * * use a field query. Example: `resource:organizations/123`
-   * 
- * - * string resource = 1; - * @return The bytes for resource. - */ - com.google.protobuf.ByteString - getResourceBytes(); - - /** - *
-   * The type of the resource associated with this IAM policy. Example:
-   * `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_types` field in your search request.
-   * 
- * - * string asset_type = 5; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of the resource associated with this IAM policy. Example:
-   * `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_types` field in your search request.
-   * 
- * - * string asset_type = 5; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, this field will be empty.
-   * To search against the `project`:
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 2; - * @return The project. - */ - java.lang.String getProject(); - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, this field will be empty.
-   * To search against the `project`:
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 2; - * @return The bytes for project. - */ - com.google.protobuf.ByteString - getProjectBytes(); - - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @return A list containing the folders. - */ - java.util.List - getFoldersList(); - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @return The count of folders. - */ - int getFoldersCount(); - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @param index The index of the element to return. - * @return The folders at the given index. - */ - java.lang.String getFolders(int index); - /** - *
-   * The folder(s) that the IAM policy belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the IAM policy
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 6; - * @param index The index of the value to return. - * @return The bytes of the folders at the given index. - */ - com.google.protobuf.ByteString - getFoldersBytes(int index); - - /** - *
-   * The organization that the IAM policy belongs to, in the form
-   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * IAM policy belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 7; - * @return The organization. - */ - java.lang.String getOrganization(); - /** - *
-   * The organization that the IAM policy belongs to, in the form
-   * of organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * IAM policy belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 7; - * @return The bytes for organization. - */ - com.google.protobuf.ByteString - getOrganizationBytes(); - - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g., an empty query), this contains all the bindings.
-   * To search against the `policy` bindings:
-   * * use a field query:
-   *     - query by the policy contained members. Example:
-   *       `policy:amy@gmail.com`
-   *     - query by the policy contained roles. Example:
-   *       `policy:roles/compute.admin`
-   *     - query by the policy contained roles' included permissions. Example:
-   *       `policy.role.permissions:compute.instances.create`
-   * 
- * - * .google.iam.v1.Policy policy = 3; - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g., an empty query), this contains all the bindings.
-   * To search against the `policy` bindings:
-   * * use a field query:
-   *     - query by the policy contained members. Example:
-   *       `policy:amy@gmail.com`
-   *     - query by the policy contained roles. Example:
-   *       `policy:roles/compute.admin`
-   *     - query by the policy contained roles' included permissions. Example:
-   *       `policy.role.permissions:compute.instances.create`
-   * 
- * - * .google.iam.v1.Policy policy = 3; - * @return The policy. - */ - com.google.iam.v1.Policy getPolicy(); - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g., an empty query), this contains all the bindings.
-   * To search against the `policy` bindings:
-   * * use a field query:
-   *     - query by the policy contained members. Example:
-   *       `policy:amy@gmail.com`
-   *     - query by the policy contained roles. Example:
-   *       `policy:roles/compute.admin`
-   *     - query by the policy contained roles' included permissions. Example:
-   *       `policy.role.permissions:compute.instances.create`
-   * 
- * - * .google.iam.v1.Policy policy = 3; - */ - com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); - - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - * @return Whether the explanation field is set. - */ - boolean hasExplanation(); - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - * @return The explanation. - */ - com.google.cloud.asset.v1.IamPolicySearchResult.Explanation getExplanation(); - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1.IamPolicySearchResult.Explanation explanation = 4; - */ - com.google.cloud.asset.v1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java deleted file mode 100644 index f3b5c589a243..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java +++ /dev/null @@ -1,2144 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * ListAssets request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListAssetsRequest} - */ -public final class ListAssetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListAssetsRequest) - ListAssetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAssetsRequest.newBuilder() to construct. - private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAssetsRequest() { - parent_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - pageToken_ = ""; - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAssetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListAssetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 40: { - - pageSize_ = input.readInt32(); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListAssetsRequest.class, com.google.cloud.asset.v1.ListAssetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Name of the organization, folder, or project the assets belong
-   * to. Format: "organizations/[organization-number]" (such as
-   * "organizations/123"), "projects/[project-id]" (such as
-   * "projects/my-project-id"), "projects/[project-number]" (such as
-   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Name of the organization, folder, or project the assets belong
-   * to. Format: "organizations/[organization-number]" (such as
-   * "organizations/123"), "projects/[project-id]" (such as
-   * "projects/my-project-id"), "projects/[project-number]" (such as
-   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 4; - private int contentType_; - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 5; - private int pageSize_; - /** - *
-   * The maximum number of assets to be returned in a single response. Default
-   * is 100, minimum is 1, and maximum is 1000.
-   * 
- * - * int32 page_size = 5; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 6; - private volatile java.lang.Object pageToken_; - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 7; - private com.google.protobuf.LazyStringList relationshipTypes_; - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_; - } - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (readTime_ != null) { - output.writeMessage(2, getReadTime()); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, contentType_); - } - if (pageSize_ != 0) { - output.writeInt32(5, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); - } - for (int i = 0; i < relationshipTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReadTime()); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (contentType_ != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, contentType_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < relationshipTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getRelationshipTypesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ListAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ListAssetsRequest other = (com.google.cloud.asset.v1.ListAssetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (contentType_ != other.contentType_) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getRelationshipTypesList() - .equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - if (getRelationshipTypesCount() > 0) { - hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipTypesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ListAssetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * ListAssets request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListAssetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListAssetsRequest) - com.google.cloud.asset.v1.ListAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListAssetsRequest.class, com.google.cloud.asset.v1.ListAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ListAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - contentType_ = 0; - - pageSize_ = 0; - - pageToken_ = ""; - - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ListAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsRequest build() { - com.google.cloud.asset.v1.ListAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsRequest buildPartial() { - com.google.cloud.asset.v1.ListAssetsRequest result = new com.google.cloud.asset.v1.ListAssetsRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.contentType_ = contentType_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - if (((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.relationshipTypes_ = relationshipTypes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ListAssetsRequest) { - return mergeFrom((com.google.cloud.asset.v1.ListAssetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsRequest other) { - if (other == com.google.cloud.asset.v1.ListAssetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.relationshipTypes_.isEmpty()) { - if (relationshipTypes_.isEmpty()) { - relationshipTypes_ = other.relationshipTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRelationshipTypesIsMutable(); - relationshipTypes_.addAll(other.relationshipTypes_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ListAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListAssetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Name of the organization, folder, or project the assets belong
-     * to. Format: "organizations/[organization-number]" (such as
-     * "organizations/123"), "projects/[project-id]" (such as
-     * "projects/my-project-id"), "projects/[project-number]" (such as
-     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the organization, folder, or project the assets belong
-     * to. Format: "organizations/[organization-number]" (such as
-     * "organizations/123"), "projects/[project-id]" (such as
-     * "projects/my-project-id"), "projects/[project-number]" (such as
-     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the organization, folder, or project the assets belong
-     * to. Format: "organizations/[organization-number]" (such as
-     * "organizations/123"), "projects/[project-id]" (such as
-     * "projects/my-project-id"), "projects/[project-number]" (such as
-     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization, folder, or project the assets belong
-     * to. Format: "organizations/[organization-number]" (such as
-     * "organizations/123"), "projects/[project-id]" (such as
-     * "projects/my-project-id"), "projects/[project-number]" (such as
-     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization, folder, or project the assets belong
-     * to. Format: "organizations/[organization-number]" (such as
-     * "organizations/123"), "projects/[project-id]" (such as
-     * "projects/my-project-id"), "projects/[project-number]" (such as
-     * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expression is also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - - contentType_ = value; - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.ContentType result = com.google.cloud.asset.v1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of assets to be returned in a single response. Default
-     * is 100, minimum is 1, and maximum is 1000.
-     * 
- * - * int32 page_size = 5; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of assets to be returned in a single response. Default
-     * is 100, minimum is 1, and maximum is 1000.
-     * 
- * - * int32 page_size = 5; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of assets to be returned in a single response. Default
-     * is 100, minimum is 1, and maximum is 1000.
-     * 
- * - * int32 page_size = 5; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRelationshipTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param index The index to set the value at. - * @param value The relationshipTypes to set. - * @return This builder for chaining. - */ - public Builder setRelationshipTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param value The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param values The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addAllRelationshipTypes( - java.lang.Iterable values) { - ensureRelationshipTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relationshipTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @return This builder for chaining. - */ - public Builder clearRelationshipTypes() { - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to output, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP.
-     * * If specified:
-     * it snapshots specified relationships. It returns an error if
-     * any of the [relationship_types] doesn't belong to the supported
-     * relationship types of the [asset_types] or if any of the [asset_types]
-     * doesn't belong to the source types of the [relationship_types].
-     * * Otherwise:
-     * it snapshots the supported relationships for all [asset_types] or returns
-     * an error if any of the [asset_types] has no relationship support.
-     * An unspecified asset types field means all supported asset_types.
-     * See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 7; - * @param value The bytes of the relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListAssetsRequest) - private static final com.google.cloud.asset.v1.ListAssetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListAssetsRequest(); - } - - public static com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAssetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java deleted file mode 100644 index 570a4d9a58ea..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java +++ /dev/null @@ -1,322 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ListAssetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListAssetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the organization, folder, or project the assets belong
-   * to. Format: "organizations/[organization-number]" (such as
-   * "organizations/123"), "projects/[project-id]" (such as
-   * "projects/my-project-id"), "projects/[project-number]" (such as
-   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Name of the organization, folder, or project the assets belong
-   * to. Format: "organizations/[organization-number]" (such as
-   * "organizations/123"), "projects/[project-id]" (such as
-   * "projects/my-project-id"), "projects/[project-number]" (such as
-   * "projects/12345"), or "folders/[folder-number]" (such as "folders/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expression is also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1.ContentType content_type = 4; - * @return The contentType. - */ - com.google.cloud.asset.v1.ContentType getContentType(); - - /** - *
-   * The maximum number of assets to be returned in a single response. Default
-   * is 100, minimum is 1, and maximum is 1000.
-   * 
- * - * int32 page_size = 5; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return A list containing the relationshipTypes. - */ - java.util.List - getRelationshipTypesList(); - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @return The count of relationshipTypes. - */ - int getRelationshipTypesCount(); - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - java.lang.String getRelationshipTypes(int index); - /** - *
-   * A list of relationship types to output, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP.
-   * * If specified:
-   * it snapshots specified relationships. It returns an error if
-   * any of the [relationship_types] doesn't belong to the supported
-   * relationship types of the [asset_types] or if any of the [asset_types]
-   * doesn't belong to the source types of the [relationship_types].
-   * * Otherwise:
-   * it snapshots the supported relationships for all [asset_types] or returns
-   * an error if any of the [asset_types] has no relationship support.
-   * An unspecified asset types field means all supported asset_types.
-   * See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 7; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - com.google.protobuf.ByteString - getRelationshipTypesBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java deleted file mode 100644 index b2c378da5fa2..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java +++ /dev/null @@ -1,1288 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * ListAssets response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListAssetsResponse} - */ -public final class ListAssetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListAssetsResponse) - ListAssetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAssetsResponse.newBuilder() to construct. - private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAssetsResponse() { - assets_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAssetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListAssetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry)); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListAssetsResponse.class, com.google.cloud.asset.v1.ListAssetsResponse.Builder.class); - } - - public static final int READ_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int ASSETS_FIELD_NUMBER = 2; - private java.util.List assets_; - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - @java.lang.Override - public java.util.List getAssetsList() { - return assets_; - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - @java.lang.Override - public java.util.List - getAssetsOrBuilderList() { - return assets_; - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - @java.lang.Override - public int getAssetsCount() { - return assets_.size(); - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.Asset getAssets(int index) { - return assets_.get(index); - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder( - int index) { - return assets_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results. It expires 72 hours after the
-   * page token for the first page is generated. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results. It expires 72 hours after the
-   * page token for the first page is generated. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (readTime_ != null) { - output.writeMessage(1, getReadTime()); - } - for (int i = 0; i < assets_.size(); i++) { - output.writeMessage(2, assets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getReadTime()); - } - for (int i = 0; i < assets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, assets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ListAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ListAssetsResponse other = (com.google.cloud.asset.v1.ListAssetsResponse) obj; - - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getAssetsList() - .equals(other.getAssetsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (getAssetsCount() > 0) { - hash = (37 * hash) + ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getAssetsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ListAssetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * ListAssets response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListAssetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListAssetsResponse) - com.google.cloud.asset.v1.ListAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListAssetsResponse.class, com.google.cloud.asset.v1.ListAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ListAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAssetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - assetsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsResponse build() { - com.google.cloud.asset.v1.ListAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsResponse buildPartial() { - com.google.cloud.asset.v1.ListAssetsResponse result = new com.google.cloud.asset.v1.ListAssetsResponse(this); - int from_bitField0_ = bitField0_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (assetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assets_ = assets_; - } else { - result.assets_ = assetsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ListAssetsResponse) { - return mergeFrom((com.google.cloud.asset.v1.ListAssetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsResponse other) { - if (other == com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance()) return this; - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (assetsBuilder_ == null) { - if (!other.assets_.isEmpty()) { - if (assets_.isEmpty()) { - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetsIsMutable(); - assets_.addAll(other.assets_); - } - onChanged(); - } - } else { - if (!other.assets_.isEmpty()) { - if (assetsBuilder_.isEmpty()) { - assetsBuilder_.dispose(); - assetsBuilder_ = null; - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - assetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAssetsFieldBuilder() : null; - } else { - assetsBuilder_.addAllMessages(other.assets_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ListAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListAssetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private java.util.List assets_ = - java.util.Collections.emptyList(); - private void ensureAssetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(assets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> assetsBuilder_; - - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public java.util.List getAssetsList() { - if (assetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(assets_); - } else { - return assetsBuilder_.getMessageList(); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public int getAssetsCount() { - if (assetsBuilder_ == null) { - return assets_.size(); - } else { - return assetsBuilder_.getCount(); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public com.google.cloud.asset.v1.Asset getAssets(int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); - } else { - return assetsBuilder_.getMessage(index); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1.Asset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.set(index, value); - onChanged(); - } else { - assetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1.Asset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.set(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder addAssets(com.google.cloud.asset.v1.Asset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(value); - onChanged(); - } else { - assetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1.Asset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(index, value); - onChanged(); - } else { - assetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder addAssets( - com.google.cloud.asset.v1.Asset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1.Asset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder addAllAssets( - java.lang.Iterable values) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assets_); - onChanged(); - } else { - assetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder clearAssets() { - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - assetsBuilder_.clear(); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public Builder removeAssets(int index) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.remove(index); - onChanged(); - } else { - assetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public com.google.cloud.asset.v1.Asset.Builder getAssetsBuilder( - int index) { - return getAssetsFieldBuilder().getBuilder(index); - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder( - int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); } else { - return assetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public java.util.List - getAssetsOrBuilderList() { - if (assetsBuilder_ != null) { - return assetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(assets_); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public com.google.cloud.asset.v1.Asset.Builder addAssetsBuilder() { - return getAssetsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.Asset.getDefaultInstance()); - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public com.google.cloud.asset.v1.Asset.Builder addAssetsBuilder( - int index) { - return getAssetsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.Asset.getDefaultInstance()); - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - public java.util.List - getAssetsBuilderList() { - return getAssetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> - getAssetsFieldBuilder() { - if (assetsBuilder_ == null) { - assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder>( - assets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - assets_ = null; - } - return assetsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results. It expires 72 hours after the
-     * page token for the first page is generated. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results. It expires 72 hours after the
-     * page token for the first page is generated. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results. It expires 72 hours after the
-     * page token for the first page is generated. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results. It expires 72 hours after the
-     * page token for the first page is generated. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results. It expires 72 hours after the
-     * page token for the first page is generated. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListAssetsResponse) - private static final com.google.cloud.asset.v1.ListAssetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListAssetsResponse(); - } - - public static com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAssetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java deleted file mode 100644 index 788d4a5158c7..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ListAssetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListAssetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - java.util.List - getAssetsList(); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - com.google.cloud.asset.v1.Asset getAssets(int index); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - int getAssetsCount(); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - java.util.List - getAssetsOrBuilderList(); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1.Asset assets = 2; - */ - com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results. It expires 72 hours after the
-   * page token for the first page is generated. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results. It expires 72 hours after the
-   * page token for the first page is generated. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java deleted file mode 100644 index 85f46daa9639..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * List asset feeds request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListFeedsRequest} - */ -public final class ListFeedsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListFeedsRequest) - ListFeedsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListFeedsRequest.newBuilder() to construct. - private ListFeedsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListFeedsRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListFeedsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListFeedsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListFeedsRequest.class, com.google.cloud.asset.v1.ListFeedsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ListFeedsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ListFeedsRequest other = (com.google.cloud.asset.v1.ListFeedsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListFeedsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ListFeedsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * List asset feeds request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListFeedsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListFeedsRequest) - com.google.cloud.asset.v1.ListFeedsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListFeedsRequest.class, com.google.cloud.asset.v1.ListFeedsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ListFeedsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ListFeedsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsRequest build() { - com.google.cloud.asset.v1.ListFeedsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsRequest buildPartial() { - com.google.cloud.asset.v1.ListFeedsRequest result = new com.google.cloud.asset.v1.ListFeedsRequest(this); - result.parent_ = parent_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ListFeedsRequest) { - return mergeFrom((com.google.cloud.asset.v1.ListFeedsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ListFeedsRequest other) { - if (other == com.google.cloud.asset.v1.ListFeedsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ListFeedsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListFeedsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListFeedsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListFeedsRequest) - private static final com.google.cloud.asset.v1.ListFeedsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListFeedsRequest(); - } - - public static com.google.cloud.asset.v1.ListFeedsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFeedsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java deleted file mode 100644 index be5ab6097189..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ListFeedsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListFeedsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java deleted file mode 100644 index 6efb29139425..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java +++ /dev/null @@ -1,864 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - * Protobuf type {@code google.cloud.asset.v1.ListFeedsResponse} - */ -public final class ListFeedsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListFeedsResponse) - ListFeedsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListFeedsResponse.newBuilder() to construct. - private ListFeedsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListFeedsResponse() { - feeds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListFeedsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListFeedsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - feeds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - feeds_.add( - input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - feeds_ = java.util.Collections.unmodifiableList(feeds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListFeedsResponse.class, com.google.cloud.asset.v1.ListFeedsResponse.Builder.class); - } - - public static final int FEEDS_FIELD_NUMBER = 1; - private java.util.List feeds_; - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - @java.lang.Override - public java.util.List getFeedsList() { - return feeds_; - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - @java.lang.Override - public java.util.List - getFeedsOrBuilderList() { - return feeds_; - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - @java.lang.Override - public int getFeedsCount() { - return feeds_.size(); - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.Feed getFeeds(int index) { - return feeds_.get(index); - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.FeedOrBuilder getFeedsOrBuilder( - int index) { - return feeds_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < feeds_.size(); i++) { - output.writeMessage(1, feeds_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < feeds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, feeds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ListFeedsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ListFeedsResponse other = (com.google.cloud.asset.v1.ListFeedsResponse) obj; - - if (!getFeedsList() - .equals(other.getFeedsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFeedsCount() > 0) { - hash = (37 * hash) + FEEDS_FIELD_NUMBER; - hash = (53 * hash) + getFeedsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListFeedsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ListFeedsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code google.cloud.asset.v1.ListFeedsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListFeedsResponse) - com.google.cloud.asset.v1.ListFeedsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListFeedsResponse.class, com.google.cloud.asset.v1.ListFeedsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ListFeedsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeedsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (feedsBuilder_ == null) { - feeds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - feedsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ListFeedsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsResponse build() { - com.google.cloud.asset.v1.ListFeedsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsResponse buildPartial() { - com.google.cloud.asset.v1.ListFeedsResponse result = new com.google.cloud.asset.v1.ListFeedsResponse(this); - int from_bitField0_ = bitField0_; - if (feedsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - feeds_ = java.util.Collections.unmodifiableList(feeds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.feeds_ = feeds_; - } else { - result.feeds_ = feedsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ListFeedsResponse) { - return mergeFrom((com.google.cloud.asset.v1.ListFeedsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ListFeedsResponse other) { - if (other == com.google.cloud.asset.v1.ListFeedsResponse.getDefaultInstance()) return this; - if (feedsBuilder_ == null) { - if (!other.feeds_.isEmpty()) { - if (feeds_.isEmpty()) { - feeds_ = other.feeds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeedsIsMutable(); - feeds_.addAll(other.feeds_); - } - onChanged(); - } - } else { - if (!other.feeds_.isEmpty()) { - if (feedsBuilder_.isEmpty()) { - feedsBuilder_.dispose(); - feedsBuilder_ = null; - feeds_ = other.feeds_; - bitField0_ = (bitField0_ & ~0x00000001); - feedsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeedsFieldBuilder() : null; - } else { - feedsBuilder_.addAllMessages(other.feeds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ListFeedsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListFeedsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List feeds_ = - java.util.Collections.emptyList(); - private void ensureFeedsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - feeds_ = new java.util.ArrayList(feeds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> feedsBuilder_; - - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public java.util.List getFeedsList() { - if (feedsBuilder_ == null) { - return java.util.Collections.unmodifiableList(feeds_); - } else { - return feedsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public int getFeedsCount() { - if (feedsBuilder_ == null) { - return feeds_.size(); - } else { - return feedsBuilder_.getCount(); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1.Feed getFeeds(int index) { - if (feedsBuilder_ == null) { - return feeds_.get(index); - } else { - return feedsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder setFeeds( - int index, com.google.cloud.asset.v1.Feed value) { - if (feedsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeedsIsMutable(); - feeds_.set(index, value); - onChanged(); - } else { - feedsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder setFeeds( - int index, com.google.cloud.asset.v1.Feed.Builder builderForValue) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.set(index, builderForValue.build()); - onChanged(); - } else { - feedsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder addFeeds(com.google.cloud.asset.v1.Feed value) { - if (feedsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeedsIsMutable(); - feeds_.add(value); - onChanged(); - } else { - feedsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder addFeeds( - int index, com.google.cloud.asset.v1.Feed value) { - if (feedsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeedsIsMutable(); - feeds_.add(index, value); - onChanged(); - } else { - feedsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder addFeeds( - com.google.cloud.asset.v1.Feed.Builder builderForValue) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.add(builderForValue.build()); - onChanged(); - } else { - feedsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder addFeeds( - int index, com.google.cloud.asset.v1.Feed.Builder builderForValue) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.add(index, builderForValue.build()); - onChanged(); - } else { - feedsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder addAllFeeds( - java.lang.Iterable values) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, feeds_); - onChanged(); - } else { - feedsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder clearFeeds() { - if (feedsBuilder_ == null) { - feeds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - feedsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public Builder removeFeeds(int index) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.remove(index); - onChanged(); - } else { - feedsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1.Feed.Builder getFeedsBuilder( - int index) { - return getFeedsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1.FeedOrBuilder getFeedsOrBuilder( - int index) { - if (feedsBuilder_ == null) { - return feeds_.get(index); } else { - return feedsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public java.util.List - getFeedsOrBuilderList() { - if (feedsBuilder_ != null) { - return feedsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(feeds_); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1.Feed.Builder addFeedsBuilder() { - return getFeedsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.Feed.getDefaultInstance()); - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1.Feed.Builder addFeedsBuilder( - int index) { - return getFeedsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.Feed.getDefaultInstance()); - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - public java.util.List - getFeedsBuilderList() { - return getFeedsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> - getFeedsFieldBuilder() { - if (feedsBuilder_ == null) { - feedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder>( - feeds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - feeds_ = null; - } - return feedsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListFeedsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListFeedsResponse) - private static final com.google.cloud.asset.v1.ListFeedsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListFeedsResponse(); - } - - public static com.google.cloud.asset.v1.ListFeedsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFeedsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListFeedsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java deleted file mode 100644 index d5bb75ca2b75..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ListFeedsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListFeedsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - java.util.List - getFeedsList(); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - com.google.cloud.asset.v1.Feed getFeeds(int index); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - int getFeedsCount(); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - java.util.List - getFeedsOrBuilderList(); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1.Feed feeds = 1; - */ - com.google.cloud.asset.v1.FeedOrBuilder getFeedsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java deleted file mode 100644 index 3afaad12c08b..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequest.java +++ /dev/null @@ -1,1089 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Request to list saved queries.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesRequest} - */ -public final class ListSavedQueriesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListSavedQueriesRequest) - ListSavedQueriesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSavedQueriesRequest.newBuilder() to construct. - private ListSavedQueriesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSavedQueriesRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSavedQueriesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListSavedQueriesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListSavedQueriesRequest.class, com.google.cloud.asset.v1.ListSavedQueriesRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent project/folder/organization whose savedQueries are to
-   * be listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The parent project/folder/organization whose savedQueries are to
-   * be listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - *
-   * Optional. The expression to filter resources.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-   * expression, parentheses must be appropriately used to group the
-   * combinations. The expression may also contain regular expressions.
-   * See https://google.aip.dev/160 for more information on the grammar.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - *
-   * Optional. The expression to filter resources.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-   * expression, parentheses must be appropriately used to group the
-   * combinations. The expression may also contain regular expressions.
-   * See https://google.aip.dev/160 for more information on the grammar.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - *
-   * Optional. The maximum number of saved queries to return per page. The
-   * service may return fewer than this value. If unspecified, at most 50 will
-   * be returned.
-   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - *
-   * Optional. A page token, received from a previous `ListSavedQueries` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListSavedQueries` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Optional. A page token, received from a previous `ListSavedQueries` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListSavedQueries` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ListSavedQueriesRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ListSavedQueriesRequest other = (com.google.cloud.asset.v1.ListSavedQueriesRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFilter() - .equals(other.getFilter())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListSavedQueriesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ListSavedQueriesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to list saved queries.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListSavedQueriesRequest) - com.google.cloud.asset.v1.ListSavedQueriesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListSavedQueriesRequest.class, com.google.cloud.asset.v1.ListSavedQueriesRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ListSavedQueriesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ListSavedQueriesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesRequest build() { - com.google.cloud.asset.v1.ListSavedQueriesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesRequest buildPartial() { - com.google.cloud.asset.v1.ListSavedQueriesRequest result = new com.google.cloud.asset.v1.ListSavedQueriesRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ListSavedQueriesRequest) { - return mergeFrom((com.google.cloud.asset.v1.ListSavedQueriesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ListSavedQueriesRequest other) { - if (other == com.google.cloud.asset.v1.ListSavedQueriesRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ListSavedQueriesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListSavedQueriesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent project/folder/organization whose savedQueries are to
-     * be listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The parent project/folder/organization whose savedQueries are to
-     * be listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The parent project/folder/organization whose savedQueries are to
-     * be listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent project/folder/organization whose savedQueries are to
-     * be listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent project/folder/organization whose savedQueries are to
-     * be listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - *
-     * Optional. The expression to filter resources.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-     * expression, parentheses must be appropriately used to group the
-     * combinations. The expression may also contain regular expressions.
-     * See https://google.aip.dev/160 for more information on the grammar.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. The expression to filter resources.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-     * expression, parentheses must be appropriately used to group the
-     * combinations. The expression may also contain regular expressions.
-     * See https://google.aip.dev/160 for more information on the grammar.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString - getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. The expression to filter resources.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-     * expression, parentheses must be appropriately used to group the
-     * combinations. The expression may also contain regular expressions.
-     * See https://google.aip.dev/160 for more information on the grammar.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The expression to filter resources.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-     * expression, parentheses must be appropriately used to group the
-     * combinations. The expression may also contain regular expressions.
-     * See https://google.aip.dev/160 for more information on the grammar.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - *
-     * Optional. The expression to filter resources.
-     * The expression is a list of zero or more restrictions combined via logical
-     * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-     * expression, parentheses must be appropriately used to group the
-     * combinations. The expression may also contain regular expressions.
-     * See https://google.aip.dev/160 for more information on the grammar.
-     * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Optional. The maximum number of saved queries to return per page. The
-     * service may return fewer than this value. If unspecified, at most 50 will
-     * be returned.
-     *  The maximum value is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Optional. The maximum number of saved queries to return per page. The
-     * service may return fewer than this value. If unspecified, at most 50 will
-     * be returned.
-     *  The maximum value is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The maximum number of saved queries to return per page. The
-     * service may return fewer than this value. If unspecified, at most 50 will
-     * be returned.
-     *  The maximum value is 1000; values above 1000 will be coerced to 1000.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Optional. A page token, received from a previous `ListSavedQueries` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListSavedQueries` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. A page token, received from a previous `ListSavedQueries` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListSavedQueries` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. A page token, received from a previous `ListSavedQueries` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListSavedQueries` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. A page token, received from a previous `ListSavedQueries` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListSavedQueries` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Optional. A page token, received from a previous `ListSavedQueries` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListSavedQueries` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListSavedQueriesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListSavedQueriesRequest) - private static final com.google.cloud.asset.v1.ListSavedQueriesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListSavedQueriesRequest(); - } - - public static com.google.cloud.asset.v1.ListSavedQueriesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSavedQueriesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSavedQueriesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java deleted file mode 100644 index bba5bebe3b9e..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesRequestOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ListSavedQueriesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListSavedQueriesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent project/folder/organization whose savedQueries are to
-   * be listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The parent project/folder/organization whose savedQueries are to
-   * be listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Optional. The expression to filter resources.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-   * expression, parentheses must be appropriately used to group the
-   * combinations. The expression may also contain regular expressions.
-   * See https://google.aip.dev/160 for more information on the grammar.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The filter. - */ - java.lang.String getFilter(); - /** - *
-   * Optional. The expression to filter resources.
-   * The expression is a list of zero or more restrictions combined via logical
-   * operators `AND` and `OR`. When `AND` and `OR` are both used in the
-   * expression, parentheses must be appropriately used to group the
-   * combinations. The expression may also contain regular expressions.
-   * See https://google.aip.dev/160 for more information on the grammar.
-   * 
- * - * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for filter. - */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - *
-   * Optional. The maximum number of saved queries to return per page. The
-   * service may return fewer than this value. If unspecified, at most 50 will
-   * be returned.
-   *  The maximum value is 1000; values above 1000 will be coerced to 1000.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Optional. A page token, received from a previous `ListSavedQueries` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListSavedQueries` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Optional. A page token, received from a previous `ListSavedQueries` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListSavedQueries` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java deleted file mode 100644 index 8b33a72bc3ba..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponse.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Response of listing saved queries.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesResponse} - */ -public final class ListSavedQueriesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListSavedQueriesResponse) - ListSavedQueriesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSavedQueriesResponse.newBuilder() to construct. - private ListSavedQueriesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSavedQueriesResponse() { - savedQueries_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSavedQueriesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListSavedQueriesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - savedQueries_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - savedQueries_.add( - input.readMessage(com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - savedQueries_ = java.util.Collections.unmodifiableList(savedQueries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListSavedQueriesResponse.class, com.google.cloud.asset.v1.ListSavedQueriesResponse.Builder.class); - } - - public static final int SAVED_QUERIES_FIELD_NUMBER = 1; - private java.util.List savedQueries_; - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - @java.lang.Override - public java.util.List getSavedQueriesList() { - return savedQueries_; - } - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - @java.lang.Override - public java.util.List - getSavedQueriesOrBuilderList() { - return savedQueries_; - } - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - @java.lang.Override - public int getSavedQueriesCount() { - return savedQueries_.size(); - } - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery getSavedQueries(int index) { - return savedQueries_.get(index); - } - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueriesOrBuilder( - int index) { - return savedQueries_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < savedQueries_.size(); i++) { - output.writeMessage(1, savedQueries_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < savedQueries_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, savedQueries_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ListSavedQueriesResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ListSavedQueriesResponse other = (com.google.cloud.asset.v1.ListSavedQueriesResponse) obj; - - if (!getSavedQueriesList() - .equals(other.getSavedQueriesList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSavedQueriesCount() > 0) { - hash = (37 * hash) + SAVED_QUERIES_FIELD_NUMBER; - hash = (53 * hash) + getSavedQueriesList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ListSavedQueriesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ListSavedQueriesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Response of listing saved queries.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ListSavedQueriesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListSavedQueriesResponse) - com.google.cloud.asset.v1.ListSavedQueriesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ListSavedQueriesResponse.class, com.google.cloud.asset.v1.ListSavedQueriesResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ListSavedQueriesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSavedQueriesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (savedQueriesBuilder_ == null) { - savedQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - savedQueriesBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_ListSavedQueriesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ListSavedQueriesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesResponse build() { - com.google.cloud.asset.v1.ListSavedQueriesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesResponse buildPartial() { - com.google.cloud.asset.v1.ListSavedQueriesResponse result = new com.google.cloud.asset.v1.ListSavedQueriesResponse(this); - int from_bitField0_ = bitField0_; - if (savedQueriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - savedQueries_ = java.util.Collections.unmodifiableList(savedQueries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.savedQueries_ = savedQueries_; - } else { - result.savedQueries_ = savedQueriesBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ListSavedQueriesResponse) { - return mergeFrom((com.google.cloud.asset.v1.ListSavedQueriesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ListSavedQueriesResponse other) { - if (other == com.google.cloud.asset.v1.ListSavedQueriesResponse.getDefaultInstance()) return this; - if (savedQueriesBuilder_ == null) { - if (!other.savedQueries_.isEmpty()) { - if (savedQueries_.isEmpty()) { - savedQueries_ = other.savedQueries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSavedQueriesIsMutable(); - savedQueries_.addAll(other.savedQueries_); - } - onChanged(); - } - } else { - if (!other.savedQueries_.isEmpty()) { - if (savedQueriesBuilder_.isEmpty()) { - savedQueriesBuilder_.dispose(); - savedQueriesBuilder_ = null; - savedQueries_ = other.savedQueries_; - bitField0_ = (bitField0_ & ~0x00000001); - savedQueriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSavedQueriesFieldBuilder() : null; - } else { - savedQueriesBuilder_.addAllMessages(other.savedQueries_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ListSavedQueriesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ListSavedQueriesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List savedQueries_ = - java.util.Collections.emptyList(); - private void ensureSavedQueriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - savedQueries_ = new java.util.ArrayList(savedQueries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> savedQueriesBuilder_; - - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public java.util.List getSavedQueriesList() { - if (savedQueriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(savedQueries_); - } else { - return savedQueriesBuilder_.getMessageList(); - } - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public int getSavedQueriesCount() { - if (savedQueriesBuilder_ == null) { - return savedQueries_.size(); - } else { - return savedQueriesBuilder_.getCount(); - } - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public com.google.cloud.asset.v1.SavedQuery getSavedQueries(int index) { - if (savedQueriesBuilder_ == null) { - return savedQueries_.get(index); - } else { - return savedQueriesBuilder_.getMessage(index); - } - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder setSavedQueries( - int index, com.google.cloud.asset.v1.SavedQuery value) { - if (savedQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSavedQueriesIsMutable(); - savedQueries_.set(index, value); - onChanged(); - } else { - savedQueriesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder setSavedQueries( - int index, com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { - if (savedQueriesBuilder_ == null) { - ensureSavedQueriesIsMutable(); - savedQueries_.set(index, builderForValue.build()); - onChanged(); - } else { - savedQueriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder addSavedQueries(com.google.cloud.asset.v1.SavedQuery value) { - if (savedQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSavedQueriesIsMutable(); - savedQueries_.add(value); - onChanged(); - } else { - savedQueriesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder addSavedQueries( - int index, com.google.cloud.asset.v1.SavedQuery value) { - if (savedQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSavedQueriesIsMutable(); - savedQueries_.add(index, value); - onChanged(); - } else { - savedQueriesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder addSavedQueries( - com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { - if (savedQueriesBuilder_ == null) { - ensureSavedQueriesIsMutable(); - savedQueries_.add(builderForValue.build()); - onChanged(); - } else { - savedQueriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder addSavedQueries( - int index, com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { - if (savedQueriesBuilder_ == null) { - ensureSavedQueriesIsMutable(); - savedQueries_.add(index, builderForValue.build()); - onChanged(); - } else { - savedQueriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder addAllSavedQueries( - java.lang.Iterable values) { - if (savedQueriesBuilder_ == null) { - ensureSavedQueriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, savedQueries_); - onChanged(); - } else { - savedQueriesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder clearSavedQueries() { - if (savedQueriesBuilder_ == null) { - savedQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - savedQueriesBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public Builder removeSavedQueries(int index) { - if (savedQueriesBuilder_ == null) { - ensureSavedQueriesIsMutable(); - savedQueries_.remove(index); - onChanged(); - } else { - savedQueriesBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public com.google.cloud.asset.v1.SavedQuery.Builder getSavedQueriesBuilder( - int index) { - return getSavedQueriesFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueriesOrBuilder( - int index) { - if (savedQueriesBuilder_ == null) { - return savedQueries_.get(index); } else { - return savedQueriesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public java.util.List - getSavedQueriesOrBuilderList() { - if (savedQueriesBuilder_ != null) { - return savedQueriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(savedQueries_); - } - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public com.google.cloud.asset.v1.SavedQuery.Builder addSavedQueriesBuilder() { - return getSavedQueriesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.SavedQuery.getDefaultInstance()); - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public com.google.cloud.asset.v1.SavedQuery.Builder addSavedQueriesBuilder( - int index) { - return getSavedQueriesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.SavedQuery.getDefaultInstance()); - } - /** - *
-     * A list of savedQueries.
-     * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - public java.util.List - getSavedQueriesBuilderList() { - return getSavedQueriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> - getSavedQueriesFieldBuilder() { - if (savedQueriesBuilder_ == null) { - savedQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder>( - savedQueries_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - savedQueries_ = null; - } - return savedQueriesBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ListSavedQueriesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListSavedQueriesResponse) - private static final com.google.cloud.asset.v1.ListSavedQueriesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListSavedQueriesResponse(); - } - - public static com.google.cloud.asset.v1.ListSavedQueriesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSavedQueriesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSavedQueriesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ListSavedQueriesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java deleted file mode 100644 index 9c5fbc9067d6..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListSavedQueriesResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface ListSavedQueriesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListSavedQueriesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - java.util.List - getSavedQueriesList(); - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - com.google.cloud.asset.v1.SavedQuery getSavedQueries(int index); - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - int getSavedQueriesCount(); - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - java.util.List - getSavedQueriesOrBuilderList(); - /** - *
-   * A list of savedQueries.
-   * 
- * - * repeated .google.cloud.asset.v1.SavedQuery saved_queries = 1; - */ - com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueriesOrBuilder( - int index); - - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java deleted file mode 100644 index e561eb749501..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysis.java +++ /dev/null @@ -1,1197 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A message to group the analysis information.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.MoveAnalysis} - */ -public final class MoveAnalysis extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.MoveAnalysis) - MoveAnalysisOrBuilder { -private static final long serialVersionUID = 0L; - // Use MoveAnalysis.newBuilder() to construct. - private MoveAnalysis(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MoveAnalysis() { - displayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MoveAnalysis(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MoveAnalysis( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 18: { - com.google.cloud.asset.v1.MoveAnalysisResult.Builder subBuilder = null; - if (resultCase_ == 2) { - subBuilder = ((com.google.cloud.asset.v1.MoveAnalysisResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.cloud.asset.v1.MoveAnalysisResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.MoveAnalysisResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 2; - break; - } - case 26: { - com.google.rpc.Status.Builder subBuilder = null; - if (resultCase_ == 3) { - subBuilder = ((com.google.rpc.Status) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.rpc.Status) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 3; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.MoveAnalysis.class, com.google.cloud.asset.v1.MoveAnalysis.Builder.class); - } - - private int resultCase_ = 0; - private java.lang.Object result_; - public enum ResultCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ANALYSIS(2), - ERROR(3), - RESULT_NOT_SET(0); - private final int value; - private ResultCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResultCase valueOf(int value) { - return forNumber(value); - } - - public static ResultCase forNumber(int value) { - switch (value) { - case 2: return ANALYSIS; - case 3: return ERROR; - case 0: return RESULT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object displayName_; - /** - *
-   * The user friendly display name of the analysis. E.g. IAM, Organization
-   * Policy etc.
-   * 
- * - * string display_name = 1; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The user friendly display name of the analysis. E.g. IAM, Organization
-   * Policy etc.
-   * 
- * - * string display_name = 1; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANALYSIS_FIELD_NUMBER = 2; - /** - *
-   * Analysis result of moving the target resource.
-   * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - * @return Whether the analysis field is set. - */ - @java.lang.Override - public boolean hasAnalysis() { - return resultCase_ == 2; - } - /** - *
-   * Analysis result of moving the target resource.
-   * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - * @return The analysis. - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResult getAnalysis() { - if (resultCase_ == 2) { - return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; - } - return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); - } - /** - *
-   * Analysis result of moving the target resource.
-   * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder getAnalysisOrBuilder() { - if (resultCase_ == 2) { - return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; - } - return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); - } - - public static final int ERROR_FIELD_NUMBER = 3; - /** - *
-   * Description of error encountered when performing the analysis.
-   * 
- * - * .google.rpc.Status error = 3; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return resultCase_ == 3; - } - /** - *
-   * Description of error encountered when performing the analysis.
-   * 
- * - * .google.rpc.Status error = 3; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - if (resultCase_ == 3) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - /** - *
-   * Description of error encountered when performing the analysis.
-   * 
- * - * .google.rpc.Status error = 3; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (resultCase_ == 3) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); - } - if (resultCase_ == 2) { - output.writeMessage(2, (com.google.cloud.asset.v1.MoveAnalysisResult) result_); - } - if (resultCase_ == 3) { - output.writeMessage(3, (com.google.rpc.Status) result_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); - } - if (resultCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.cloud.asset.v1.MoveAnalysisResult) result_); - } - if (resultCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.rpc.Status) result_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.MoveAnalysis)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.MoveAnalysis other = (com.google.cloud.asset.v1.MoveAnalysis) obj; - - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getResultCase().equals(other.getResultCase())) return false; - switch (resultCase_) { - case 2: - if (!getAnalysis() - .equals(other.getAnalysis())) return false; - break; - case 3: - if (!getError() - .equals(other.getError())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - switch (resultCase_) { - case 2: - hash = (37 * hash) + ANALYSIS_FIELD_NUMBER; - hash = (53 * hash) + getAnalysis().hashCode(); - break; - case 3: - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveAnalysis parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.MoveAnalysis prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A message to group the analysis information.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.MoveAnalysis} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.MoveAnalysis) - com.google.cloud.asset.v1.MoveAnalysisOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.MoveAnalysis.class, com.google.cloud.asset.v1.MoveAnalysis.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.MoveAnalysis.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - displayName_ = ""; - - resultCase_ = 0; - result_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysis_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysis getDefaultInstanceForType() { - return com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysis build() { - com.google.cloud.asset.v1.MoveAnalysis result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysis buildPartial() { - com.google.cloud.asset.v1.MoveAnalysis result = new com.google.cloud.asset.v1.MoveAnalysis(this); - result.displayName_ = displayName_; - if (resultCase_ == 2) { - if (analysisBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = analysisBuilder_.build(); - } - } - if (resultCase_ == 3) { - if (errorBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = errorBuilder_.build(); - } - } - result.resultCase_ = resultCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.MoveAnalysis) { - return mergeFrom((com.google.cloud.asset.v1.MoveAnalysis)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.MoveAnalysis other) { - if (other == com.google.cloud.asset.v1.MoveAnalysis.getDefaultInstance()) return this; - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - switch (other.getResultCase()) { - case ANALYSIS: { - mergeAnalysis(other.getAnalysis()); - break; - } - case ERROR: { - mergeError(other.getError()); - break; - } - case RESULT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.MoveAnalysis parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.MoveAnalysis) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int resultCase_ = 0; - private java.lang.Object result_; - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public Builder clearResult() { - resultCase_ = 0; - result_ = null; - onChanged(); - return this; - } - - - private java.lang.Object displayName_ = ""; - /** - *
-     * The user friendly display name of the analysis. E.g. IAM, Organization
-     * Policy etc.
-     * 
- * - * string display_name = 1; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The user friendly display name of the analysis. E.g. IAM, Organization
-     * Policy etc.
-     * 
- * - * string display_name = 1; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The user friendly display name of the analysis. E.g. IAM, Organization
-     * Policy etc.
-     * 
- * - * string display_name = 1; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The user friendly display name of the analysis. E.g. IAM, Organization
-     * Policy etc.
-     * 
- * - * string display_name = 1; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The user friendly display name of the analysis. E.g. IAM, Organization
-     * Policy etc.
-     * 
- * - * string display_name = 1; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.MoveAnalysisResult, com.google.cloud.asset.v1.MoveAnalysisResult.Builder, com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder> analysisBuilder_; - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - * @return Whether the analysis field is set. - */ - @java.lang.Override - public boolean hasAnalysis() { - return resultCase_ == 2; - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - * @return The analysis. - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResult getAnalysis() { - if (analysisBuilder_ == null) { - if (resultCase_ == 2) { - return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; - } - return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); - } else { - if (resultCase_ == 2) { - return analysisBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); - } - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - public Builder setAnalysis(com.google.cloud.asset.v1.MoveAnalysisResult value) { - if (analysisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - analysisBuilder_.setMessage(value); - } - resultCase_ = 2; - return this; - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - public Builder setAnalysis( - com.google.cloud.asset.v1.MoveAnalysisResult.Builder builderForValue) { - if (analysisBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - analysisBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 2; - return this; - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - public Builder mergeAnalysis(com.google.cloud.asset.v1.MoveAnalysisResult value) { - if (analysisBuilder_ == null) { - if (resultCase_ == 2 && - result_ != com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance()) { - result_ = com.google.cloud.asset.v1.MoveAnalysisResult.newBuilder((com.google.cloud.asset.v1.MoveAnalysisResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 2) { - analysisBuilder_.mergeFrom(value); - } else { - analysisBuilder_.setMessage(value); - } - } - resultCase_ = 2; - return this; - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - public Builder clearAnalysis() { - if (analysisBuilder_ == null) { - if (resultCase_ == 2) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 2) { - resultCase_ = 0; - result_ = null; - } - analysisBuilder_.clear(); - } - return this; - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - public com.google.cloud.asset.v1.MoveAnalysisResult.Builder getAnalysisBuilder() { - return getAnalysisFieldBuilder().getBuilder(); - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder getAnalysisOrBuilder() { - if ((resultCase_ == 2) && (analysisBuilder_ != null)) { - return analysisBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 2) { - return (com.google.cloud.asset.v1.MoveAnalysisResult) result_; - } - return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); - } - } - /** - *
-     * Analysis result of moving the target resource.
-     * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.MoveAnalysisResult, com.google.cloud.asset.v1.MoveAnalysisResult.Builder, com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder> - getAnalysisFieldBuilder() { - if (analysisBuilder_ == null) { - if (!(resultCase_ == 2)) { - result_ = com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); - } - analysisBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.MoveAnalysisResult, com.google.cloud.asset.v1.MoveAnalysisResult.Builder, com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder>( - (com.google.cloud.asset.v1.MoveAnalysisResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 2; - onChanged();; - return analysisBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return resultCase_ == 3; - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - if (resultCase_ == 3) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } else { - if (resultCase_ == 3) { - return errorBuilder_.getMessage(); - } - return com.google.rpc.Status.getDefaultInstance(); - } - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - resultCase_ = 3; - return this; - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 3; - return this; - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (resultCase_ == 3 && - result_ != com.google.rpc.Status.getDefaultInstance()) { - result_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 3) { - errorBuilder_.mergeFrom(value); - } else { - errorBuilder_.setMessage(value); - } - } - resultCase_ = 3; - return this; - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - if (resultCase_ == 3) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 3) { - resultCase_ = 0; - result_ = null; - } - errorBuilder_.clear(); - } - return this; - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if ((resultCase_ == 3) && (errorBuilder_ != null)) { - return errorBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 3) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - } - /** - *
-     * Description of error encountered when performing the analysis.
-     * 
- * - * .google.rpc.Status error = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - if (!(resultCase_ == 3)) { - result_ = com.google.rpc.Status.getDefaultInstance(); - } - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - (com.google.rpc.Status) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 3; - onChanged();; - return errorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.MoveAnalysis) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.MoveAnalysis) - private static final com.google.cloud.asset.v1.MoveAnalysis DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.MoveAnalysis(); - } - - public static com.google.cloud.asset.v1.MoveAnalysis getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MoveAnalysis parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveAnalysis(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysis getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java deleted file mode 100644 index 463a887902a6..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisOrBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface MoveAnalysisOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.MoveAnalysis) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The user friendly display name of the analysis. E.g. IAM, Organization
-   * Policy etc.
-   * 
- * - * string display_name = 1; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The user friendly display name of the analysis. E.g. IAM, Organization
-   * Policy etc.
-   * 
- * - * string display_name = 1; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * Analysis result of moving the target resource.
-   * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - * @return Whether the analysis field is set. - */ - boolean hasAnalysis(); - /** - *
-   * Analysis result of moving the target resource.
-   * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - * @return The analysis. - */ - com.google.cloud.asset.v1.MoveAnalysisResult getAnalysis(); - /** - *
-   * Analysis result of moving the target resource.
-   * 
- * - * .google.cloud.asset.v1.MoveAnalysisResult analysis = 2; - */ - com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder getAnalysisOrBuilder(); - - /** - *
-   * Description of error encountered when performing the analysis.
-   * 
- * - * .google.rpc.Status error = 3; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * Description of error encountered when performing the analysis.
-   * 
- * - * .google.rpc.Status error = 3; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * Description of error encountered when performing the analysis.
-   * 
- * - * .google.rpc.Status error = 3; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - public com.google.cloud.asset.v1.MoveAnalysis.ResultCase getResultCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java deleted file mode 100644 index 1a7deec03d6b..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResult.java +++ /dev/null @@ -1,1381 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * An analysis result including blockers and warnings.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.MoveAnalysisResult} - */ -public final class MoveAnalysisResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.MoveAnalysisResult) - MoveAnalysisResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use MoveAnalysisResult.newBuilder() to construct. - private MoveAnalysisResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MoveAnalysisResult() { - blockers_ = java.util.Collections.emptyList(); - warnings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MoveAnalysisResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MoveAnalysisResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - blockers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - blockers_.add( - input.readMessage(com.google.cloud.asset.v1.MoveImpact.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - warnings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - warnings_.add( - input.readMessage(com.google.cloud.asset.v1.MoveImpact.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - blockers_ = java.util.Collections.unmodifiableList(blockers_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - warnings_ = java.util.Collections.unmodifiableList(warnings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.MoveAnalysisResult.class, com.google.cloud.asset.v1.MoveAnalysisResult.Builder.class); - } - - public static final int BLOCKERS_FIELD_NUMBER = 1; - private java.util.List blockers_; - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - @java.lang.Override - public java.util.List getBlockersList() { - return blockers_; - } - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - @java.lang.Override - public java.util.List - getBlockersOrBuilderList() { - return blockers_; - } - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - @java.lang.Override - public int getBlockersCount() { - return blockers_.size(); - } - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpact getBlockers(int index) { - return blockers_.get(index); - } - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpactOrBuilder getBlockersOrBuilder( - int index) { - return blockers_.get(index); - } - - public static final int WARNINGS_FIELD_NUMBER = 2; - private java.util.List warnings_; - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - @java.lang.Override - public java.util.List getWarningsList() { - return warnings_; - } - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - @java.lang.Override - public java.util.List - getWarningsOrBuilderList() { - return warnings_; - } - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - @java.lang.Override - public int getWarningsCount() { - return warnings_.size(); - } - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpact getWarnings(int index) { - return warnings_.get(index); - } - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpactOrBuilder getWarningsOrBuilder( - int index) { - return warnings_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < blockers_.size(); i++) { - output.writeMessage(1, blockers_.get(i)); - } - for (int i = 0; i < warnings_.size(); i++) { - output.writeMessage(2, warnings_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < blockers_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, blockers_.get(i)); - } - for (int i = 0; i < warnings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, warnings_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.MoveAnalysisResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.MoveAnalysisResult other = (com.google.cloud.asset.v1.MoveAnalysisResult) obj; - - if (!getBlockersList() - .equals(other.getBlockersList())) return false; - if (!getWarningsList() - .equals(other.getWarningsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBlockersCount() > 0) { - hash = (37 * hash) + BLOCKERS_FIELD_NUMBER; - hash = (53 * hash) + getBlockersList().hashCode(); - } - if (getWarningsCount() > 0) { - hash = (37 * hash) + WARNINGS_FIELD_NUMBER; - hash = (53 * hash) + getWarningsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveAnalysisResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.MoveAnalysisResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An analysis result including blockers and warnings.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.MoveAnalysisResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.MoveAnalysisResult) - com.google.cloud.asset.v1.MoveAnalysisResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.MoveAnalysisResult.class, com.google.cloud.asset.v1.MoveAnalysisResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.MoveAnalysisResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getBlockersFieldBuilder(); - getWarningsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (blockersBuilder_ == null) { - blockers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blockersBuilder_.clear(); - } - if (warningsBuilder_ == null) { - warnings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - warningsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveAnalysisResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResult build() { - com.google.cloud.asset.v1.MoveAnalysisResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResult buildPartial() { - com.google.cloud.asset.v1.MoveAnalysisResult result = new com.google.cloud.asset.v1.MoveAnalysisResult(this); - int from_bitField0_ = bitField0_; - if (blockersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - blockers_ = java.util.Collections.unmodifiableList(blockers_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blockers_ = blockers_; - } else { - result.blockers_ = blockersBuilder_.build(); - } - if (warningsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - warnings_ = java.util.Collections.unmodifiableList(warnings_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.warnings_ = warnings_; - } else { - result.warnings_ = warningsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.MoveAnalysisResult) { - return mergeFrom((com.google.cloud.asset.v1.MoveAnalysisResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.MoveAnalysisResult other) { - if (other == com.google.cloud.asset.v1.MoveAnalysisResult.getDefaultInstance()) return this; - if (blockersBuilder_ == null) { - if (!other.blockers_.isEmpty()) { - if (blockers_.isEmpty()) { - blockers_ = other.blockers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlockersIsMutable(); - blockers_.addAll(other.blockers_); - } - onChanged(); - } - } else { - if (!other.blockers_.isEmpty()) { - if (blockersBuilder_.isEmpty()) { - blockersBuilder_.dispose(); - blockersBuilder_ = null; - blockers_ = other.blockers_; - bitField0_ = (bitField0_ & ~0x00000001); - blockersBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getBlockersFieldBuilder() : null; - } else { - blockersBuilder_.addAllMessages(other.blockers_); - } - } - } - if (warningsBuilder_ == null) { - if (!other.warnings_.isEmpty()) { - if (warnings_.isEmpty()) { - warnings_ = other.warnings_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureWarningsIsMutable(); - warnings_.addAll(other.warnings_); - } - onChanged(); - } - } else { - if (!other.warnings_.isEmpty()) { - if (warningsBuilder_.isEmpty()) { - warningsBuilder_.dispose(); - warningsBuilder_ = null; - warnings_ = other.warnings_; - bitField0_ = (bitField0_ & ~0x00000002); - warningsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWarningsFieldBuilder() : null; - } else { - warningsBuilder_.addAllMessages(other.warnings_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.MoveAnalysisResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.MoveAnalysisResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List blockers_ = - java.util.Collections.emptyList(); - private void ensureBlockersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - blockers_ = new java.util.ArrayList(blockers_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> blockersBuilder_; - - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public java.util.List getBlockersList() { - if (blockersBuilder_ == null) { - return java.util.Collections.unmodifiableList(blockers_); - } else { - return blockersBuilder_.getMessageList(); - } - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public int getBlockersCount() { - if (blockersBuilder_ == null) { - return blockers_.size(); - } else { - return blockersBuilder_.getCount(); - } - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public com.google.cloud.asset.v1.MoveImpact getBlockers(int index) { - if (blockersBuilder_ == null) { - return blockers_.get(index); - } else { - return blockersBuilder_.getMessage(index); - } - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder setBlockers( - int index, com.google.cloud.asset.v1.MoveImpact value) { - if (blockersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlockersIsMutable(); - blockers_.set(index, value); - onChanged(); - } else { - blockersBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder setBlockers( - int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { - if (blockersBuilder_ == null) { - ensureBlockersIsMutable(); - blockers_.set(index, builderForValue.build()); - onChanged(); - } else { - blockersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder addBlockers(com.google.cloud.asset.v1.MoveImpact value) { - if (blockersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlockersIsMutable(); - blockers_.add(value); - onChanged(); - } else { - blockersBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder addBlockers( - int index, com.google.cloud.asset.v1.MoveImpact value) { - if (blockersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlockersIsMutable(); - blockers_.add(index, value); - onChanged(); - } else { - blockersBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder addBlockers( - com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { - if (blockersBuilder_ == null) { - ensureBlockersIsMutable(); - blockers_.add(builderForValue.build()); - onChanged(); - } else { - blockersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder addBlockers( - int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { - if (blockersBuilder_ == null) { - ensureBlockersIsMutable(); - blockers_.add(index, builderForValue.build()); - onChanged(); - } else { - blockersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder addAllBlockers( - java.lang.Iterable values) { - if (blockersBuilder_ == null) { - ensureBlockersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, blockers_); - onChanged(); - } else { - blockersBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder clearBlockers() { - if (blockersBuilder_ == null) { - blockers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blockersBuilder_.clear(); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public Builder removeBlockers(int index) { - if (blockersBuilder_ == null) { - ensureBlockersIsMutable(); - blockers_.remove(index); - onChanged(); - } else { - blockersBuilder_.remove(index); - } - return this; - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public com.google.cloud.asset.v1.MoveImpact.Builder getBlockersBuilder( - int index) { - return getBlockersFieldBuilder().getBuilder(index); - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public com.google.cloud.asset.v1.MoveImpactOrBuilder getBlockersOrBuilder( - int index) { - if (blockersBuilder_ == null) { - return blockers_.get(index); } else { - return blockersBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public java.util.List - getBlockersOrBuilderList() { - if (blockersBuilder_ != null) { - return blockersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blockers_); - } - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public com.google.cloud.asset.v1.MoveImpact.Builder addBlockersBuilder() { - return getBlockersFieldBuilder().addBuilder( - com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public com.google.cloud.asset.v1.MoveImpact.Builder addBlockersBuilder( - int index) { - return getBlockersFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); - } - /** - *
-     * Blocking information that would prevent the target resource from moving
-     * to the specified destination at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - public java.util.List - getBlockersBuilderList() { - return getBlockersFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> - getBlockersFieldBuilder() { - if (blockersBuilder_ == null) { - blockersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder>( - blockers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - blockers_ = null; - } - return blockersBuilder_; - } - - private java.util.List warnings_ = - java.util.Collections.emptyList(); - private void ensureWarningsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - warnings_ = new java.util.ArrayList(warnings_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> warningsBuilder_; - - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public java.util.List getWarningsList() { - if (warningsBuilder_ == null) { - return java.util.Collections.unmodifiableList(warnings_); - } else { - return warningsBuilder_.getMessageList(); - } - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public int getWarningsCount() { - if (warningsBuilder_ == null) { - return warnings_.size(); - } else { - return warningsBuilder_.getCount(); - } - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public com.google.cloud.asset.v1.MoveImpact getWarnings(int index) { - if (warningsBuilder_ == null) { - return warnings_.get(index); - } else { - return warningsBuilder_.getMessage(index); - } - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder setWarnings( - int index, com.google.cloud.asset.v1.MoveImpact value) { - if (warningsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWarningsIsMutable(); - warnings_.set(index, value); - onChanged(); - } else { - warningsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder setWarnings( - int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { - if (warningsBuilder_ == null) { - ensureWarningsIsMutable(); - warnings_.set(index, builderForValue.build()); - onChanged(); - } else { - warningsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder addWarnings(com.google.cloud.asset.v1.MoveImpact value) { - if (warningsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWarningsIsMutable(); - warnings_.add(value); - onChanged(); - } else { - warningsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder addWarnings( - int index, com.google.cloud.asset.v1.MoveImpact value) { - if (warningsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWarningsIsMutable(); - warnings_.add(index, value); - onChanged(); - } else { - warningsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder addWarnings( - com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { - if (warningsBuilder_ == null) { - ensureWarningsIsMutable(); - warnings_.add(builderForValue.build()); - onChanged(); - } else { - warningsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder addWarnings( - int index, com.google.cloud.asset.v1.MoveImpact.Builder builderForValue) { - if (warningsBuilder_ == null) { - ensureWarningsIsMutable(); - warnings_.add(index, builderForValue.build()); - onChanged(); - } else { - warningsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder addAllWarnings( - java.lang.Iterable values) { - if (warningsBuilder_ == null) { - ensureWarningsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, warnings_); - onChanged(); - } else { - warningsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder clearWarnings() { - if (warningsBuilder_ == null) { - warnings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - warningsBuilder_.clear(); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public Builder removeWarnings(int index) { - if (warningsBuilder_ == null) { - ensureWarningsIsMutable(); - warnings_.remove(index); - onChanged(); - } else { - warningsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public com.google.cloud.asset.v1.MoveImpact.Builder getWarningsBuilder( - int index) { - return getWarningsFieldBuilder().getBuilder(index); - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public com.google.cloud.asset.v1.MoveImpactOrBuilder getWarningsOrBuilder( - int index) { - if (warningsBuilder_ == null) { - return warnings_.get(index); } else { - return warningsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public java.util.List - getWarningsOrBuilderList() { - if (warningsBuilder_ != null) { - return warningsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(warnings_); - } - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public com.google.cloud.asset.v1.MoveImpact.Builder addWarningsBuilder() { - return getWarningsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public com.google.cloud.asset.v1.MoveImpact.Builder addWarningsBuilder( - int index) { - return getWarningsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()); - } - /** - *
-     * Warning information indicating that moving the target resource to the
-     * specified destination might be unsafe. This can include important policy
-     * information and configuration changes, but will not block moves at runtime.
-     * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - public java.util.List - getWarningsBuilderList() { - return getWarningsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder> - getWarningsFieldBuilder() { - if (warningsBuilder_ == null) { - warningsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.MoveImpact, com.google.cloud.asset.v1.MoveImpact.Builder, com.google.cloud.asset.v1.MoveImpactOrBuilder>( - warnings_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - warnings_ = null; - } - return warningsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.MoveAnalysisResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.MoveAnalysisResult) - private static final com.google.cloud.asset.v1.MoveAnalysisResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.MoveAnalysisResult(); - } - - public static com.google.cloud.asset.v1.MoveAnalysisResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MoveAnalysisResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveAnalysisResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveAnalysisResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java deleted file mode 100644 index 2d63ef150fcd..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveAnalysisResultOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface MoveAnalysisResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.MoveAnalysisResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - java.util.List - getBlockersList(); - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - com.google.cloud.asset.v1.MoveImpact getBlockers(int index); - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - int getBlockersCount(); - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - java.util.List - getBlockersOrBuilderList(); - /** - *
-   * Blocking information that would prevent the target resource from moving
-   * to the specified destination at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact blockers = 1; - */ - com.google.cloud.asset.v1.MoveImpactOrBuilder getBlockersOrBuilder( - int index); - - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - java.util.List - getWarningsList(); - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - com.google.cloud.asset.v1.MoveImpact getWarnings(int index); - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - int getWarningsCount(); - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - java.util.List - getWarningsOrBuilderList(); - /** - *
-   * Warning information indicating that moving the target resource to the
-   * specified destination might be unsafe. This can include important policy
-   * information and configuration changes, but will not block moves at runtime.
-   * 
- * - * repeated .google.cloud.asset.v1.MoveImpact warnings = 2; - */ - com.google.cloud.asset.v1.MoveImpactOrBuilder getWarningsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java deleted file mode 100644 index 1c20174c3262..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpact.java +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A message to group impacts of moving the target resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.MoveImpact} - */ -public final class MoveImpact extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.MoveImpact) - MoveImpactOrBuilder { -private static final long serialVersionUID = 0L; - // Use MoveImpact.newBuilder() to construct. - private MoveImpact(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private MoveImpact() { - detail_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new MoveImpact(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MoveImpact( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - detail_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.MoveImpact.class, com.google.cloud.asset.v1.MoveImpact.Builder.class); - } - - public static final int DETAIL_FIELD_NUMBER = 1; - private volatile java.lang.Object detail_; - /** - *
-   * User friendly impact detail in a free form message.
-   * 
- * - * string detail = 1; - * @return The detail. - */ - @java.lang.Override - public java.lang.String getDetail() { - java.lang.Object ref = detail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - detail_ = s; - return s; - } - } - /** - *
-   * User friendly impact detail in a free form message.
-   * 
- * - * string detail = 1; - * @return The bytes for detail. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDetailBytes() { - java.lang.Object ref = detail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - detail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, detail_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, detail_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.MoveImpact)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.MoveImpact other = (com.google.cloud.asset.v1.MoveImpact) obj; - - if (!getDetail() - .equals(other.getDetail())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DETAIL_FIELD_NUMBER; - hash = (53 * hash) + getDetail().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveImpact parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveImpact parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.MoveImpact parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.MoveImpact prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A message to group impacts of moving the target resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.MoveImpact} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.MoveImpact) - com.google.cloud.asset.v1.MoveImpactOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.MoveImpact.class, com.google.cloud.asset.v1.MoveImpact.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.MoveImpact.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - detail_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_MoveImpact_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpact getDefaultInstanceForType() { - return com.google.cloud.asset.v1.MoveImpact.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpact build() { - com.google.cloud.asset.v1.MoveImpact result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpact buildPartial() { - com.google.cloud.asset.v1.MoveImpact result = new com.google.cloud.asset.v1.MoveImpact(this); - result.detail_ = detail_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.MoveImpact) { - return mergeFrom((com.google.cloud.asset.v1.MoveImpact)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.MoveImpact other) { - if (other == com.google.cloud.asset.v1.MoveImpact.getDefaultInstance()) return this; - if (!other.getDetail().isEmpty()) { - detail_ = other.detail_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.MoveImpact parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.MoveImpact) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object detail_ = ""; - /** - *
-     * User friendly impact detail in a free form message.
-     * 
- * - * string detail = 1; - * @return The detail. - */ - public java.lang.String getDetail() { - java.lang.Object ref = detail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - detail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * User friendly impact detail in a free form message.
-     * 
- * - * string detail = 1; - * @return The bytes for detail. - */ - public com.google.protobuf.ByteString - getDetailBytes() { - java.lang.Object ref = detail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - detail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * User friendly impact detail in a free form message.
-     * 
- * - * string detail = 1; - * @param value The detail to set. - * @return This builder for chaining. - */ - public Builder setDetail( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - detail_ = value; - onChanged(); - return this; - } - /** - *
-     * User friendly impact detail in a free form message.
-     * 
- * - * string detail = 1; - * @return This builder for chaining. - */ - public Builder clearDetail() { - - detail_ = getDefaultInstance().getDetail(); - onChanged(); - return this; - } - /** - *
-     * User friendly impact detail in a free form message.
-     * 
- * - * string detail = 1; - * @param value The bytes for detail to set. - * @return This builder for chaining. - */ - public Builder setDetailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - detail_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.MoveImpact) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.MoveImpact) - private static final com.google.cloud.asset.v1.MoveImpact DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.MoveImpact(); - } - - public static com.google.cloud.asset.v1.MoveImpact getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public MoveImpact parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveImpact(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.MoveImpact getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java deleted file mode 100644 index d6416c9411ab..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/MoveImpactOrBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface MoveImpactOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.MoveImpact) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * User friendly impact detail in a free form message.
-   * 
- * - * string detail = 1; - * @return The detail. - */ - java.lang.String getDetail(); - /** - *
-   * User friendly impact detail in a free form message.
-   * 
- * - * string detail = 1; - * @return The bytes for detail. - */ - com.google.protobuf.ByteString - getDetailBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java deleted file mode 100644 index cf6b7ed90be6..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OrganizationName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class OrganizationName implements ResourceName { - private static final PathTemplate ORGANIZATION = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}"); - private volatile Map fieldValuesMap; - private final String organization; - - @Deprecated - protected OrganizationName() { - organization = null; - } - - private OrganizationName(Builder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - } - - public String getOrganization() { - return organization; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static OrganizationName of(String organization) { - return newBuilder().setOrganization(organization).build(); - } - - public static String format(String organization) { - return newBuilder().setOrganization(organization).build().toString(); - } - - public static OrganizationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - ORGANIZATION.validatedMatch( - formattedString, "OrganizationName.parse: formattedString not in valid format"); - return of(matchMap.get("organization")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (OrganizationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return ORGANIZATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return ORGANIZATION.instantiate("organization", organization); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - OrganizationName that = ((OrganizationName) o); - return Objects.equals(this.organization, that.organization); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(organization); - return h; - } - - /** Builder for organizations/{organization}. */ - public static class Builder { - private String organization; - - protected Builder() {} - - public String getOrganization() { - return organization; - } - - public Builder setOrganization(String organization) { - this.organization = organization; - return this; - } - - private Builder(OrganizationName organizationName) { - this.organization = organizationName.organization; - } - - public OrganizationName build() { - return new OrganizationName(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java deleted file mode 100644 index 2195ba20a96b..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfig.java +++ /dev/null @@ -1,1036 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Output configuration for export assets destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.OutputConfig} - */ -public final class OutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.OutputConfig) - OutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: { - com.google.cloud.asset.v1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = ((com.google.cloud.asset.v1.BigQueryDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1.BigQueryDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.OutputConfig.class, com.google.cloud.asset.v1.OutputConfig.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - public enum DestinationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_DESTINATION(1), - BIGQUERY_DESTINATION(2), - DESTINATION_NOT_SET(0); - private final int value; - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: return GCS_DESTINATION; - case 2: return BIGQUERY_DESTINATION; - case 0: return DESTINATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); - } - - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * Protobuf as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * Protobuf as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); - } - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * Protobuf as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - output.writeMessage(2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.cloud.asset.v1.BigQueryDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.OutputConfig other = (com.google.cloud.asset.v1.OutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - break; - case 2: - if (!getBigqueryDestination() - .equals(other.getBigqueryDestination())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 2: - hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output configuration for export assets destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.OutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.OutputConfig) - com.google.cloud.asset.v1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.OutputConfig.class, com.google.cloud.asset.v1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfig build() { - com.google.cloud.asset.v1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfig buildPartial() { - com.google.cloud.asset.v1.OutputConfig result = new com.google.cloud.asset.v1.OutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - if (destinationCase_ == 2) { - if (bigqueryDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = bigqueryDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.OutputConfig) { - return mergeFrom((com.google.cloud.asset.v1.OutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.OutputConfig other) { - if (other == com.google.cloud.asset.v1.OutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case GCS_DESTINATION: { - mergeGcsDestination(other.getGcsDestination()); - break; - } - case BIGQUERY_DESTINATION: { - mergeBigqueryDestination(other.getBigqueryDestination()); - break; - } - case DESTINATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int destinationCase_ = 0; - private java.lang.Object destination_; - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.GcsDestination, com.google.cloud.asset.v1.GcsDestination.Builder, com.google.cloud.asset.v1.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.asset.v1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.asset.v1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.asset.v1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 && - destination_ != com.google.cloud.asset.v1.GcsDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1.GcsDestination.newBuilder((com.google.cloud.asset.v1.GcsDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - gcsDestinationBuilder_.mergeFrom(value); - } else { - gcsDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - gcsDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.asset.v1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.GcsDestination, com.google.cloud.asset.v1.GcsDestination.Builder, com.google.cloud.asset.v1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.asset.v1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.GcsDestination, com.google.cloud.asset.v1.GcsDestination.Builder, com.google.cloud.asset.v1.GcsDestinationOrBuilder>( - (com.google.cloud.asset.v1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged();; - return gcsDestinationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.BigQueryDestination, com.google.cloud.asset.v1.BigQueryDestination.Builder, com.google.cloud.asset.v1.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 2) { - return bigqueryDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination(com.google.cloud.asset.v1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.asset.v1.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - public Builder mergeBigqueryDestination(com.google.cloud.asset.v1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2 && - destination_ != com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1.BigQueryDestination.newBuilder((com.google.cloud.asset.v1.BigQueryDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 2) { - bigqueryDestinationBuilder_.mergeFrom(value); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - } - bigqueryDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.asset.v1.BigQueryDestination.Builder getBigqueryDestinationBuilder() { - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * Protobuf as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.BigQueryDestination, com.google.cloud.asset.v1.BigQueryDestination.Builder, com.google.cloud.asset.v1.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - if (!(destinationCase_ == 2)) { - destination_ = com.google.cloud.asset.v1.BigQueryDestination.getDefaultInstance(); - } - bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.BigQueryDestination, com.google.cloud.asset.v1.BigQueryDestination.Builder, com.google.cloud.asset.v1.BigQueryDestinationOrBuilder>( - (com.google.cloud.asset.v1.BigQueryDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 2; - onChanged();; - return bigqueryDestinationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.OutputConfig) - private static final com.google.cloud.asset.v1.OutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.OutputConfig(); - } - - public static com.google.cloud.asset.v1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java deleted file mode 100644 index de717d5a0d5d..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface OutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.asset.v1.GcsDestination getGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.asset.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * Protobuf as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * Protobuf as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - com.google.cloud.asset.v1.BigQueryDestination getBigqueryDestination(); - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * Protobuf as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1.BigQueryDestination bigquery_destination = 2; - */ - com.google.cloud.asset.v1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); - - public com.google.cloud.asset.v1.OutputConfig.DestinationCase getDestinationCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java deleted file mode 100644 index ac7dadbb358c..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResult.java +++ /dev/null @@ -1,761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Output result of export assets.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.OutputResult} - */ -public final class OutputResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.OutputResult) - OutputResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputResult.newBuilder() to construct. - private OutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputResult() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.GcsOutputResult.Builder subBuilder = null; - if (resultCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1.GcsOutputResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.cloud.asset.v1.GcsOutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.GcsOutputResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.OutputResult.class, com.google.cloud.asset.v1.OutputResult.Builder.class); - } - - private int resultCase_ = 0; - private java.lang.Object result_; - public enum ResultCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_RESULT(1), - RESULT_NOT_SET(0); - private final int value; - private ResultCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResultCase valueOf(int value) { - return forNumber(value); - } - - public static ResultCase forNumber(int value) { - switch (value) { - case 1: return GCS_RESULT; - case 0: return RESULT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public static final int GCS_RESULT_FIELD_NUMBER = 1; - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - * @return Whether the gcsResult field is set. - */ - @java.lang.Override - public boolean hasGcsResult() { - return resultCase_ == 1; - } - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - * @return The gcsResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResult getGcsResult() { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); - } - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (resultCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1.GcsOutputResult) result_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (resultCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1.GcsOutputResult) result_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.OutputResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.OutputResult other = (com.google.cloud.asset.v1.OutputResult) obj; - - if (!getResultCase().equals(other.getResultCase())) return false; - switch (resultCase_) { - case 1: - if (!getGcsResult() - .equals(other.getGcsResult())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (resultCase_) { - case 1: - hash = (37 * hash) + GCS_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getGcsResult().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.OutputResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.OutputResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.OutputResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.OutputResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output result of export assets.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.OutputResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.OutputResult) - com.google.cloud.asset.v1.OutputResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.OutputResult.class, com.google.cloud.asset.v1.OutputResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.OutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resultCase_ = 0; - result_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_OutputResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1.OutputResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputResult build() { - com.google.cloud.asset.v1.OutputResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputResult buildPartial() { - com.google.cloud.asset.v1.OutputResult result = new com.google.cloud.asset.v1.OutputResult(this); - if (resultCase_ == 1) { - if (gcsResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = gcsResultBuilder_.build(); - } - } - result.resultCase_ = resultCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.OutputResult) { - return mergeFrom((com.google.cloud.asset.v1.OutputResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.OutputResult other) { - if (other == com.google.cloud.asset.v1.OutputResult.getDefaultInstance()) return this; - switch (other.getResultCase()) { - case GCS_RESULT: { - mergeGcsResult(other.getGcsResult()); - break; - } - case RESULT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.OutputResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.OutputResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int resultCase_ = 0; - private java.lang.Object result_; - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public Builder clearResult() { - resultCase_ = 0; - result_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.GcsOutputResult, com.google.cloud.asset.v1.GcsOutputResult.Builder, com.google.cloud.asset.v1.GcsOutputResultOrBuilder> gcsResultBuilder_; - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - * @return Whether the gcsResult field is set. - */ - @java.lang.Override - public boolean hasGcsResult() { - return resultCase_ == 1; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - * @return The gcsResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResult getGcsResult() { - if (gcsResultBuilder_ == null) { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); - } else { - if (resultCase_ == 1) { - return gcsResultBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); - } - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - public Builder setGcsResult(com.google.cloud.asset.v1.GcsOutputResult value) { - if (gcsResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - gcsResultBuilder_.setMessage(value); - } - resultCase_ = 1; - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - public Builder setGcsResult( - com.google.cloud.asset.v1.GcsOutputResult.Builder builderForValue) { - if (gcsResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - gcsResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 1; - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - public Builder mergeGcsResult(com.google.cloud.asset.v1.GcsOutputResult value) { - if (gcsResultBuilder_ == null) { - if (resultCase_ == 1 && - result_ != com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance()) { - result_ = com.google.cloud.asset.v1.GcsOutputResult.newBuilder((com.google.cloud.asset.v1.GcsOutputResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 1) { - gcsResultBuilder_.mergeFrom(value); - } else { - gcsResultBuilder_.setMessage(value); - } - } - resultCase_ = 1; - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - public Builder clearGcsResult() { - if (gcsResultBuilder_ == null) { - if (resultCase_ == 1) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 1) { - resultCase_ = 0; - result_ = null; - } - gcsResultBuilder_.clear(); - } - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - public com.google.cloud.asset.v1.GcsOutputResult.Builder getGcsResultBuilder() { - return getGcsResultFieldBuilder().getBuilder(); - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { - if ((resultCase_ == 1) && (gcsResultBuilder_ != null)) { - return gcsResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); - } - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.GcsOutputResult, com.google.cloud.asset.v1.GcsOutputResult.Builder, com.google.cloud.asset.v1.GcsOutputResultOrBuilder> - getGcsResultFieldBuilder() { - if (gcsResultBuilder_ == null) { - if (!(resultCase_ == 1)) { - result_ = com.google.cloud.asset.v1.GcsOutputResult.getDefaultInstance(); - } - gcsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.GcsOutputResult, com.google.cloud.asset.v1.GcsOutputResult.Builder, com.google.cloud.asset.v1.GcsOutputResultOrBuilder>( - (com.google.cloud.asset.v1.GcsOutputResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 1; - onChanged();; - return gcsResultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.OutputResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.OutputResult) - private static final com.google.cloud.asset.v1.OutputResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.OutputResult(); - } - - public static com.google.cloud.asset.v1.OutputResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.OutputResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java deleted file mode 100644 index 68dc7c1ed1ae..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/OutputResultOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface OutputResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.OutputResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - * @return Whether the gcsResult field is set. - */ - boolean hasGcsResult(); - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - * @return The gcsResult. - */ - com.google.cloud.asset.v1.GcsOutputResult getGcsResult(); - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1.GcsOutputResult gcs_result = 1; - */ - com.google.cloud.asset.v1.GcsOutputResultOrBuilder getGcsResultOrBuilder(); - - public com.google.cloud.asset.v1.OutputResult.ResultCase getResultCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java deleted file mode 100644 index 652087c7fe22..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpec.java +++ /dev/null @@ -1,716 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Specifications of BigQuery partitioned table as export destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.PartitionSpec} - */ -public final class PartitionSpec extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.PartitionSpec) - PartitionSpecOrBuilder { -private static final long serialVersionUID = 0L; - // Use PartitionSpec.newBuilder() to construct. - private PartitionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PartitionSpec() { - partitionKey_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PartitionSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PartitionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - partitionKey_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.PartitionSpec.class, com.google.cloud.asset.v1.PartitionSpec.Builder.class); - } - - /** - *
-   * This enum is used to determine the partition key column when exporting
-   * assets to BigQuery partitioned table(s). Note that, if the partition key is
-   * a timestamp column, the actual partition is based on its date value
-   * (expressed in UTC. see details in
-   * https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables).
-   * 
- * - * Protobuf enum {@code google.cloud.asset.v1.PartitionSpec.PartitionKey} - */ - public enum PartitionKey - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified partition key. If used, it means using non-partitioned table.
-     * 
- * - * PARTITION_KEY_UNSPECIFIED = 0; - */ - PARTITION_KEY_UNSPECIFIED(0), - /** - *
-     * The time when the snapshot is taken. If specified as partition key, the
-     * result table(s) is partitoned by the additional timestamp column,
-     * readTime. If [read_time] in ExportAssetsRequest is specified, the
-     * readTime column's value will be the same as it. Otherwise, its value will
-     * be the current time that is used to take the snapshot.
-     * 
- * - * READ_TIME = 1; - */ - READ_TIME(1), - /** - *
-     * The time when the request is received and started to be processed. If
-     * specified as partition key, the result table(s) is partitoned by the
-     * requestTime column, an additional timestamp column representing when the
-     * request was received.
-     * 
- * - * REQUEST_TIME = 2; - */ - REQUEST_TIME(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified partition key. If used, it means using non-partitioned table.
-     * 
- * - * PARTITION_KEY_UNSPECIFIED = 0; - */ - public static final int PARTITION_KEY_UNSPECIFIED_VALUE = 0; - /** - *
-     * The time when the snapshot is taken. If specified as partition key, the
-     * result table(s) is partitoned by the additional timestamp column,
-     * readTime. If [read_time] in ExportAssetsRequest is specified, the
-     * readTime column's value will be the same as it. Otherwise, its value will
-     * be the current time that is used to take the snapshot.
-     * 
- * - * READ_TIME = 1; - */ - public static final int READ_TIME_VALUE = 1; - /** - *
-     * The time when the request is received and started to be processed. If
-     * specified as partition key, the result table(s) is partitoned by the
-     * requestTime column, an additional timestamp column representing when the
-     * request was received.
-     * 
- * - * REQUEST_TIME = 2; - */ - public static final int REQUEST_TIME_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PartitionKey valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PartitionKey forNumber(int value) { - switch (value) { - case 0: return PARTITION_KEY_UNSPECIFIED; - case 1: return READ_TIME; - case 2: return REQUEST_TIME; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PartitionKey> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PartitionKey findValueByNumber(int number) { - return PartitionKey.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1.PartitionSpec.getDescriptor().getEnumTypes().get(0); - } - - private static final PartitionKey[] VALUES = values(); - - public static PartitionKey valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PartitionKey(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.PartitionSpec.PartitionKey) - } - - public static final int PARTITION_KEY_FIELD_NUMBER = 1; - private int partitionKey_; - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @return The enum numeric value on the wire for partitionKey. - */ - @java.lang.Override public int getPartitionKeyValue() { - return partitionKey_; - } - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @return The partitionKey. - */ - @java.lang.Override public com.google.cloud.asset.v1.PartitionSpec.PartitionKey getPartitionKey() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1.PartitionSpec.PartitionKey.valueOf(partitionKey_); - return result == null ? com.google.cloud.asset.v1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (partitionKey_ != com.google.cloud.asset.v1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { - output.writeEnum(1, partitionKey_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (partitionKey_ != com.google.cloud.asset.v1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, partitionKey_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.PartitionSpec)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.PartitionSpec other = (com.google.cloud.asset.v1.PartitionSpec) obj; - - if (partitionKey_ != other.partitionKey_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; - hash = (53 * hash) + partitionKey_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.PartitionSpec parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.PartitionSpec parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.PartitionSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.PartitionSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Specifications of BigQuery partitioned table as export destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.PartitionSpec} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.PartitionSpec) - com.google.cloud.asset.v1.PartitionSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.PartitionSpec.class, com.google.cloud.asset.v1.PartitionSpec.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.PartitionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - partitionKey_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PartitionSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.PartitionSpec getDefaultInstanceForType() { - return com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.PartitionSpec build() { - com.google.cloud.asset.v1.PartitionSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.PartitionSpec buildPartial() { - com.google.cloud.asset.v1.PartitionSpec result = new com.google.cloud.asset.v1.PartitionSpec(this); - result.partitionKey_ = partitionKey_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.PartitionSpec) { - return mergeFrom((com.google.cloud.asset.v1.PartitionSpec)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.PartitionSpec other) { - if (other == com.google.cloud.asset.v1.PartitionSpec.getDefaultInstance()) return this; - if (other.partitionKey_ != 0) { - setPartitionKeyValue(other.getPartitionKeyValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.PartitionSpec parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.PartitionSpec) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int partitionKey_ = 0; - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @return The enum numeric value on the wire for partitionKey. - */ - @java.lang.Override public int getPartitionKeyValue() { - return partitionKey_; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @param value The enum numeric value on the wire for partitionKey to set. - * @return This builder for chaining. - */ - public Builder setPartitionKeyValue(int value) { - - partitionKey_ = value; - onChanged(); - return this; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @return The partitionKey. - */ - @java.lang.Override - public com.google.cloud.asset.v1.PartitionSpec.PartitionKey getPartitionKey() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1.PartitionSpec.PartitionKey.valueOf(partitionKey_); - return result == null ? com.google.cloud.asset.v1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @param value The partitionKey to set. - * @return This builder for chaining. - */ - public Builder setPartitionKey(com.google.cloud.asset.v1.PartitionSpec.PartitionKey value) { - if (value == null) { - throw new NullPointerException(); - } - - partitionKey_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @return This builder for chaining. - */ - public Builder clearPartitionKey() { - - partitionKey_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.PartitionSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.PartitionSpec) - private static final com.google.cloud.asset.v1.PartitionSpec DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.PartitionSpec(); - } - - public static com.google.cloud.asset.v1.PartitionSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PartitionSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PartitionSpec(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.PartitionSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java deleted file mode 100644 index 0dd5bf8780fd..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PartitionSpecOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface PartitionSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.PartitionSpec) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @return The enum numeric value on the wire for partitionKey. - */ - int getPartitionKeyValue(); - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1.PartitionSpec.PartitionKey partition_key = 1; - * @return The partitionKey. - */ - com.google.cloud.asset.v1.PartitionSpec.PartitionKey getPartitionKey(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java deleted file mode 100644 index 032e6dc27a07..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ProjectName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class ProjectName implements ResourceName { - private static final PathTemplate PROJECT = - PathTemplate.createWithoutUrlEncoding("projects/{project}"); - private volatile Map fieldValuesMap; - private final String project; - - @Deprecated - protected ProjectName() { - project = null; - } - - private ProjectName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - } - - public String getProject() { - return project; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static ProjectName of(String project) { - return newBuilder().setProject(project).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - public static ProjectName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT.validatedMatch( - formattedString, "ProjectName.parse: formattedString not in valid format"); - return of(matchMap.get("project")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (ProjectName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT.instantiate("project", project); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - ProjectName that = ((ProjectName) o); - return Objects.equals(this.project, that.project); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - return h; - } - - /** Builder for projects/{project}. */ - public static class Builder { - private String project; - - protected Builder() {} - - public String getProject() { - return project; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - private Builder(ProjectName projectName) { - this.project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java deleted file mode 100644 index 840f3f696c42..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestination.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A Pub/Sub destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.PubsubDestination} - */ -public final class PubsubDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.PubsubDestination) - PubsubDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use PubsubDestination.newBuilder() to construct. - private PubsubDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PubsubDestination() { - topic_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PubsubDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PubsubDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.PubsubDestination.class, com.google.cloud.asset.v1.PubsubDestination.Builder.class); - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - *
-   * The name of the Pub/Sub topic to publish to.
-   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The topic. - */ - @java.lang.Override - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } - } - /** - *
-   * The name of the Pub/Sub topic to publish to.
-   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.PubsubDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.PubsubDestination other = (com.google.cloud.asset.v1.PubsubDestination) obj; - - if (!getTopic() - .equals(other.getTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.PubsubDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.PubsubDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.PubsubDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.PubsubDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Pub/Sub destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.PubsubDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.PubsubDestination) - com.google.cloud.asset.v1.PubsubDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.PubsubDestination.class, com.google.cloud.asset.v1.PubsubDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.PubsubDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - topic_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_PubsubDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestination build() { - com.google.cloud.asset.v1.PubsubDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestination buildPartial() { - com.google.cloud.asset.v1.PubsubDestination result = new com.google.cloud.asset.v1.PubsubDestination(this); - result.topic_ = topic_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.PubsubDestination) { - return mergeFrom((com.google.cloud.asset.v1.PubsubDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.PubsubDestination other) { - if (other == com.google.cloud.asset.v1.PubsubDestination.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.PubsubDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.PubsubDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object topic_ = ""; - /** - *
-     * The name of the Pub/Sub topic to publish to.
-     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @return The topic. - */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the Pub/Sub topic to publish to.
-     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the Pub/Sub topic to publish to.
-     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @param value The topic to set. - * @return This builder for chaining. - */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - *
-     * The name of the Pub/Sub topic to publish to.
-     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @return This builder for chaining. - */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - *
-     * The name of the Pub/Sub topic to publish to.
-     * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @param value The bytes for topic to set. - * @return This builder for chaining. - */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.PubsubDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.PubsubDestination) - private static final com.google.cloud.asset.v1.PubsubDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.PubsubDestination(); - } - - public static com.google.cloud.asset.v1.PubsubDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PubsubDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PubsubDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.PubsubDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java deleted file mode 100644 index 05bb241e5e96..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/PubsubDestinationOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface PubsubDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.PubsubDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the Pub/Sub topic to publish to.
-   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The topic. - */ - java.lang.String getTopic(); - /** - *
-   * The name of the Pub/Sub topic to publish to.
-   * Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - com.google.protobuf.ByteString - getTopicBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java deleted file mode 100644 index 6065b1264024..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfig.java +++ /dev/null @@ -1,1741 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Output configuration query assets.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig} - */ -public final class QueryAssetsOutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsOutputConfig) - QueryAssetsOutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use QueryAssetsOutputConfig.newBuilder() to construct. - private QueryAssetsOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QueryAssetsOutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryAssetsOutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QueryAssetsOutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder subBuilder = null; - if (bigqueryDestination_ != null) { - subBuilder = bigqueryDestination_.toBuilder(); - } - bigqueryDestination_ = input.readMessage(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bigqueryDestination_); - bigqueryDestination_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder.class); - } - - public interface BigQueryDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Required. The BigQuery dataset where the query results will be saved. It
-     * has the format of "projects/{projectId}/datasets/{datasetId}".
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - java.lang.String getDataset(); - /** - *
-     * Required. The BigQuery dataset where the query results will be saved. It
-     * has the format of "projects/{projectId}/datasets/{datasetId}".
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - com.google.protobuf.ByteString - getDatasetBytes(); - - /** - *
-     * Required. The BigQuery table where the query results will be saved. If
-     * this table does not exist, a new table with the given name will be
-     * created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - java.lang.String getTable(); - /** - *
-     * Required. The BigQuery table where the query results will be saved. If
-     * this table does not exist, a new table with the given name will be
-     * created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - com.google.protobuf.ByteString - getTableBytes(); - - /** - *
-     * Specifies the action that occurs if the destination table or partition
-     * already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * 
- * - * string write_disposition = 3; - * @return The writeDisposition. - */ - java.lang.String getWriteDisposition(); - /** - *
-     * Specifies the action that occurs if the destination table or partition
-     * already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * 
- * - * string write_disposition = 3; - * @return The bytes for writeDisposition. - */ - com.google.protobuf.ByteString - getWriteDispositionBytes(); - } - /** - *
-   * BigQuery destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination} - */ - public static final class BigQueryDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) - BigQueryDestinationOrBuilder { - private static final long serialVersionUID = 0L; - // Use BigQueryDestination.newBuilder() to construct. - private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryDestination() { - dataset_ = ""; - table_ = ""; - writeDisposition_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - table_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - writeDisposition_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder.class); - } - - public static final int DATASET_FIELD_NUMBER = 1; - private volatile java.lang.Object dataset_; - /** - *
-     * Required. The BigQuery dataset where the query results will be saved. It
-     * has the format of "projects/{projectId}/datasets/{datasetId}".
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - @java.lang.Override - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } - } - /** - *
-     * Required. The BigQuery dataset where the query results will be saved. It
-     * has the format of "projects/{projectId}/datasets/{datasetId}".
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_FIELD_NUMBER = 2; - private volatile java.lang.Object table_; - /** - *
-     * Required. The BigQuery table where the query results will be saved. If
-     * this table does not exist, a new table with the given name will be
-     * created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - @java.lang.Override - public java.lang.String getTable() { - java.lang.Object ref = table_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - table_ = s; - return s; - } - } - /** - *
-     * Required. The BigQuery table where the query results will be saved. If
-     * this table does not exist, a new table with the given name will be
-     * created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int WRITE_DISPOSITION_FIELD_NUMBER = 3; - private volatile java.lang.Object writeDisposition_; - /** - *
-     * Specifies the action that occurs if the destination table or partition
-     * already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * 
- * - * string write_disposition = 3; - * @return The writeDisposition. - */ - @java.lang.Override - public java.lang.String getWriteDisposition() { - java.lang.Object ref = writeDisposition_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - writeDisposition_ = s; - return s; - } - } - /** - *
-     * Specifies the action that occurs if the destination table or partition
-     * already exists. The following values are supported:
-     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-     * overwrites the entire table or all the partitions data.
-     * * WRITE_APPEND: If the table or partition already exists, BigQuery
-     * appends the data to the table or the latest partition.
-     * * WRITE_EMPTY: If the table already exists and contains data, an error is
-     * returned.
-     * 
- * - * string write_disposition = 3; - * @return The bytes for writeDisposition. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWriteDispositionBytes() { - java.lang.Object ref = writeDisposition_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - writeDisposition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, writeDisposition_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(writeDisposition_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, writeDisposition_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination other = (com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) obj; - - if (!getDataset() - .equals(other.getDataset())) return false; - if (!getTable() - .equals(other.getTable())) return false; - if (!getWriteDisposition() - .equals(other.getWriteDisposition())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - hash = (37 * hash) + WRITE_DISPOSITION_FIELD_NUMBER; - hash = (53 * hash) + getWriteDisposition().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * BigQuery destination.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - dataset_ = ""; - - table_ = ""; - - writeDisposition_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_BigQueryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination build() { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination buildPartial() { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination result = new com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination(this); - result.dataset_ = dataset_; - result.table_ = table_; - result.writeDisposition_ = writeDisposition_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) { - return mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination other) { - if (other == com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance()) return this; - if (!other.getDataset().isEmpty()) { - dataset_ = other.dataset_; - onChanged(); - } - if (!other.getTable().isEmpty()) { - table_ = other.table_; - onChanged(); - } - if (!other.getWriteDisposition().isEmpty()) { - writeDisposition_ = other.writeDisposition_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object dataset_ = ""; - /** - *
-       * Required. The BigQuery dataset where the query results will be saved. It
-       * has the format of "projects/{projectId}/datasets/{datasetId}".
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The BigQuery dataset where the query results will be saved. It
-       * has the format of "projects/{projectId}/datasets/{datasetId}".
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The BigQuery dataset where the query results will be saved. It
-       * has the format of "projects/{projectId}/datasets/{datasetId}".
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The dataset to set. - * @return This builder for chaining. - */ - public Builder setDataset( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataset_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The BigQuery dataset where the query results will be saved. It
-       * has the format of "projects/{projectId}/datasets/{datasetId}".
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearDataset() { - - dataset_ = getDefaultInstance().getDataset(); - onChanged(); - return this; - } - /** - *
-       * Required. The BigQuery dataset where the query results will be saved. It
-       * has the format of "projects/{projectId}/datasets/{datasetId}".
-       * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for dataset to set. - * @return This builder for chaining. - */ - public Builder setDatasetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataset_ = value; - onChanged(); - return this; - } - - private java.lang.Object table_ = ""; - /** - *
-       * Required. The BigQuery table where the query results will be saved. If
-       * this table does not exist, a new table with the given name will be
-       * created.
-       * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - public java.lang.String getTable() { - java.lang.Object ref = table_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - table_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Required. The BigQuery table where the query results will be saved. If
-       * this table does not exist, a new table with the given name will be
-       * created.
-       * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - public com.google.protobuf.ByteString - getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Required. The BigQuery table where the query results will be saved. If
-       * this table does not exist, a new table with the given name will be
-       * created.
-       * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The table to set. - * @return This builder for chaining. - */ - public Builder setTable( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - table_ = value; - onChanged(); - return this; - } - /** - *
-       * Required. The BigQuery table where the query results will be saved. If
-       * this table does not exist, a new table with the given name will be
-       * created.
-       * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearTable() { - - table_ = getDefaultInstance().getTable(); - onChanged(); - return this; - } - /** - *
-       * Required. The BigQuery table where the query results will be saved. If
-       * this table does not exist, a new table with the given name will be
-       * created.
-       * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for table to set. - * @return This builder for chaining. - */ - public Builder setTableBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - table_ = value; - onChanged(); - return this; - } - - private java.lang.Object writeDisposition_ = ""; - /** - *
-       * Specifies the action that occurs if the destination table or partition
-       * already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * 
- * - * string write_disposition = 3; - * @return The writeDisposition. - */ - public java.lang.String getWriteDisposition() { - java.lang.Object ref = writeDisposition_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - writeDisposition_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Specifies the action that occurs if the destination table or partition
-       * already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * 
- * - * string write_disposition = 3; - * @return The bytes for writeDisposition. - */ - public com.google.protobuf.ByteString - getWriteDispositionBytes() { - java.lang.Object ref = writeDisposition_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - writeDisposition_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Specifies the action that occurs if the destination table or partition
-       * already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * 
- * - * string write_disposition = 3; - * @param value The writeDisposition to set. - * @return This builder for chaining. - */ - public Builder setWriteDisposition( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - writeDisposition_ = value; - onChanged(); - return this; - } - /** - *
-       * Specifies the action that occurs if the destination table or partition
-       * already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * 
- * - * string write_disposition = 3; - * @return This builder for chaining. - */ - public Builder clearWriteDisposition() { - - writeDisposition_ = getDefaultInstance().getWriteDisposition(); - onChanged(); - return this; - } - /** - *
-       * Specifies the action that occurs if the destination table or partition
-       * already exists. The following values are supported:
-       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
-       * overwrites the entire table or all the partitions data.
-       * * WRITE_APPEND: If the table or partition already exists, BigQuery
-       * appends the data to the table or the latest partition.
-       * * WRITE_EMPTY: If the table already exists and contains data, an error is
-       * returned.
-       * 
- * - * string write_disposition = 3; - * @param value The bytes for writeDisposition to set. - * @return This builder for chaining. - */ - public Builder setWriteDispositionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - writeDisposition_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination) - private static final com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination(); - } - - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigqueryDestination_; - /** - *
-   * BigQuery destination where the query results will be saved.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return bigqueryDestination_ != null; - } - /** - *
-   * BigQuery destination where the query results will be saved.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getBigqueryDestination() { - return bigqueryDestination_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance() : bigqueryDestination_; - } - /** - *
-   * BigQuery destination where the query results will be saved.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - return getBigqueryDestination(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (bigqueryDestination_ != null) { - output.writeMessage(1, getBigqueryDestination()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (bigqueryDestination_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getBigqueryDestination()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.QueryAssetsOutputConfig other = (com.google.cloud.asset.v1.QueryAssetsOutputConfig) obj; - - if (hasBigqueryDestination() != other.hasBigqueryDestination()) return false; - if (hasBigqueryDestination()) { - if (!getBigqueryDestination() - .equals(other.getBigqueryDestination())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasBigqueryDestination()) { - hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryDestination().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsOutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output configuration query assets.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsOutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsOutputConfig) - com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.class, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.QueryAssetsOutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (bigqueryDestinationBuilder_ == null) { - bigqueryDestination_ = null; - } else { - bigqueryDestination_ = null; - bigqueryDestinationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsOutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig build() { - com.google.cloud.asset.v1.QueryAssetsOutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig buildPartial() { - com.google.cloud.asset.v1.QueryAssetsOutputConfig result = new com.google.cloud.asset.v1.QueryAssetsOutputConfig(this); - if (bigqueryDestinationBuilder_ == null) { - result.bigqueryDestination_ = bigqueryDestination_; - } else { - result.bigqueryDestination_ = bigqueryDestinationBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.QueryAssetsOutputConfig) { - return mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsOutputConfig other) { - if (other == com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance()) return this; - if (other.hasBigqueryDestination()) { - mergeBigqueryDestination(other.getBigqueryDestination()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsOutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.QueryAssetsOutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigqueryDestination_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return bigqueryDestinationBuilder_ != null || bigqueryDestination_ != null; - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - * @return The bigqueryDestination. - */ - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - return bigqueryDestination_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance() : bigqueryDestination_; - } else { - return bigqueryDestinationBuilder_.getMessage(); - } - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - public Builder setBigqueryDestination(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - bigqueryDestination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - public Builder setBigqueryDestination( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - bigqueryDestination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - public Builder mergeBigqueryDestination(com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (bigqueryDestination_ != null) { - bigqueryDestination_ = - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.newBuilder(bigqueryDestination_).mergeFrom(value).buildPartial(); - } else { - bigqueryDestination_ = value; - } - onChanged(); - } else { - bigqueryDestinationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - bigqueryDestination_ = null; - onChanged(); - } else { - bigqueryDestination_ = null; - bigqueryDestinationBuilder_ = null; - } - - return this; - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder getBigqueryDestinationBuilder() { - - onChanged(); - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - if (bigqueryDestinationBuilder_ != null) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - return bigqueryDestination_ == null ? - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.getDefaultInstance() : bigqueryDestination_; - } - } - /** - *
-     * BigQuery destination where the query results will be saved.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder>( - getBigqueryDestination(), - getParentForChildren(), - isClean()); - bigqueryDestination_ = null; - } - return bigqueryDestinationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsOutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsOutputConfig) - private static final com.google.cloud.asset.v1.QueryAssetsOutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsOutputConfig(); - } - - public static com.google.cloud.asset.v1.QueryAssetsOutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryAssetsOutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryAssetsOutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java deleted file mode 100644 index 55a6b3b6bd65..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsOutputConfigOrBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface QueryAssetsOutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsOutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * BigQuery destination where the query results will be saved.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - *
-   * BigQuery destination where the query results will be saved.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - * @return The bigqueryDestination. - */ - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination getBigqueryDestination(); - /** - *
-   * BigQuery destination where the query results will be saved.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestination bigquery_destination = 1; - */ - com.google.cloud.asset.v1.QueryAssetsOutputConfig.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java deleted file mode 100644 index e46dc420e8e7..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequest.java +++ /dev/null @@ -1,2706 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * QueryAssets request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsRequest} - */ -public final class QueryAssetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsRequest) - QueryAssetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use QueryAssetsRequest.newBuilder() to construct. - private QueryAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QueryAssetsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryAssetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QueryAssetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - queryCase_ = 2; - query_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - queryCase_ = 3; - query_ = s; - break; - } - case 32: { - - pageSize_ = input.readInt32(); - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 50: { - com.google.protobuf.Duration.Builder subBuilder = null; - if (timeout_ != null) { - subBuilder = timeout_.toBuilder(); - } - timeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeout_); - timeout_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; - if (timeCase_ == 7) { - subBuilder = ((com.google.cloud.asset.v1.TimeWindow) time_).toBuilder(); - } - time_ = - input.readMessage(com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.TimeWindow) time_); - time_ = subBuilder.buildPartial(); - } - timeCase_ = 7; - break; - } - case 66: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (timeCase_ == 8) { - subBuilder = ((com.google.protobuf.Timestamp) time_).toBuilder(); - } - time_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) time_); - time_ = subBuilder.buildPartial(); - } - timeCase_ = 8; - break; - } - case 74: { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.asset.v1.QueryAssetsOutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsRequest.class, com.google.cloud.asset.v1.QueryAssetsRequest.Builder.class); - } - - private int queryCase_ = 0; - private java.lang.Object query_; - public enum QueryCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - STATEMENT(2), - JOB_REFERENCE(3), - QUERY_NOT_SET(0); - private final int value; - private QueryCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static QueryCase valueOf(int value) { - return forNumber(value); - } - - public static QueryCase forNumber(int value) { - switch (value) { - case 2: return STATEMENT; - case 3: return JOB_REFERENCE; - case 0: return QUERY_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public QueryCase - getQueryCase() { - return QueryCase.forNumber( - queryCase_); - } - - private int timeCase_ = 0; - private java.lang.Object time_; - public enum TimeCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - READ_TIME_WINDOW(7), - READ_TIME(8), - TIME_NOT_SET(0); - private final int value; - private TimeCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TimeCase valueOf(int value) { - return forNumber(value); - } - - public static TimeCase forNumber(int value) { - switch (value) { - case 7: return READ_TIME_WINDOW; - case 8: return READ_TIME; - case 0: return TIME_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TimeCase - getTimeCase() { - return TimeCase.forNumber( - timeCase_); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * Only assets belonging to the `parent` will be returned.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * Only assets belonging to the `parent` will be returned.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATEMENT_FIELD_NUMBER = 2; - /** - *
-   * Optional. A SQL statement that's compatible with [BigQuery Standard
-   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-   * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the statement field is set. - */ - public boolean hasStatement() { - return queryCase_ == 2; - } - /** - *
-   * Optional. A SQL statement that's compatible with [BigQuery Standard
-   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-   * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The statement. - */ - public java.lang.String getStatement() { - java.lang.Object ref = ""; - if (queryCase_ == 2) { - ref = query_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queryCase_ == 2) { - query_ = s; - } - return s; - } - } - /** - *
-   * Optional. A SQL statement that's compatible with [BigQuery Standard
-   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-   * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for statement. - */ - public com.google.protobuf.ByteString - getStatementBytes() { - java.lang.Object ref = ""; - if (queryCase_ == 2) { - ref = query_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (queryCase_ == 2) { - query_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int JOB_REFERENCE_FIELD_NUMBER = 3; - /** - *
-   * Optional. Reference to the query job, which is from the
-   * `QueryAssetsResponse` of previous `QueryAssets` call.
-   * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the jobReference field is set. - */ - public boolean hasJobReference() { - return queryCase_ == 3; - } - /** - *
-   * Optional. Reference to the query job, which is from the
-   * `QueryAssetsResponse` of previous `QueryAssets` call.
-   * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The jobReference. - */ - public java.lang.String getJobReference() { - java.lang.Object ref = ""; - if (queryCase_ == 3) { - ref = query_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queryCase_ == 3) { - query_ = s; - } - return s; - } - } - /** - *
-   * Optional. Reference to the query job, which is from the
-   * `QueryAssetsResponse` of previous `QueryAssets` call.
-   * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for jobReference. - */ - public com.google.protobuf.ByteString - getJobReferenceBytes() { - java.lang.Object ref = ""; - if (queryCase_ == 3) { - ref = query_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (queryCase_ == 3) { - query_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - *
-   * Optional. The maximum number of rows to return in the results. Responses
-   * are limited to 10 MB and 1000 rows.
-   * By default, the maximum row count is 1000. When the byte or row count limit
-   * is reached, the rest of the query results will be paginated.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 5; - private volatile java.lang.Object pageToken_; - /** - *
-   * Optional. A page token received from previous `QueryAssets`.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Optional. A page token received from previous `QueryAssets`.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TIMEOUT_FIELD_NUMBER = 6; - private com.google.protobuf.Duration timeout_; - /** - *
-   * Optional. Specifies the maximum amount of time that the client is willing
-   * to wait for the query to complete. By default, this limit is 5 min for the
-   * first query, and 1 minute for the following queries. If the query is
-   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-   * false.
-   * Like BigQuery [jobs.query
-   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-   * The call is not guaranteed to wait for the specified timeout; it typically
-   * returns after around 200 seconds (200,000 milliseconds), even if the query
-   * is not complete.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the timeout field is set. - */ - @java.lang.Override - public boolean hasTimeout() { - return timeout_ != null; - } - /** - *
-   * Optional. Specifies the maximum amount of time that the client is willing
-   * to wait for the query to complete. By default, this limit is 5 min for the
-   * first query, and 1 minute for the following queries. If the query is
-   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-   * false.
-   * Like BigQuery [jobs.query
-   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-   * The call is not guaranteed to wait for the specified timeout; it typically
-   * returns after around 200 seconds (200,000 milliseconds), even if the query
-   * is not complete.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The timeout. - */ - @java.lang.Override - public com.google.protobuf.Duration getTimeout() { - return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; - } - /** - *
-   * Optional. Specifies the maximum amount of time that the client is willing
-   * to wait for the query to complete. By default, this limit is 5 min for the
-   * first query, and 1 minute for the following queries. If the query is
-   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-   * false.
-   * Like BigQuery [jobs.query
-   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-   * The call is not guaranteed to wait for the specified timeout; it typically
-   * returns after around 200 seconds (200,000 milliseconds), even if the query
-   * is not complete.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { - return getTimeout(); - } - - public static final int READ_TIME_WINDOW_FIELD_NUMBER = 7; - /** - *
-   * Optional. [start_time] is required. [start_time] must be less than
-   * [end_time] Defaults [end_time] to now if [start_time] is set and
-   * [end_time] isn't. Maximum permitted time range is 7 days.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTimeWindow field is set. - */ - @java.lang.Override - public boolean hasReadTimeWindow() { - return timeCase_ == 7; - } - /** - *
-   * Optional. [start_time] is required. [start_time] must be less than
-   * [end_time] Defaults [end_time] to now if [start_time] is set and
-   * [end_time] isn't. Maximum permitted time range is 7 days.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTimeWindow. - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { - if (timeCase_ == 7) { - return (com.google.cloud.asset.v1.TimeWindow) time_; - } - return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); - } - /** - *
-   * Optional. [start_time] is required. [start_time] must be less than
-   * [end_time] Defaults [end_time] to now if [start_time] is set and
-   * [end_time] isn't. Maximum permitted time range is 7 days.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { - if (timeCase_ == 7) { - return (com.google.cloud.asset.v1.TimeWindow) time_; - } - return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); - } - - public static final int READ_TIME_FIELD_NUMBER = 8; - /** - *
-   * Optional. Queries cloud assets as they appeared at the specified point in
-   * time.
-   * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return timeCase_ == 8; - } - /** - *
-   * Optional. Queries cloud assets as they appeared at the specified point in
-   * time.
-   * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - if (timeCase_ == 8) { - return (com.google.protobuf.Timestamp) time_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - /** - *
-   * Optional. Queries cloud assets as they appeared at the specified point in
-   * time.
-   * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (timeCase_ == 8) { - return (com.google.protobuf.Timestamp) time_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 9; - private com.google.cloud.asset.v1.QueryAssetsOutputConfig outputConfig_; - /** - *
-   * Optional. Destination where the query results will be saved.
-   * When this field is specified, the query results won't be saved in the
-   * [QueryAssetsResponse.query_result]. Instead
-   * [QueryAssetsResponse.output_config] will be set.
-   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-   * to check the status of the query job when passed to a following
-   * [QueryAssets] API call.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Optional. Destination where the query results will be saved.
-   * When this field is specified, the query results won't be saved in the
-   * [QueryAssetsResponse.query_result]. Instead
-   * [QueryAssetsResponse.output_config] will be set.
-   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-   * to check the status of the query job when passed to a following
-   * [QueryAssets] API call.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Optional. Destination where the query results will be saved.
-   * When this field is specified, the query results won't be saved in the
-   * [QueryAssetsResponse.query_result]. Instead
-   * [QueryAssetsResponse.output_config] will be set.
-   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-   * to check the status of the query job when passed to a following
-   * [QueryAssets] API call.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (queryCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); - } - if (queryCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, query_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); - } - if (timeout_ != null) { - output.writeMessage(6, getTimeout()); - } - if (timeCase_ == 7) { - output.writeMessage(7, (com.google.cloud.asset.v1.TimeWindow) time_); - } - if (timeCase_ == 8) { - output.writeMessage(8, (com.google.protobuf.Timestamp) time_); - } - if (outputConfig_ != null) { - output.writeMessage(9, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (queryCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); - } - if (queryCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, query_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); - } - if (timeout_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getTimeout()); - } - if (timeCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.cloud.asset.v1.TimeWindow) time_); - } - if (timeCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.protobuf.Timestamp) time_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.QueryAssetsRequest other = (com.google.cloud.asset.v1.QueryAssetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (hasTimeout() != other.hasTimeout()) return false; - if (hasTimeout()) { - if (!getTimeout() - .equals(other.getTimeout())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!getQueryCase().equals(other.getQueryCase())) return false; - switch (queryCase_) { - case 2: - if (!getStatement() - .equals(other.getStatement())) return false; - break; - case 3: - if (!getJobReference() - .equals(other.getJobReference())) return false; - break; - case 0: - default: - } - if (!getTimeCase().equals(other.getTimeCase())) return false; - switch (timeCase_) { - case 7: - if (!getReadTimeWindow() - .equals(other.getReadTimeWindow())) return false; - break; - case 8: - if (!getReadTime() - .equals(other.getReadTime())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - if (hasTimeout()) { - hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; - hash = (53 * hash) + getTimeout().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - switch (queryCase_) { - case 2: - hash = (37 * hash) + STATEMENT_FIELD_NUMBER; - hash = (53 * hash) + getStatement().hashCode(); - break; - case 3: - hash = (37 * hash) + JOB_REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getJobReference().hashCode(); - break; - case 0: - default: - } - switch (timeCase_) { - case 7: - hash = (37 * hash) + READ_TIME_WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getReadTimeWindow().hashCode(); - break; - case 8: - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * QueryAssets request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsRequest) - com.google.cloud.asset.v1.QueryAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsRequest.class, com.google.cloud.asset.v1.QueryAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.QueryAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - if (timeoutBuilder_ == null) { - timeout_ = null; - } else { - timeout_ = null; - timeoutBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - queryCase_ = 0; - query_ = null; - timeCase_ = 0; - time_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.QueryAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsRequest build() { - com.google.cloud.asset.v1.QueryAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsRequest buildPartial() { - com.google.cloud.asset.v1.QueryAssetsRequest result = new com.google.cloud.asset.v1.QueryAssetsRequest(this); - result.parent_ = parent_; - if (queryCase_ == 2) { - result.query_ = query_; - } - if (queryCase_ == 3) { - result.query_ = query_; - } - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - if (timeoutBuilder_ == null) { - result.timeout_ = timeout_; - } else { - result.timeout_ = timeoutBuilder_.build(); - } - if (timeCase_ == 7) { - if (readTimeWindowBuilder_ == null) { - result.time_ = time_; - } else { - result.time_ = readTimeWindowBuilder_.build(); - } - } - if (timeCase_ == 8) { - if (readTimeBuilder_ == null) { - result.time_ = time_; - } else { - result.time_ = readTimeBuilder_.build(); - } - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - result.queryCase_ = queryCase_; - result.timeCase_ = timeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.QueryAssetsRequest) { - return mergeFrom((com.google.cloud.asset.v1.QueryAssetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsRequest other) { - if (other == com.google.cloud.asset.v1.QueryAssetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.hasTimeout()) { - mergeTimeout(other.getTimeout()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - switch (other.getQueryCase()) { - case STATEMENT: { - queryCase_ = 2; - query_ = other.query_; - onChanged(); - break; - } - case JOB_REFERENCE: { - queryCase_ = 3; - query_ = other.query_; - onChanged(); - break; - } - case QUERY_NOT_SET: { - break; - } - } - switch (other.getTimeCase()) { - case READ_TIME_WINDOW: { - mergeReadTimeWindow(other.getReadTimeWindow()); - break; - } - case READ_TIME: { - mergeReadTime(other.getReadTime()); - break; - } - case TIME_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.QueryAssetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int queryCase_ = 0; - private java.lang.Object query_; - public QueryCase - getQueryCase() { - return QueryCase.forNumber( - queryCase_); - } - - public Builder clearQuery() { - queryCase_ = 0; - query_ = null; - onChanged(); - return this; - } - - private int timeCase_ = 0; - private java.lang.Object time_; - public TimeCase - getTimeCase() { - return TimeCase.forNumber( - timeCase_); - } - - public Builder clearTime() { - timeCase_ = 0; - time_ = null; - onChanged(); - return this; - } - - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * Only assets belonging to the `parent` will be returned.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * Only assets belonging to the `parent` will be returned.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * Only assets belonging to the `parent` will be returned.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * Only assets belonging to the `parent` will be returned.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * Only assets belonging to the `parent` will be returned.
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - /** - *
-     * Optional. A SQL statement that's compatible with [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-     * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the statement field is set. - */ - @java.lang.Override - public boolean hasStatement() { - return queryCase_ == 2; - } - /** - *
-     * Optional. A SQL statement that's compatible with [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-     * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The statement. - */ - @java.lang.Override - public java.lang.String getStatement() { - java.lang.Object ref = ""; - if (queryCase_ == 2) { - ref = query_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queryCase_ == 2) { - query_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. A SQL statement that's compatible with [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-     * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for statement. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStatementBytes() { - java.lang.Object ref = ""; - if (queryCase_ == 2) { - ref = query_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (queryCase_ == 2) { - query_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. A SQL statement that's compatible with [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-     * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The statement to set. - * @return This builder for chaining. - */ - public Builder setStatement( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - queryCase_ = 2; - query_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. A SQL statement that's compatible with [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-     * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearStatement() { - if (queryCase_ == 2) { - queryCase_ = 0; - query_ = null; - onChanged(); - } - return this; - } - /** - *
-     * Optional. A SQL statement that's compatible with [BigQuery Standard
-     * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-     * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for statement to set. - * @return This builder for chaining. - */ - public Builder setStatementBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - queryCase_ = 2; - query_ = value; - onChanged(); - return this; - } - - /** - *
-     * Optional. Reference to the query job, which is from the
-     * `QueryAssetsResponse` of previous `QueryAssets` call.
-     * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the jobReference field is set. - */ - @java.lang.Override - public boolean hasJobReference() { - return queryCase_ == 3; - } - /** - *
-     * Optional. Reference to the query job, which is from the
-     * `QueryAssetsResponse` of previous `QueryAssets` call.
-     * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The jobReference. - */ - @java.lang.Override - public java.lang.String getJobReference() { - java.lang.Object ref = ""; - if (queryCase_ == 3) { - ref = query_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (queryCase_ == 3) { - query_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. Reference to the query job, which is from the
-     * `QueryAssetsResponse` of previous `QueryAssets` call.
-     * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for jobReference. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJobReferenceBytes() { - java.lang.Object ref = ""; - if (queryCase_ == 3) { - ref = query_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (queryCase_ == 3) { - query_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. Reference to the query job, which is from the
-     * `QueryAssetsResponse` of previous `QueryAssets` call.
-     * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The jobReference to set. - * @return This builder for chaining. - */ - public Builder setJobReference( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - queryCase_ = 3; - query_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. Reference to the query job, which is from the
-     * `QueryAssetsResponse` of previous `QueryAssets` call.
-     * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearJobReference() { - if (queryCase_ == 3) { - queryCase_ = 0; - query_ = null; - onChanged(); - } - return this; - } - /** - *
-     * Optional. Reference to the query job, which is from the
-     * `QueryAssetsResponse` of previous `QueryAssets` call.
-     * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for jobReference to set. - * @return This builder for chaining. - */ - public Builder setJobReferenceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - queryCase_ = 3; - query_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Optional. The maximum number of rows to return in the results. Responses
-     * are limited to 10 MB and 1000 rows.
-     * By default, the maximum row count is 1000. When the byte or row count limit
-     * is reached, the rest of the query results will be paginated.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Optional. The maximum number of rows to return in the results. Responses
-     * are limited to 10 MB and 1000 rows.
-     * By default, the maximum row count is 1000. When the byte or row count limit
-     * is reached, the rest of the query results will be paginated.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The maximum number of rows to return in the results. Responses
-     * are limited to 10 MB and 1000 rows.
-     * By default, the maximum row count is 1000. When the byte or row count limit
-     * is reached, the rest of the query results will be paginated.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Optional. A page token received from previous `QueryAssets`.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. A page token received from previous `QueryAssets`.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. A page token received from previous `QueryAssets`.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. A page token received from previous `QueryAssets`.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Optional. A page token received from previous `QueryAssets`.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Duration timeout_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timeoutBuilder_; - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the timeout field is set. - */ - public boolean hasTimeout() { - return timeoutBuilder_ != null || timeout_ != null; - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The timeout. - */ - public com.google.protobuf.Duration getTimeout() { - if (timeoutBuilder_ == null) { - return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; - } else { - return timeoutBuilder_.getMessage(); - } - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setTimeout(com.google.protobuf.Duration value) { - if (timeoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timeout_ = value; - onChanged(); - } else { - timeoutBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setTimeout( - com.google.protobuf.Duration.Builder builderForValue) { - if (timeoutBuilder_ == null) { - timeout_ = builderForValue.build(); - onChanged(); - } else { - timeoutBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeTimeout(com.google.protobuf.Duration value) { - if (timeoutBuilder_ == null) { - if (timeout_ != null) { - timeout_ = - com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial(); - } else { - timeout_ = value; - } - onChanged(); - } else { - timeoutBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearTimeout() { - if (timeoutBuilder_ == null) { - timeout_ = null; - onChanged(); - } else { - timeout_ = null; - timeoutBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.Duration.Builder getTimeoutBuilder() { - - onChanged(); - return getTimeoutFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { - if (timeoutBuilder_ != null) { - return timeoutBuilder_.getMessageOrBuilder(); - } else { - return timeout_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : timeout_; - } - } - /** - *
-     * Optional. Specifies the maximum amount of time that the client is willing
-     * to wait for the query to complete. By default, this limit is 5 min for the
-     * first query, and 1 minute for the following queries. If the query is
-     * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-     * false.
-     * Like BigQuery [jobs.query
-     * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-     * The call is not guaranteed to wait for the specified timeout; it typically
-     * returns after around 200 seconds (200,000 milliseconds), even if the query
-     * is not complete.
-     * The field will be ignored when [output_config] is specified.
-     * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getTimeoutFieldBuilder() { - if (timeoutBuilder_ == null) { - timeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getTimeout(), - getParentForChildren(), - isClean()); - timeout_ = null; - } - return timeoutBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> readTimeWindowBuilder_; - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTimeWindow field is set. - */ - @java.lang.Override - public boolean hasReadTimeWindow() { - return timeCase_ == 7; - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTimeWindow. - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow getReadTimeWindow() { - if (readTimeWindowBuilder_ == null) { - if (timeCase_ == 7) { - return (com.google.cloud.asset.v1.TimeWindow) time_; - } - return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); - } else { - if (timeCase_ == 7) { - return readTimeWindowBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); - } - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { - if (readTimeWindowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - time_ = value; - onChanged(); - } else { - readTimeWindowBuilder_.setMessage(value); - } - timeCase_ = 7; - return this; - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadTimeWindow( - com.google.cloud.asset.v1.TimeWindow.Builder builderForValue) { - if (readTimeWindowBuilder_ == null) { - time_ = builderForValue.build(); - onChanged(); - } else { - readTimeWindowBuilder_.setMessage(builderForValue.build()); - } - timeCase_ = 7; - return this; - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeReadTimeWindow(com.google.cloud.asset.v1.TimeWindow value) { - if (readTimeWindowBuilder_ == null) { - if (timeCase_ == 7 && - time_ != com.google.cloud.asset.v1.TimeWindow.getDefaultInstance()) { - time_ = com.google.cloud.asset.v1.TimeWindow.newBuilder((com.google.cloud.asset.v1.TimeWindow) time_) - .mergeFrom(value).buildPartial(); - } else { - time_ = value; - } - onChanged(); - } else { - if (timeCase_ == 7) { - readTimeWindowBuilder_.mergeFrom(value); - } else { - readTimeWindowBuilder_.setMessage(value); - } - } - timeCase_ = 7; - return this; - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearReadTimeWindow() { - if (readTimeWindowBuilder_ == null) { - if (timeCase_ == 7) { - timeCase_ = 0; - time_ = null; - onChanged(); - } - } else { - if (timeCase_ == 7) { - timeCase_ = 0; - time_ = null; - } - readTimeWindowBuilder_.clear(); - } - return this; - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.TimeWindow.Builder getReadTimeWindowBuilder() { - return getReadTimeWindowFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder() { - if ((timeCase_ == 7) && (readTimeWindowBuilder_ != null)) { - return readTimeWindowBuilder_.getMessageOrBuilder(); - } else { - if (timeCase_ == 7) { - return (com.google.cloud.asset.v1.TimeWindow) time_; - } - return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); - } - } - /** - *
-     * Optional. [start_time] is required. [start_time] must be less than
-     * [end_time] Defaults [end_time] to now if [start_time] is set and
-     * [end_time] isn't. Maximum permitted time range is 7 days.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> - getReadTimeWindowFieldBuilder() { - if (readTimeWindowBuilder_ == null) { - if (!(timeCase_ == 7)) { - time_ = com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); - } - readTimeWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder>( - (com.google.cloud.asset.v1.TimeWindow) time_, - getParentForChildren(), - isClean()); - time_ = null; - } - timeCase_ = 7; - onChanged();; - return readTimeWindowBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return timeCase_ == 8; - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - if (timeCase_ == 8) { - return (com.google.protobuf.Timestamp) time_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } else { - if (timeCase_ == 8) { - return readTimeBuilder_.getMessage(); - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - time_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - timeCase_ = 8; - return this; - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - time_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - timeCase_ = 8; - return this; - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (timeCase_ == 8 && - time_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - time_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) time_) - .mergeFrom(value).buildPartial(); - } else { - time_ = value; - } - onChanged(); - } else { - if (timeCase_ == 8) { - readTimeBuilder_.mergeFrom(value); - } else { - readTimeBuilder_.setMessage(value); - } - } - timeCase_ = 8; - return this; - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - if (timeCase_ == 8) { - timeCase_ = 0; - time_ = null; - onChanged(); - } - } else { - if (timeCase_ == 8) { - timeCase_ = 0; - time_ = null; - } - readTimeBuilder_.clear(); - } - return this; - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if ((timeCase_ == 8) && (readTimeBuilder_ != null)) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - if (timeCase_ == 8) { - return (com.google.protobuf.Timestamp) time_; - } - return com.google.protobuf.Timestamp.getDefaultInstance(); - } - } - /** - *
-     * Optional. Queries cloud assets as they appeared at the specified point in
-     * time.
-     * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - if (!(timeCase_ == 8)) { - time_ = com.google.protobuf.Timestamp.getDefaultInstance(); - } - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - (com.google.protobuf.Timestamp) time_, - getParentForChildren(), - isClean()); - time_ = null; - } - timeCase_ = 8; - onChanged();; - return readTimeBuilder_; - } - - private com.google.cloud.asset.v1.QueryAssetsOutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputConfig. - */ - public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1.QueryAssetsOutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Optional. Destination where the query results will be saved.
-     * When this field is specified, the query results won't be saved in the
-     * [QueryAssetsResponse.query_result]. Instead
-     * [QueryAssetsResponse.output_config] will be set.
-     * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-     * to check the status of the query job when passed to a following
-     * [QueryAssets] API call.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsRequest) - private static final com.google.cloud.asset.v1.QueryAssetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsRequest(); - } - - public static com.google.cloud.asset.v1.QueryAssetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryAssetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryAssetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java deleted file mode 100644 index a60e2dde9c84..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsRequestOrBuilder.java +++ /dev/null @@ -1,306 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface QueryAssetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * Only assets belonging to the `parent` will be returned.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * Only assets belonging to the `parent` will be returned.
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Optional. A SQL statement that's compatible with [BigQuery Standard
-   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-   * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the statement field is set. - */ - boolean hasStatement(); - /** - *
-   * Optional. A SQL statement that's compatible with [BigQuery Standard
-   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-   * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The statement. - */ - java.lang.String getStatement(); - /** - *
-   * Optional. A SQL statement that's compatible with [BigQuery Standard
-   * SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql).
-   * 
- * - * string statement = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for statement. - */ - com.google.protobuf.ByteString - getStatementBytes(); - - /** - *
-   * Optional. Reference to the query job, which is from the
-   * `QueryAssetsResponse` of previous `QueryAssets` call.
-   * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the jobReference field is set. - */ - boolean hasJobReference(); - /** - *
-   * Optional. Reference to the query job, which is from the
-   * `QueryAssetsResponse` of previous `QueryAssets` call.
-   * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The jobReference. - */ - java.lang.String getJobReference(); - /** - *
-   * Optional. Reference to the query job, which is from the
-   * `QueryAssetsResponse` of previous `QueryAssets` call.
-   * 
- * - * string job_reference = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for jobReference. - */ - com.google.protobuf.ByteString - getJobReferenceBytes(); - - /** - *
-   * Optional. The maximum number of rows to return in the results. Responses
-   * are limited to 10 MB and 1000 rows.
-   * By default, the maximum row count is 1000. When the byte or row count limit
-   * is reached, the rest of the query results will be paginated.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Optional. A page token received from previous `QueryAssets`.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Optional. A page token received from previous `QueryAssets`.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Optional. Specifies the maximum amount of time that the client is willing
-   * to wait for the query to complete. By default, this limit is 5 min for the
-   * first query, and 1 minute for the following queries. If the query is
-   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-   * false.
-   * Like BigQuery [jobs.query
-   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-   * The call is not guaranteed to wait for the specified timeout; it typically
-   * returns after around 200 seconds (200,000 milliseconds), even if the query
-   * is not complete.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the timeout field is set. - */ - boolean hasTimeout(); - /** - *
-   * Optional. Specifies the maximum amount of time that the client is willing
-   * to wait for the query to complete. By default, this limit is 5 min for the
-   * first query, and 1 minute for the following queries. If the query is
-   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-   * false.
-   * Like BigQuery [jobs.query
-   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-   * The call is not guaranteed to wait for the specified timeout; it typically
-   * returns after around 200 seconds (200,000 milliseconds), even if the query
-   * is not complete.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The timeout. - */ - com.google.protobuf.Duration getTimeout(); - /** - *
-   * Optional. Specifies the maximum amount of time that the client is willing
-   * to wait for the query to complete. By default, this limit is 5 min for the
-   * first query, and 1 minute for the following queries. If the query is
-   * complete, the `done` field in the `QueryAssetsResponse` is true, otherwise
-   * false.
-   * Like BigQuery [jobs.query
-   * API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)
-   * The call is not guaranteed to wait for the specified timeout; it typically
-   * returns after around 200 seconds (200,000 milliseconds), even if the query
-   * is not complete.
-   * The field will be ignored when [output_config] is specified.
-   * 
- * - * .google.protobuf.Duration timeout = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); - - /** - *
-   * Optional. [start_time] is required. [start_time] must be less than
-   * [end_time] Defaults [end_time] to now if [start_time] is set and
-   * [end_time] isn't. Maximum permitted time range is 7 days.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTimeWindow field is set. - */ - boolean hasReadTimeWindow(); - /** - *
-   * Optional. [start_time] is required. [start_time] must be less than
-   * [end_time] Defaults [end_time] to now if [start_time] is set and
-   * [end_time] isn't. Maximum permitted time range is 7 days.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTimeWindow. - */ - com.google.cloud.asset.v1.TimeWindow getReadTimeWindow(); - /** - *
-   * Optional. [start_time] is required. [start_time] must be less than
-   * [end_time] Defaults [end_time] to now if [start_time] is set and
-   * [end_time] isn't. Maximum permitted time range is 7 days.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow read_time_window = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); - - /** - *
-   * Optional. Queries cloud assets as they appeared at the specified point in
-   * time.
-   * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Optional. Queries cloud assets as they appeared at the specified point in
-   * time.
-   * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Optional. Queries cloud assets as they appeared at the specified point in
-   * time.
-   * 
- * - * .google.protobuf.Timestamp read_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * Optional. Destination where the query results will be saved.
-   * When this field is specified, the query results won't be saved in the
-   * [QueryAssetsResponse.query_result]. Instead
-   * [QueryAssetsResponse.output_config] will be set.
-   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-   * to check the status of the query job when passed to a following
-   * [QueryAssets] API call.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Optional. Destination where the query results will be saved.
-   * When this field is specified, the query results won't be saved in the
-   * [QueryAssetsResponse.query_result]. Instead
-   * [QueryAssetsResponse.output_config] will be set.
-   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-   * to check the status of the query job when passed to a following
-   * [QueryAssets] API call.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return The outputConfig. - */ - com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig(); - /** - *
-   * Optional. Destination where the query results will be saved.
-   * When this field is specified, the query results won't be saved in the
-   * [QueryAssetsResponse.query_result]. Instead
-   * [QueryAssetsResponse.output_config] will be set.
-   * Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used
-   * to check the status of the query job when passed to a following
-   * [QueryAssets] API call.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder(); - - public com.google.cloud.asset.v1.QueryAssetsRequest.QueryCase getQueryCase(); - - public com.google.cloud.asset.v1.QueryAssetsRequest.TimeCase getTimeCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java deleted file mode 100644 index c43ed18d2494..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponse.java +++ /dev/null @@ -1,1562 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * QueryAssets response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsResponse} - */ -public final class QueryAssetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryAssetsResponse) - QueryAssetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use QueryAssetsResponse.newBuilder() to construct. - private QueryAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QueryAssetsResponse() { - jobReference_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryAssetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QueryAssetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - jobReference_ = s; - break; - } - case 16: { - - done_ = input.readBool(); - break; - } - case 26: { - com.google.rpc.Status.Builder subBuilder = null; - if (responseCase_ == 3) { - subBuilder = ((com.google.rpc.Status) response_).toBuilder(); - } - response_ = - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.rpc.Status) response_); - response_ = subBuilder.buildPartial(); - } - responseCase_ = 3; - break; - } - case 34: { - com.google.cloud.asset.v1.QueryResult.Builder subBuilder = null; - if (responseCase_ == 4) { - subBuilder = ((com.google.cloud.asset.v1.QueryResult) response_).toBuilder(); - } - response_ = - input.readMessage(com.google.cloud.asset.v1.QueryResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.QueryResult) response_); - response_ = subBuilder.buildPartial(); - } - responseCase_ = 4; - break; - } - case 42: { - com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder subBuilder = null; - if (responseCase_ == 5) { - subBuilder = ((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_).toBuilder(); - } - response_ = - input.readMessage(com.google.cloud.asset.v1.QueryAssetsOutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); - response_ = subBuilder.buildPartial(); - } - responseCase_ = 5; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsResponse.class, com.google.cloud.asset.v1.QueryAssetsResponse.Builder.class); - } - - private int responseCase_ = 0; - private java.lang.Object response_; - public enum ResponseCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ERROR(3), - QUERY_RESULT(4), - OUTPUT_CONFIG(5), - RESPONSE_NOT_SET(0); - private final int value; - private ResponseCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResponseCase valueOf(int value) { - return forNumber(value); - } - - public static ResponseCase forNumber(int value) { - switch (value) { - case 3: return ERROR; - case 4: return QUERY_RESULT; - case 5: return OUTPUT_CONFIG; - case 0: return RESPONSE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ResponseCase - getResponseCase() { - return ResponseCase.forNumber( - responseCase_); - } - - public static final int JOB_REFERENCE_FIELD_NUMBER = 1; - private volatile java.lang.Object jobReference_; - /** - *
-   * Reference to a query job.
-   * 
- * - * string job_reference = 1; - * @return The jobReference. - */ - @java.lang.Override - public java.lang.String getJobReference() { - java.lang.Object ref = jobReference_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobReference_ = s; - return s; - } - } - /** - *
-   * Reference to a query job.
-   * 
- * - * string job_reference = 1; - * @return The bytes for jobReference. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getJobReferenceBytes() { - java.lang.Object ref = jobReference_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobReference_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DONE_FIELD_NUMBER = 2; - private boolean done_; - /** - *
-   * The query response, which can be either an `error` or a valid `response`.
-   * If `done` == `false` and the query result is being saved in a output, the
-   * output_config field will be set.
-   * If `done` == `true`, exactly one of
-   * `error`, `query_result` or `output_config` will be set.
-   * 
- * - * bool done = 2; - * @return The done. - */ - @java.lang.Override - public boolean getDone() { - return done_; - } - - public static final int ERROR_FIELD_NUMBER = 3; - /** - *
-   * Error status.
-   * 
- * - * .google.rpc.Status error = 3; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return responseCase_ == 3; - } - /** - *
-   * Error status.
-   * 
- * - * .google.rpc.Status error = 3; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - if (responseCase_ == 3) { - return (com.google.rpc.Status) response_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - /** - *
-   * Error status.
-   * 
- * - * .google.rpc.Status error = 3; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (responseCase_ == 3) { - return (com.google.rpc.Status) response_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - - public static final int QUERY_RESULT_FIELD_NUMBER = 4; - /** - *
-   * Result of the query.
-   * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - * @return Whether the queryResult field is set. - */ - @java.lang.Override - public boolean hasQueryResult() { - return responseCase_ == 4; - } - /** - *
-   * Result of the query.
-   * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - * @return The queryResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryResult getQueryResult() { - if (responseCase_ == 4) { - return (com.google.cloud.asset.v1.QueryResult) response_; - } - return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); - } - /** - *
-   * Result of the query.
-   * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryResultOrBuilder getQueryResultOrBuilder() { - if (responseCase_ == 4) { - return (com.google.cloud.asset.v1.QueryResult) response_; - } - return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; - /** - *
-   * Output configuration which indicates instead of being returned in API
-   * response on the fly, the query result will be saved in a specific output.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return responseCase_ == 5; - } - /** - *
-   * Output configuration which indicates instead of being returned in API
-   * response on the fly, the query result will be saved in a specific output.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { - if (responseCase_ == 5) { - return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; - } - return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); - } - /** - *
-   * Output configuration which indicates instead of being returned in API
-   * response on the fly, the query result will be saved in a specific output.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { - if (responseCase_ == 5) { - return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; - } - return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobReference_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobReference_); - } - if (done_ != false) { - output.writeBool(2, done_); - } - if (responseCase_ == 3) { - output.writeMessage(3, (com.google.rpc.Status) response_); - } - if (responseCase_ == 4) { - output.writeMessage(4, (com.google.cloud.asset.v1.QueryResult) response_); - } - if (responseCase_ == 5) { - output.writeMessage(5, (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobReference_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobReference_); - } - if (done_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, done_); - } - if (responseCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.rpc.Status) response_); - } - if (responseCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.cloud.asset.v1.QueryResult) response_); - } - if (responseCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.QueryAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.QueryAssetsResponse other = (com.google.cloud.asset.v1.QueryAssetsResponse) obj; - - if (!getJobReference() - .equals(other.getJobReference())) return false; - if (getDone() - != other.getDone()) return false; - if (!getResponseCase().equals(other.getResponseCase())) return false; - switch (responseCase_) { - case 3: - if (!getError() - .equals(other.getError())) return false; - break; - case 4: - if (!getQueryResult() - .equals(other.getQueryResult())) return false; - break; - case 5: - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + JOB_REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getJobReference().hashCode(); - hash = (37 * hash) + DONE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDone()); - switch (responseCase_) { - case 3: - hash = (37 * hash) + ERROR_FIELD_NUMBER; - hash = (53 * hash) + getError().hashCode(); - break; - case 4: - hash = (37 * hash) + QUERY_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getQueryResult().hashCode(); - break; - case 5: - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.QueryAssetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * QueryAssets response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryAssetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryAssetsResponse) - com.google.cloud.asset.v1.QueryAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryAssetsResponse.class, com.google.cloud.asset.v1.QueryAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.QueryAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - jobReference_ = ""; - - done_ = false; - - responseCase_ = 0; - response_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.QueryAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsResponse build() { - com.google.cloud.asset.v1.QueryAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsResponse buildPartial() { - com.google.cloud.asset.v1.QueryAssetsResponse result = new com.google.cloud.asset.v1.QueryAssetsResponse(this); - result.jobReference_ = jobReference_; - result.done_ = done_; - if (responseCase_ == 3) { - if (errorBuilder_ == null) { - result.response_ = response_; - } else { - result.response_ = errorBuilder_.build(); - } - } - if (responseCase_ == 4) { - if (queryResultBuilder_ == null) { - result.response_ = response_; - } else { - result.response_ = queryResultBuilder_.build(); - } - } - if (responseCase_ == 5) { - if (outputConfigBuilder_ == null) { - result.response_ = response_; - } else { - result.response_ = outputConfigBuilder_.build(); - } - } - result.responseCase_ = responseCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.QueryAssetsResponse) { - return mergeFrom((com.google.cloud.asset.v1.QueryAssetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.QueryAssetsResponse other) { - if (other == com.google.cloud.asset.v1.QueryAssetsResponse.getDefaultInstance()) return this; - if (!other.getJobReference().isEmpty()) { - jobReference_ = other.jobReference_; - onChanged(); - } - if (other.getDone() != false) { - setDone(other.getDone()); - } - switch (other.getResponseCase()) { - case ERROR: { - mergeError(other.getError()); - break; - } - case QUERY_RESULT: { - mergeQueryResult(other.getQueryResult()); - break; - } - case OUTPUT_CONFIG: { - mergeOutputConfig(other.getOutputConfig()); - break; - } - case RESPONSE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.QueryAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.QueryAssetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int responseCase_ = 0; - private java.lang.Object response_; - public ResponseCase - getResponseCase() { - return ResponseCase.forNumber( - responseCase_); - } - - public Builder clearResponse() { - responseCase_ = 0; - response_ = null; - onChanged(); - return this; - } - - - private java.lang.Object jobReference_ = ""; - /** - *
-     * Reference to a query job.
-     * 
- * - * string job_reference = 1; - * @return The jobReference. - */ - public java.lang.String getJobReference() { - java.lang.Object ref = jobReference_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobReference_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Reference to a query job.
-     * 
- * - * string job_reference = 1; - * @return The bytes for jobReference. - */ - public com.google.protobuf.ByteString - getJobReferenceBytes() { - java.lang.Object ref = jobReference_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - jobReference_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Reference to a query job.
-     * 
- * - * string job_reference = 1; - * @param value The jobReference to set. - * @return This builder for chaining. - */ - public Builder setJobReference( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - jobReference_ = value; - onChanged(); - return this; - } - /** - *
-     * Reference to a query job.
-     * 
- * - * string job_reference = 1; - * @return This builder for chaining. - */ - public Builder clearJobReference() { - - jobReference_ = getDefaultInstance().getJobReference(); - onChanged(); - return this; - } - /** - *
-     * Reference to a query job.
-     * 
- * - * string job_reference = 1; - * @param value The bytes for jobReference to set. - * @return This builder for chaining. - */ - public Builder setJobReferenceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - jobReference_ = value; - onChanged(); - return this; - } - - private boolean done_ ; - /** - *
-     * The query response, which can be either an `error` or a valid `response`.
-     * If `done` == `false` and the query result is being saved in a output, the
-     * output_config field will be set.
-     * If `done` == `true`, exactly one of
-     * `error`, `query_result` or `output_config` will be set.
-     * 
- * - * bool done = 2; - * @return The done. - */ - @java.lang.Override - public boolean getDone() { - return done_; - } - /** - *
-     * The query response, which can be either an `error` or a valid `response`.
-     * If `done` == `false` and the query result is being saved in a output, the
-     * output_config field will be set.
-     * If `done` == `true`, exactly one of
-     * `error`, `query_result` or `output_config` will be set.
-     * 
- * - * bool done = 2; - * @param value The done to set. - * @return This builder for chaining. - */ - public Builder setDone(boolean value) { - - done_ = value; - onChanged(); - return this; - } - /** - *
-     * The query response, which can be either an `error` or a valid `response`.
-     * If `done` == `false` and the query result is being saved in a output, the
-     * output_config field will be set.
-     * If `done` == `true`, exactly one of
-     * `error`, `query_result` or `output_config` will be set.
-     * 
- * - * bool done = 2; - * @return This builder for chaining. - */ - public Builder clearDone() { - - done_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - * @return Whether the error field is set. - */ - @java.lang.Override - public boolean hasError() { - return responseCase_ == 3; - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - * @return The error. - */ - @java.lang.Override - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - if (responseCase_ == 3) { - return (com.google.rpc.Status) response_; - } - return com.google.rpc.Status.getDefaultInstance(); - } else { - if (responseCase_ == 3) { - return errorBuilder_.getMessage(); - } - return com.google.rpc.Status.getDefaultInstance(); - } - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - response_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - responseCase_ = 3; - return this; - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - response_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - responseCase_ = 3; - return this; - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (responseCase_ == 3 && - response_ != com.google.rpc.Status.getDefaultInstance()) { - response_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) response_) - .mergeFrom(value).buildPartial(); - } else { - response_ = value; - } - onChanged(); - } else { - if (responseCase_ == 3) { - errorBuilder_.mergeFrom(value); - } else { - errorBuilder_.setMessage(value); - } - } - responseCase_ = 3; - return this; - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public Builder clearError() { - if (errorBuilder_ == null) { - if (responseCase_ == 3) { - responseCase_ = 0; - response_ = null; - onChanged(); - } - } else { - if (responseCase_ == 3) { - responseCase_ = 0; - response_ = null; - } - errorBuilder_.clear(); - } - return this; - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - */ - public com.google.rpc.Status.Builder getErrorBuilder() { - return getErrorFieldBuilder().getBuilder(); - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - */ - @java.lang.Override - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if ((responseCase_ == 3) && (errorBuilder_ != null)) { - return errorBuilder_.getMessageOrBuilder(); - } else { - if (responseCase_ == 3) { - return (com.google.rpc.Status) response_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - } - /** - *
-     * Error status.
-     * 
- * - * .google.rpc.Status error = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - if (!(responseCase_ == 3)) { - response_ = com.google.rpc.Status.getDefaultInstance(); - } - errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - (com.google.rpc.Status) response_, - getParentForChildren(), - isClean()); - response_ = null; - } - responseCase_ = 3; - onChanged();; - return errorBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryResult, com.google.cloud.asset.v1.QueryResult.Builder, com.google.cloud.asset.v1.QueryResultOrBuilder> queryResultBuilder_; - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - * @return Whether the queryResult field is set. - */ - @java.lang.Override - public boolean hasQueryResult() { - return responseCase_ == 4; - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - * @return The queryResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryResult getQueryResult() { - if (queryResultBuilder_ == null) { - if (responseCase_ == 4) { - return (com.google.cloud.asset.v1.QueryResult) response_; - } - return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); - } else { - if (responseCase_ == 4) { - return queryResultBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); - } - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - public Builder setQueryResult(com.google.cloud.asset.v1.QueryResult value) { - if (queryResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - response_ = value; - onChanged(); - } else { - queryResultBuilder_.setMessage(value); - } - responseCase_ = 4; - return this; - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - public Builder setQueryResult( - com.google.cloud.asset.v1.QueryResult.Builder builderForValue) { - if (queryResultBuilder_ == null) { - response_ = builderForValue.build(); - onChanged(); - } else { - queryResultBuilder_.setMessage(builderForValue.build()); - } - responseCase_ = 4; - return this; - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - public Builder mergeQueryResult(com.google.cloud.asset.v1.QueryResult value) { - if (queryResultBuilder_ == null) { - if (responseCase_ == 4 && - response_ != com.google.cloud.asset.v1.QueryResult.getDefaultInstance()) { - response_ = com.google.cloud.asset.v1.QueryResult.newBuilder((com.google.cloud.asset.v1.QueryResult) response_) - .mergeFrom(value).buildPartial(); - } else { - response_ = value; - } - onChanged(); - } else { - if (responseCase_ == 4) { - queryResultBuilder_.mergeFrom(value); - } else { - queryResultBuilder_.setMessage(value); - } - } - responseCase_ = 4; - return this; - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - public Builder clearQueryResult() { - if (queryResultBuilder_ == null) { - if (responseCase_ == 4) { - responseCase_ = 0; - response_ = null; - onChanged(); - } - } else { - if (responseCase_ == 4) { - responseCase_ = 0; - response_ = null; - } - queryResultBuilder_.clear(); - } - return this; - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - public com.google.cloud.asset.v1.QueryResult.Builder getQueryResultBuilder() { - return getQueryResultFieldBuilder().getBuilder(); - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryResultOrBuilder getQueryResultOrBuilder() { - if ((responseCase_ == 4) && (queryResultBuilder_ != null)) { - return queryResultBuilder_.getMessageOrBuilder(); - } else { - if (responseCase_ == 4) { - return (com.google.cloud.asset.v1.QueryResult) response_; - } - return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); - } - } - /** - *
-     * Result of the query.
-     * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryResult, com.google.cloud.asset.v1.QueryResult.Builder, com.google.cloud.asset.v1.QueryResultOrBuilder> - getQueryResultFieldBuilder() { - if (queryResultBuilder_ == null) { - if (!(responseCase_ == 4)) { - response_ = com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); - } - queryResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryResult, com.google.cloud.asset.v1.QueryResult.Builder, com.google.cloud.asset.v1.QueryResultOrBuilder>( - (com.google.cloud.asset.v1.QueryResult) response_, - getParentForChildren(), - isClean()); - response_ = null; - } - responseCase_ = 4; - onChanged();; - return queryResultBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return responseCase_ == 5; - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - if (responseCase_ == 5) { - return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; - } - return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); - } else { - if (responseCase_ == 5) { - return outputConfigBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); - } - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - response_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - responseCase_ = 5; - return this; - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - response_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - responseCase_ = 5; - return this; - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1.QueryAssetsOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (responseCase_ == 5 && - response_ != com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance()) { - response_ = com.google.cloud.asset.v1.QueryAssetsOutputConfig.newBuilder((com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_) - .mergeFrom(value).buildPartial(); - } else { - response_ = value; - } - onChanged(); - } else { - if (responseCase_ == 5) { - outputConfigBuilder_.mergeFrom(value); - } else { - outputConfigBuilder_.setMessage(value); - } - } - responseCase_ = 5; - return this; - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - if (responseCase_ == 5) { - responseCase_ = 0; - response_ = null; - onChanged(); - } - } else { - if (responseCase_ == 5) { - responseCase_ = 0; - response_ = null; - } - outputConfigBuilder_.clear(); - } - return this; - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - public com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder getOutputConfigBuilder() { - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder() { - if ((responseCase_ == 5) && (outputConfigBuilder_ != null)) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - if (responseCase_ == 5) { - return (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_; - } - return com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); - } - } - /** - *
-     * Output configuration which indicates instead of being returned in API
-     * response on the fly, the query result will be saved in a specific output.
-     * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - if (!(responseCase_ == 5)) { - response_ = com.google.cloud.asset.v1.QueryAssetsOutputConfig.getDefaultInstance(); - } - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.QueryAssetsOutputConfig, com.google.cloud.asset.v1.QueryAssetsOutputConfig.Builder, com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder>( - (com.google.cloud.asset.v1.QueryAssetsOutputConfig) response_, - getParentForChildren(), - isClean()); - response_ = null; - } - responseCase_ = 5; - onChanged();; - return outputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryAssetsResponse) - private static final com.google.cloud.asset.v1.QueryAssetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryAssetsResponse(); - } - - public static com.google.cloud.asset.v1.QueryAssetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryAssetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryAssetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java deleted file mode 100644 index e13d2857eeca..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryAssetsResponseOrBuilder.java +++ /dev/null @@ -1,129 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface QueryAssetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryAssetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Reference to a query job.
-   * 
- * - * string job_reference = 1; - * @return The jobReference. - */ - java.lang.String getJobReference(); - /** - *
-   * Reference to a query job.
-   * 
- * - * string job_reference = 1; - * @return The bytes for jobReference. - */ - com.google.protobuf.ByteString - getJobReferenceBytes(); - - /** - *
-   * The query response, which can be either an `error` or a valid `response`.
-   * If `done` == `false` and the query result is being saved in a output, the
-   * output_config field will be set.
-   * If `done` == `true`, exactly one of
-   * `error`, `query_result` or `output_config` will be set.
-   * 
- * - * bool done = 2; - * @return The done. - */ - boolean getDone(); - - /** - *
-   * Error status.
-   * 
- * - * .google.rpc.Status error = 3; - * @return Whether the error field is set. - */ - boolean hasError(); - /** - *
-   * Error status.
-   * 
- * - * .google.rpc.Status error = 3; - * @return The error. - */ - com.google.rpc.Status getError(); - /** - *
-   * Error status.
-   * 
- * - * .google.rpc.Status error = 3; - */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - /** - *
-   * Result of the query.
-   * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - * @return Whether the queryResult field is set. - */ - boolean hasQueryResult(); - /** - *
-   * Result of the query.
-   * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - * @return The queryResult. - */ - com.google.cloud.asset.v1.QueryResult getQueryResult(); - /** - *
-   * Result of the query.
-   * 
- * - * .google.cloud.asset.v1.QueryResult query_result = 4; - */ - com.google.cloud.asset.v1.QueryResultOrBuilder getQueryResultOrBuilder(); - - /** - *
-   * Output configuration which indicates instead of being returned in API
-   * response on the fly, the query result will be saved in a specific output.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Output configuration which indicates instead of being returned in API
-   * response on the fly, the query result will be saved in a specific output.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - * @return The outputConfig. - */ - com.google.cloud.asset.v1.QueryAssetsOutputConfig getOutputConfig(); - /** - *
-   * Output configuration which indicates instead of being returned in API
-   * response on the fly, the query result will be saved in a specific output.
-   * 
- * - * .google.cloud.asset.v1.QueryAssetsOutputConfig output_config = 5; - */ - com.google.cloud.asset.v1.QueryAssetsOutputConfigOrBuilder getOutputConfigOrBuilder(); - - public com.google.cloud.asset.v1.QueryAssetsResponse.ResponseCase getResponseCase(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java deleted file mode 100644 index d5bf15251a36..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResult.java +++ /dev/null @@ -1,1361 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Execution results of the query.
- * The result is formatted as rows represented by BigQuery compatible [schema].
- * When pagination is necessary, it will contains the page token to retrieve
- * the results of following pages.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryResult} - */ -public final class QueryResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.QueryResult) - QueryResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use QueryResult.newBuilder() to construct. - private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QueryResult() { - rows_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QueryResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rows_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rows_.add( - input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.cloud.asset.v1.TableSchema.Builder subBuilder = null; - if (schema_ != null) { - subBuilder = schema_.toBuilder(); - } - schema_ = input.readMessage(com.google.cloud.asset.v1.TableSchema.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(schema_); - schema_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 32: { - - totalRows_ = input.readInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryResult.class, com.google.cloud.asset.v1.QueryResult.Builder.class); - } - - public static final int ROWS_FIELD_NUMBER = 1; - private java.util.List rows_; - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - @java.lang.Override - public java.util.List getRowsList() { - return rows_; - } - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - @java.lang.Override - public java.util.List - getRowsOrBuilderList() { - return rows_; - } - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - @java.lang.Override - public int getRowsCount() { - return rows_.size(); - } - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - @java.lang.Override - public com.google.protobuf.Struct getRows(int index) { - return rows_.get(index); - } - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getRowsOrBuilder( - int index) { - return rows_.get(index); - } - - public static final int SCHEMA_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.TableSchema schema_; - /** - *
-   * Describes the format of the [rows].
-   * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - * @return Whether the schema field is set. - */ - @java.lang.Override - public boolean hasSchema() { - return schema_ != null; - } - /** - *
-   * Describes the format of the [rows].
-   * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - * @return The schema. - */ - @java.lang.Override - public com.google.cloud.asset.v1.TableSchema getSchema() { - return schema_ == null ? com.google.cloud.asset.v1.TableSchema.getDefaultInstance() : schema_; - } - /** - *
-   * Describes the format of the [rows].
-   * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TableSchemaOrBuilder getSchemaOrBuilder() { - return getSchema(); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of the results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of the results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOTAL_ROWS_FIELD_NUMBER = 4; - private long totalRows_; - /** - *
-   * Total rows of the whole query results.
-   * 
- * - * int64 total_rows = 4; - * @return The totalRows. - */ - @java.lang.Override - public long getTotalRows() { - return totalRows_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < rows_.size(); i++) { - output.writeMessage(1, rows_.get(i)); - } - if (schema_ != null) { - output.writeMessage(2, getSchema()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - if (totalRows_ != 0L) { - output.writeInt64(4, totalRows_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rows_.get(i)); - } - if (schema_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSchema()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - if (totalRows_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, totalRows_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.QueryResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.QueryResult other = (com.google.cloud.asset.v1.QueryResult) obj; - - if (!getRowsList() - .equals(other.getRowsList())) return false; - if (hasSchema() != other.hasSchema()) return false; - if (hasSchema()) { - if (!getSchema() - .equals(other.getSchema())) return false; - } - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (getTotalRows() - != other.getTotalRows()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRowsCount() > 0) { - hash = (37 * hash) + ROWS_FIELD_NUMBER; - hash = (53 * hash) + getRowsList().hashCode(); - } - if (hasSchema()) { - hash = (37 * hash) + SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getSchema().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (37 * hash) + TOTAL_ROWS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTotalRows()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.QueryResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.QueryResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.QueryResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Execution results of the query.
-   * The result is formatted as rows represented by BigQuery compatible [schema].
-   * When pagination is necessary, it will contains the page token to retrieve
-   * the results of following pages.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.QueryResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.QueryResult) - com.google.cloud.asset.v1.QueryResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.QueryResult.class, com.google.cloud.asset.v1.QueryResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.QueryResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRowsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rowsBuilder_.clear(); - } - if (schemaBuilder_ == null) { - schema_ = null; - } else { - schema_ = null; - schemaBuilder_ = null; - } - nextPageToken_ = ""; - - totalRows_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_QueryResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1.QueryResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryResult build() { - com.google.cloud.asset.v1.QueryResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryResult buildPartial() { - com.google.cloud.asset.v1.QueryResult result = new com.google.cloud.asset.v1.QueryResult(this); - int from_bitField0_ = bitField0_; - if (rowsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rows_ = rows_; - } else { - result.rows_ = rowsBuilder_.build(); - } - if (schemaBuilder_ == null) { - result.schema_ = schema_; - } else { - result.schema_ = schemaBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - result.totalRows_ = totalRows_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.QueryResult) { - return mergeFrom((com.google.cloud.asset.v1.QueryResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.QueryResult other) { - if (other == com.google.cloud.asset.v1.QueryResult.getDefaultInstance()) return this; - if (rowsBuilder_ == null) { - if (!other.rows_.isEmpty()) { - if (rows_.isEmpty()) { - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRowsIsMutable(); - rows_.addAll(other.rows_); - } - onChanged(); - } - } else { - if (!other.rows_.isEmpty()) { - if (rowsBuilder_.isEmpty()) { - rowsBuilder_.dispose(); - rowsBuilder_ = null; - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000001); - rowsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRowsFieldBuilder() : null; - } else { - rowsBuilder_.addAllMessages(other.rows_); - } - } - } - if (other.hasSchema()) { - mergeSchema(other.getSchema()); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (other.getTotalRows() != 0L) { - setTotalRows(other.getTotalRows()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.QueryResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.QueryResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rows_ = - java.util.Collections.emptyList(); - private void ensureRowsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - rows_ = new java.util.ArrayList(rows_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> rowsBuilder_; - - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public java.util.List getRowsList() { - if (rowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(rows_); - } else { - return rowsBuilder_.getMessageList(); - } - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public int getRowsCount() { - if (rowsBuilder_ == null) { - return rows_.size(); - } else { - return rowsBuilder_.getCount(); - } - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public com.google.protobuf.Struct getRows(int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); - } else { - return rowsBuilder_.getMessage(index); - } - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder setRows( - int index, com.google.protobuf.Struct value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.set(index, value); - onChanged(); - } else { - rowsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder setRows( - int index, com.google.protobuf.Struct.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.set(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder addRows(com.google.protobuf.Struct value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(value); - onChanged(); - } else { - rowsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder addRows( - int index, com.google.protobuf.Struct value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(index, value); - onChanged(); - } else { - rowsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder addRows( - com.google.protobuf.Struct.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder addRows( - int index, com.google.protobuf.Struct.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder addAllRows( - java.lang.Iterable values) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rows_); - onChanged(); - } else { - rowsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder clearRows() { - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rowsBuilder_.clear(); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public Builder removeRows(int index) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.remove(index); - onChanged(); - } else { - rowsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public com.google.protobuf.Struct.Builder getRowsBuilder( - int index) { - return getRowsFieldBuilder().getBuilder(index); - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public com.google.protobuf.StructOrBuilder getRowsOrBuilder( - int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); } else { - return rowsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public java.util.List - getRowsOrBuilderList() { - if (rowsBuilder_ != null) { - return rowsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rows_); - } - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public com.google.protobuf.Struct.Builder addRowsBuilder() { - return getRowsFieldBuilder().addBuilder( - com.google.protobuf.Struct.getDefaultInstance()); - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public com.google.protobuf.Struct.Builder addRowsBuilder( - int index) { - return getRowsFieldBuilder().addBuilder( - index, com.google.protobuf.Struct.getDefaultInstance()); - } - /** - *
-     * Each row hold a query result in the format of `Struct`.
-     * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - public java.util.List - getRowsBuilderList() { - return getRowsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getRowsFieldBuilder() { - if (rowsBuilder_ == null) { - rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - rows_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - rows_ = null; - } - return rowsBuilder_; - } - - private com.google.cloud.asset.v1.TableSchema schema_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TableSchema, com.google.cloud.asset.v1.TableSchema.Builder, com.google.cloud.asset.v1.TableSchemaOrBuilder> schemaBuilder_; - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - * @return Whether the schema field is set. - */ - public boolean hasSchema() { - return schemaBuilder_ != null || schema_ != null; - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - * @return The schema. - */ - public com.google.cloud.asset.v1.TableSchema getSchema() { - if (schemaBuilder_ == null) { - return schema_ == null ? com.google.cloud.asset.v1.TableSchema.getDefaultInstance() : schema_; - } else { - return schemaBuilder_.getMessage(); - } - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - public Builder setSchema(com.google.cloud.asset.v1.TableSchema value) { - if (schemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - schema_ = value; - onChanged(); - } else { - schemaBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - public Builder setSchema( - com.google.cloud.asset.v1.TableSchema.Builder builderForValue) { - if (schemaBuilder_ == null) { - schema_ = builderForValue.build(); - onChanged(); - } else { - schemaBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - public Builder mergeSchema(com.google.cloud.asset.v1.TableSchema value) { - if (schemaBuilder_ == null) { - if (schema_ != null) { - schema_ = - com.google.cloud.asset.v1.TableSchema.newBuilder(schema_).mergeFrom(value).buildPartial(); - } else { - schema_ = value; - } - onChanged(); - } else { - schemaBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - public Builder clearSchema() { - if (schemaBuilder_ == null) { - schema_ = null; - onChanged(); - } else { - schema_ = null; - schemaBuilder_ = null; - } - - return this; - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - public com.google.cloud.asset.v1.TableSchema.Builder getSchemaBuilder() { - - onChanged(); - return getSchemaFieldBuilder().getBuilder(); - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - public com.google.cloud.asset.v1.TableSchemaOrBuilder getSchemaOrBuilder() { - if (schemaBuilder_ != null) { - return schemaBuilder_.getMessageOrBuilder(); - } else { - return schema_ == null ? - com.google.cloud.asset.v1.TableSchema.getDefaultInstance() : schema_; - } - } - /** - *
-     * Describes the format of the [rows].
-     * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TableSchema, com.google.cloud.asset.v1.TableSchema.Builder, com.google.cloud.asset.v1.TableSchemaOrBuilder> - getSchemaFieldBuilder() { - if (schemaBuilder_ == null) { - schemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TableSchema, com.google.cloud.asset.v1.TableSchema.Builder, com.google.cloud.asset.v1.TableSchemaOrBuilder>( - getSchema(), - getParentForChildren(), - isClean()); - schema_ = null; - } - return schemaBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of the results.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of the results.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of the results.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of the results.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of the results.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - private long totalRows_ ; - /** - *
-     * Total rows of the whole query results.
-     * 
- * - * int64 total_rows = 4; - * @return The totalRows. - */ - @java.lang.Override - public long getTotalRows() { - return totalRows_; - } - /** - *
-     * Total rows of the whole query results.
-     * 
- * - * int64 total_rows = 4; - * @param value The totalRows to set. - * @return This builder for chaining. - */ - public Builder setTotalRows(long value) { - - totalRows_ = value; - onChanged(); - return this; - } - /** - *
-     * Total rows of the whole query results.
-     * 
- * - * int64 total_rows = 4; - * @return This builder for chaining. - */ - public Builder clearTotalRows() { - - totalRows_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.QueryResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.QueryResult) - private static final com.google.cloud.asset.v1.QueryResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.QueryResult(); - } - - public static com.google.cloud.asset.v1.QueryResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.QueryResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java deleted file mode 100644 index a811e4bcb818..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/QueryResultOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface QueryResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.QueryResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - java.util.List - getRowsList(); - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - com.google.protobuf.Struct getRows(int index); - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - int getRowsCount(); - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - java.util.List - getRowsOrBuilderList(); - /** - *
-   * Each row hold a query result in the format of `Struct`.
-   * 
- * - * repeated .google.protobuf.Struct rows = 1; - */ - com.google.protobuf.StructOrBuilder getRowsOrBuilder( - int index); - - /** - *
-   * Describes the format of the [rows].
-   * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - * @return Whether the schema field is set. - */ - boolean hasSchema(); - /** - *
-   * Describes the format of the [rows].
-   * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - * @return The schema. - */ - com.google.cloud.asset.v1.TableSchema getSchema(); - /** - *
-   * Describes the format of the [rows].
-   * 
- * - * .google.cloud.asset.v1.TableSchema schema = 2; - */ - com.google.cloud.asset.v1.TableSchemaOrBuilder getSchemaOrBuilder(); - - /** - *
-   * Token to retrieve the next page of the results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of the results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); - - /** - *
-   * Total rows of the whole query results.
-   * 
- * - * int64 total_rows = 4; - * @return The totalRows. - */ - long getTotalRows(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java deleted file mode 100644 index b4dc113c8087..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java +++ /dev/null @@ -1,1296 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * An asset identifier in Google Cloud which contains its name, type and
- * ancestors. An asset can be any resource in the Google Cloud [resource
- * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
- * a resource outside the Google Cloud resource hierarchy (such as Google
- * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
- * See [Supported asset
- * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
- * for more information.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedAsset} - */ -public final class RelatedAsset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedAsset) - RelatedAssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedAsset.newBuilder() to construct. - private RelatedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedAsset() { - asset_ = ""; - assetType_ = ""; - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - relationshipType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedAsset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelatedAsset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - asset_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ancestors_.add(s); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - relationshipType_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedAsset.class, com.google.cloud.asset.v1.RelatedAsset.Builder.class); - } - - public static final int ASSET_FIELD_NUMBER = 1; - private volatile java.lang.Object asset_; - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The asset. - */ - @java.lang.Override - public java.lang.String getAsset() { - java.lang.Object ref = asset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - asset_ = s; - return s; - } - } - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for asset. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetBytes() { - java.lang.Object ref = asset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - asset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANCESTORS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList ancestors_; - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_; - } - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - - public static final int RELATIONSHIP_TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object relationshipType_; - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string relationship_type = 4; - * @return The relationshipType. - */ - @java.lang.Override - public java.lang.String getRelationshipType() { - java.lang.Object ref = relationshipType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - relationshipType_ = s; - return s; - } - } - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string relationship_type = 4; - * @return The bytes for relationshipType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRelationshipTypeBytes() { - java.lang.Object ref = relationshipType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - relationshipType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - for (int i = 0; i < ancestors_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ancestors_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, relationshipType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - { - int dataSize = 0; - for (int i = 0; i < ancestors_.size(); i++) { - dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); - } - size += dataSize; - size += 1 * getAncestorsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(relationshipType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, relationshipType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.RelatedAsset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.RelatedAsset other = (com.google.cloud.asset.v1.RelatedAsset) obj; - - if (!getAsset() - .equals(other.getAsset())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (!getAncestorsList() - .equals(other.getAncestorsList())) return false; - if (!getRelationshipType() - .equals(other.getRelationshipType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ASSET_FIELD_NUMBER; - hash = (53 * hash) + getAsset().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (getAncestorsCount() > 0) { - hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAncestorsList().hashCode(); - } - hash = (37 * hash) + RELATIONSHIP_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAsset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedAsset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedAsset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.RelatedAsset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An asset identifier in Google Cloud which contains its name, type and
-   * ancestors. An asset can be any resource in the Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * a resource outside the Google Cloud resource hierarchy (such as Google
-   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedAsset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedAsset) - com.google.cloud.asset.v1.RelatedAssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedAsset.class, com.google.cloud.asset.v1.RelatedAsset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.RelatedAsset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - asset_ = ""; - - assetType_ = ""; - - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - relationshipType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAsset getDefaultInstanceForType() { - return com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAsset build() { - com.google.cloud.asset.v1.RelatedAsset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAsset buildPartial() { - com.google.cloud.asset.v1.RelatedAsset result = new com.google.cloud.asset.v1.RelatedAsset(this); - int from_bitField0_ = bitField0_; - result.asset_ = asset_; - result.assetType_ = assetType_; - if (((bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ancestors_ = ancestors_; - result.relationshipType_ = relationshipType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.RelatedAsset) { - return mergeFrom((com.google.cloud.asset.v1.RelatedAsset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAsset other) { - if (other == com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()) return this; - if (!other.getAsset().isEmpty()) { - asset_ = other.asset_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (!other.ancestors_.isEmpty()) { - if (ancestors_.isEmpty()) { - ancestors_ = other.ancestors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAncestorsIsMutable(); - ancestors_.addAll(other.ancestors_); - } - onChanged(); - } - if (!other.getRelationshipType().isEmpty()) { - relationshipType_ = other.relationshipType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.RelatedAsset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelatedAsset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object asset_ = ""; - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The asset. - */ - public java.lang.String getAsset() { - java.lang.Object ref = asset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - asset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for asset. - */ - public com.google.protobuf.ByteString - getAssetBytes() { - java.lang.Object ref = asset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - asset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @param value The asset to set. - * @return This builder for chaining. - */ - public Builder setAsset( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - asset_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearAsset() { - - asset_ = getDefaultInstance().getAsset(); - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @param value The bytes for asset to set. - * @return This builder for chaining. - */ - public Builder setAssetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - asset_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAncestorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_.getUnmodifiableView(); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param index The index to set the value at. - * @param value The ancestors to set. - * @return This builder for chaining. - */ - public Builder setAncestors( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param value The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestors( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param values The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAllAncestors( - java.lang.Iterable values) { - ensureAncestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ancestors_); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @return This builder for chaining. - */ - public Builder clearAncestors() { - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param value The bytes of the ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestorsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - - private java.lang.Object relationshipType_ = ""; - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string relationship_type = 4; - * @return The relationshipType. - */ - public java.lang.String getRelationshipType() { - java.lang.Object ref = relationshipType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - relationshipType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string relationship_type = 4; - * @return The bytes for relationshipType. - */ - public com.google.protobuf.ByteString - getRelationshipTypeBytes() { - java.lang.Object ref = relationshipType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - relationshipType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string relationship_type = 4; - * @param value The relationshipType to set. - * @return This builder for chaining. - */ - public Builder setRelationshipType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - relationshipType_ = value; - onChanged(); - return this; - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string relationship_type = 4; - * @return This builder for chaining. - */ - public Builder clearRelationshipType() { - - relationshipType_ = getDefaultInstance().getRelationshipType(); - onChanged(); - return this; - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string relationship_type = 4; - * @param value The bytes for relationshipType to set. - * @return This builder for chaining. - */ - public Builder setRelationshipTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - relationshipType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedAsset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedAsset) - private static final com.google.cloud.asset.v1.RelatedAsset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedAsset(); - } - - public static com.google.cloud.asset.v1.RelatedAsset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedAsset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAsset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAsset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java deleted file mode 100644 index da36685963fd..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java +++ /dev/null @@ -1,142 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface RelatedAssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedAsset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The asset. - */ - java.lang.String getAsset(); - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for asset. - */ - com.google.protobuf.ByteString - getAssetBytes(); - - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return A list containing the ancestors. - */ - java.util.List - getAncestorsList(); - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return The count of ancestors. - */ - int getAncestorsCount(); - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - java.lang.String getAncestors(int index); - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - com.google.protobuf.ByteString - getAncestorsBytes(int index); - - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string relationship_type = 4; - * @return The relationshipType. - */ - java.lang.String getRelationshipType(); - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string relationship_type = 4; - * @return The bytes for relationshipType. - */ - com.google.protobuf.ByteString - getRelationshipTypeBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java deleted file mode 100644 index bcba7ae024cd..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java +++ /dev/null @@ -1,1114 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * DEPRECATED. This message only presents for the purpose of
- * backward-compatibility. The server will never populate this message in
- * responses.
- * The detailed related assets with the `relationship_type`.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedAssets} - */ -@java.lang.Deprecated public final class RelatedAssets extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedAssets) - RelatedAssetsOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedAssets.newBuilder() to construct. - private RelatedAssets(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedAssets() { - assets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedAssets(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelatedAssets( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.RelationshipAttributes.Builder subBuilder = null; - if (relationshipAttributes_ != null) { - subBuilder = relationshipAttributes_.toBuilder(); - } - relationshipAttributes_ = input.readMessage(com.google.cloud.asset.v1.RelationshipAttributes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relationshipAttributes_); - relationshipAttributes_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage(com.google.cloud.asset.v1.RelatedAsset.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedAssets.class, com.google.cloud.asset.v1.RelatedAssets.Builder.class); - } - - public static final int RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.RelationshipAttributes relationshipAttributes_; - /** - *
-   * The detailed relationship attributes.
-   * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - * @return Whether the relationshipAttributes field is set. - */ - @java.lang.Override - public boolean hasRelationshipAttributes() { - return relationshipAttributes_ != null; - } - /** - *
-   * The detailed relationship attributes.
-   * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - * @return The relationshipAttributes. - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes() { - return relationshipAttributes_ == null ? com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; - } - /** - *
-   * The detailed relationship attributes.
-   * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { - return getRelationshipAttributes(); - } - - public static final int ASSETS_FIELD_NUMBER = 2; - private java.util.List assets_; - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - @java.lang.Override - public java.util.List getAssetsList() { - return assets_; - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - @java.lang.Override - public java.util.List - getAssetsOrBuilderList() { - return assets_; - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - @java.lang.Override - public int getAssetsCount() { - return assets_.size(); - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAsset getAssets(int index) { - return assets_.get(index); - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder( - int index) { - return assets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (relationshipAttributes_ != null) { - output.writeMessage(1, getRelationshipAttributes()); - } - for (int i = 0; i < assets_.size(); i++) { - output.writeMessage(2, assets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (relationshipAttributes_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getRelationshipAttributes()); - } - for (int i = 0; i < assets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, assets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.RelatedAssets)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.RelatedAssets other = (com.google.cloud.asset.v1.RelatedAssets) obj; - - if (hasRelationshipAttributes() != other.hasRelationshipAttributes()) return false; - if (hasRelationshipAttributes()) { - if (!getRelationshipAttributes() - .equals(other.getRelationshipAttributes())) return false; - } - if (!getAssetsList() - .equals(other.getAssetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRelationshipAttributes()) { - hash = (37 * hash) + RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipAttributes().hashCode(); - } - if (getAssetsCount() > 0) { - hash = (37 * hash) + ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getAssetsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAssets parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedAssets parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedAssets parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.RelatedAssets prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * DEPRECATED. This message only presents for the purpose of
-   * backward-compatibility. The server will never populate this message in
-   * responses.
-   * The detailed related assets with the `relationship_type`.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedAssets} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedAssets) - com.google.cloud.asset.v1.RelatedAssetsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedAssets.class, com.google.cloud.asset.v1.RelatedAssets.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.RelatedAssets.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAssetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (relationshipAttributesBuilder_ == null) { - relationshipAttributes_ = null; - } else { - relationshipAttributes_ = null; - relationshipAttributesBuilder_ = null; - } - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - assetsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAssets getDefaultInstanceForType() { - return com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAssets build() { - com.google.cloud.asset.v1.RelatedAssets result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAssets buildPartial() { - com.google.cloud.asset.v1.RelatedAssets result = new com.google.cloud.asset.v1.RelatedAssets(this); - int from_bitField0_ = bitField0_; - if (relationshipAttributesBuilder_ == null) { - result.relationshipAttributes_ = relationshipAttributes_; - } else { - result.relationshipAttributes_ = relationshipAttributesBuilder_.build(); - } - if (assetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assets_ = assets_; - } else { - result.assets_ = assetsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.RelatedAssets) { - return mergeFrom((com.google.cloud.asset.v1.RelatedAssets)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAssets other) { - if (other == com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance()) return this; - if (other.hasRelationshipAttributes()) { - mergeRelationshipAttributes(other.getRelationshipAttributes()); - } - if (assetsBuilder_ == null) { - if (!other.assets_.isEmpty()) { - if (assets_.isEmpty()) { - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetsIsMutable(); - assets_.addAll(other.assets_); - } - onChanged(); - } - } else { - if (!other.assets_.isEmpty()) { - if (assetsBuilder_.isEmpty()) { - assetsBuilder_.dispose(); - assetsBuilder_ = null; - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - assetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAssetsFieldBuilder() : null; - } else { - assetsBuilder_.addAllMessages(other.assets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.RelatedAssets parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelatedAssets) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.asset.v1.RelationshipAttributes relationshipAttributes_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelationshipAttributes, com.google.cloud.asset.v1.RelationshipAttributes.Builder, com.google.cloud.asset.v1.RelationshipAttributesOrBuilder> relationshipAttributesBuilder_; - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - * @return Whether the relationshipAttributes field is set. - */ - public boolean hasRelationshipAttributes() { - return relationshipAttributesBuilder_ != null || relationshipAttributes_ != null; - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - * @return The relationshipAttributes. - */ - public com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes() { - if (relationshipAttributesBuilder_ == null) { - return relationshipAttributes_ == null ? com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; - } else { - return relationshipAttributesBuilder_.getMessage(); - } - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder setRelationshipAttributes(com.google.cloud.asset.v1.RelationshipAttributes value) { - if (relationshipAttributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - relationshipAttributes_ = value; - onChanged(); - } else { - relationshipAttributesBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder setRelationshipAttributes( - com.google.cloud.asset.v1.RelationshipAttributes.Builder builderForValue) { - if (relationshipAttributesBuilder_ == null) { - relationshipAttributes_ = builderForValue.build(); - onChanged(); - } else { - relationshipAttributesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder mergeRelationshipAttributes(com.google.cloud.asset.v1.RelationshipAttributes value) { - if (relationshipAttributesBuilder_ == null) { - if (relationshipAttributes_ != null) { - relationshipAttributes_ = - com.google.cloud.asset.v1.RelationshipAttributes.newBuilder(relationshipAttributes_).mergeFrom(value).buildPartial(); - } else { - relationshipAttributes_ = value; - } - onChanged(); - } else { - relationshipAttributesBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder clearRelationshipAttributes() { - if (relationshipAttributesBuilder_ == null) { - relationshipAttributes_ = null; - onChanged(); - } else { - relationshipAttributes_ = null; - relationshipAttributesBuilder_ = null; - } - - return this; - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - public com.google.cloud.asset.v1.RelationshipAttributes.Builder getRelationshipAttributesBuilder() { - - onChanged(); - return getRelationshipAttributesFieldBuilder().getBuilder(); - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - public com.google.cloud.asset.v1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { - if (relationshipAttributesBuilder_ != null) { - return relationshipAttributesBuilder_.getMessageOrBuilder(); - } else { - return relationshipAttributes_ == null ? - com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; - } - } - /** - *
-     * The detailed relationship attributes.
-     * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelationshipAttributes, com.google.cloud.asset.v1.RelationshipAttributes.Builder, com.google.cloud.asset.v1.RelationshipAttributesOrBuilder> - getRelationshipAttributesFieldBuilder() { - if (relationshipAttributesBuilder_ == null) { - relationshipAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.RelationshipAttributes, com.google.cloud.asset.v1.RelationshipAttributes.Builder, com.google.cloud.asset.v1.RelationshipAttributesOrBuilder>( - getRelationshipAttributes(), - getParentForChildren(), - isClean()); - relationshipAttributes_ = null; - } - return relationshipAttributesBuilder_; - } - - private java.util.List assets_ = - java.util.Collections.emptyList(); - private void ensureAssetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(assets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> assetsBuilder_; - - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public java.util.List getAssetsList() { - if (assetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(assets_); - } else { - return assetsBuilder_.getMessageList(); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public int getAssetsCount() { - if (assetsBuilder_ == null) { - return assets_.size(); - } else { - return assetsBuilder_.getCount(); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1.RelatedAsset getAssets(int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); - } else { - return assetsBuilder_.getMessage(index); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1.RelatedAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.set(index, value); - onChanged(); - } else { - assetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.set(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder addAssets(com.google.cloud.asset.v1.RelatedAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(value); - onChanged(); - } else { - assetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1.RelatedAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(index, value); - onChanged(); - } else { - assetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder addAssets( - com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder addAllAssets( - java.lang.Iterable values) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assets_); - onChanged(); - } else { - assetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder clearAssets() { - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - assetsBuilder_.clear(); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public Builder removeAssets(int index) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.remove(index); - onChanged(); - } else { - assetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1.RelatedAsset.Builder getAssetsBuilder( - int index) { - return getAssetsFieldBuilder().getBuilder(index); - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder( - int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); } else { - return assetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public java.util.List - getAssetsOrBuilderList() { - if (assetsBuilder_ != null) { - return assetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(assets_); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1.RelatedAsset.Builder addAssetsBuilder() { - return getAssetsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()); - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1.RelatedAsset.Builder addAssetsBuilder( - int index) { - return getAssetsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()); - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - public java.util.List - getAssetsBuilderList() { - return getAssetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder> - getAssetsFieldBuilder() { - if (assetsBuilder_ == null) { - assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.RelatedAsset, com.google.cloud.asset.v1.RelatedAsset.Builder, com.google.cloud.asset.v1.RelatedAssetOrBuilder>( - assets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - assets_ = null; - } - return assetsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedAssets) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedAssets) - private static final com.google.cloud.asset.v1.RelatedAssets DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedAssets(); - } - - public static com.google.cloud.asset.v1.RelatedAssets getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedAssets parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAssets(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedAssets getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java deleted file mode 100644 index befe6f913733..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -@java.lang.Deprecated public interface RelatedAssetsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedAssets) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The detailed relationship attributes.
-   * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - * @return Whether the relationshipAttributes field is set. - */ - boolean hasRelationshipAttributes(); - /** - *
-   * The detailed relationship attributes.
-   * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - * @return The relationshipAttributes. - */ - com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes(); - /** - *
-   * The detailed relationship attributes.
-   * 
- * - * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; - */ - com.google.cloud.asset.v1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder(); - - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - java.util.List - getAssetsList(); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - com.google.cloud.asset.v1.RelatedAsset getAssets(int index); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - int getAssetsCount(); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - java.util.List - getAssetsOrBuilderList(); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; - */ - com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java deleted file mode 100644 index 0115c241102f..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResource.java +++ /dev/null @@ -1,768 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * The detailed related resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedResource} - */ -public final class RelatedResource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedResource) - RelatedResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedResource.newBuilder() to construct. - private RelatedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedResource() { - assetType_ = ""; - fullResourceName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedResource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelatedResource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - fullResourceName_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedResource.class, com.google.cloud.asset.v1.RelatedResource.Builder.class); - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string asset_type = 1; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string asset_type = 1; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object fullResourceName_; - /** - *
-   * The full resource name of the related resource. Example:
-   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-   * 
- * - * string full_resource_name = 2; - * @return The fullResourceName. - */ - @java.lang.Override - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } - } - /** - *
-   * The full resource name of the related resource. Example:
-   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-   * 
- * - * string full_resource_name = 2; - * @return The bytes for fullResourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, assetType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fullResourceName_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, assetType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullResourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fullResourceName_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.RelatedResource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.RelatedResource other = (com.google.cloud.asset.v1.RelatedResource) obj; - - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (!getFullResourceName() - .equals(other.getFullResourceName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - hash = (37 * hash) + FULL_RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getFullResourceName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedResource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedResource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.RelatedResource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The detailed related resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedResource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedResource) - com.google.cloud.asset.v1.RelatedResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedResource.class, com.google.cloud.asset.v1.RelatedResource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.RelatedResource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - assetType_ = ""; - - fullResourceName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResource getDefaultInstanceForType() { - return com.google.cloud.asset.v1.RelatedResource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResource build() { - com.google.cloud.asset.v1.RelatedResource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResource buildPartial() { - com.google.cloud.asset.v1.RelatedResource result = new com.google.cloud.asset.v1.RelatedResource(this); - result.assetType_ = assetType_; - result.fullResourceName_ = fullResourceName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.RelatedResource) { - return mergeFrom((com.google.cloud.asset.v1.RelatedResource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResource other) { - if (other == com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()) return this; - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (!other.getFullResourceName().isEmpty()) { - fullResourceName_ = other.fullResourceName_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.RelatedResource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelatedResource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string asset_type = 1; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string asset_type = 1; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string asset_type = 1; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string asset_type = 1; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string asset_type = 1; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private java.lang.Object fullResourceName_ = ""; - /** - *
-     * The full resource name of the related resource. Example:
-     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-     * 
- * - * string full_resource_name = 2; - * @return The fullResourceName. - */ - public java.lang.String getFullResourceName() { - java.lang.Object ref = fullResourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fullResourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full resource name of the related resource. Example:
-     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-     * 
- * - * string full_resource_name = 2; - * @return The bytes for fullResourceName. - */ - public com.google.protobuf.ByteString - getFullResourceNameBytes() { - java.lang.Object ref = fullResourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full resource name of the related resource. Example:
-     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-     * 
- * - * string full_resource_name = 2; - * @param value The fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - fullResourceName_ = value; - onChanged(); - return this; - } - /** - *
-     * The full resource name of the related resource. Example:
-     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-     * 
- * - * string full_resource_name = 2; - * @return This builder for chaining. - */ - public Builder clearFullResourceName() { - - fullResourceName_ = getDefaultInstance().getFullResourceName(); - onChanged(); - return this; - } - /** - *
-     * The full resource name of the related resource. Example:
-     * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-     * 
- * - * string full_resource_name = 2; - * @param value The bytes for fullResourceName to set. - * @return This builder for chaining. - */ - public Builder setFullResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - fullResourceName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedResource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedResource) - private static final com.google.cloud.asset.v1.RelatedResource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedResource(); - } - - public static com.google.cloud.asset.v1.RelatedResource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedResource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedResource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java deleted file mode 100644 index 4a184b2490d1..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourceOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface RelatedResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedResource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string asset_type = 1; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string asset_type = 1; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * The full resource name of the related resource. Example:
-   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-   * 
- * - * string full_resource_name = 2; - * @return The fullResourceName. - */ - java.lang.String getFullResourceName(); - /** - *
-   * The full resource name of the related resource. Example:
-   * `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123`
-   * 
- * - * string full_resource_name = 2; - * @return The bytes for fullResourceName. - */ - com.google.protobuf.ByteString - getFullResourceNameBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java deleted file mode 100644 index 11125d9c1832..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResources.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * The related resources of the primary resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedResources} - */ -public final class RelatedResources extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedResources) - RelatedResourcesOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedResources.newBuilder() to construct. - private RelatedResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedResources() { - relatedResources_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedResources(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelatedResources( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - relatedResources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - relatedResources_.add( - input.readMessage(com.google.cloud.asset.v1.RelatedResource.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - relatedResources_ = java.util.Collections.unmodifiableList(relatedResources_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedResources.class, com.google.cloud.asset.v1.RelatedResources.Builder.class); - } - - public static final int RELATED_RESOURCES_FIELD_NUMBER = 1; - private java.util.List relatedResources_; - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - @java.lang.Override - public java.util.List getRelatedResourcesList() { - return relatedResources_; - } - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - @java.lang.Override - public java.util.List - getRelatedResourcesOrBuilderList() { - return relatedResources_; - } - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - @java.lang.Override - public int getRelatedResourcesCount() { - return relatedResources_.size(); - } - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index) { - return relatedResources_.get(index); - } - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( - int index) { - return relatedResources_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < relatedResources_.size(); i++) { - output.writeMessage(1, relatedResources_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < relatedResources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, relatedResources_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.RelatedResources)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.RelatedResources other = (com.google.cloud.asset.v1.RelatedResources) obj; - - if (!getRelatedResourcesList() - .equals(other.getRelatedResourcesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRelatedResourcesCount() > 0) { - hash = (37 * hash) + RELATED_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getRelatedResourcesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResources parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedResources parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelatedResources parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.RelatedResources prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The related resources of the primary resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelatedResources} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedResources) - com.google.cloud.asset.v1.RelatedResourcesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelatedResources.class, com.google.cloud.asset.v1.RelatedResources.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.RelatedResources.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRelatedResourcesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (relatedResourcesBuilder_ == null) { - relatedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - relatedResourcesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelatedResources_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResources getDefaultInstanceForType() { - return com.google.cloud.asset.v1.RelatedResources.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResources build() { - com.google.cloud.asset.v1.RelatedResources result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResources buildPartial() { - com.google.cloud.asset.v1.RelatedResources result = new com.google.cloud.asset.v1.RelatedResources(this); - int from_bitField0_ = bitField0_; - if (relatedResourcesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - relatedResources_ = java.util.Collections.unmodifiableList(relatedResources_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.relatedResources_ = relatedResources_; - } else { - result.relatedResources_ = relatedResourcesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.RelatedResources) { - return mergeFrom((com.google.cloud.asset.v1.RelatedResources)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.RelatedResources other) { - if (other == com.google.cloud.asset.v1.RelatedResources.getDefaultInstance()) return this; - if (relatedResourcesBuilder_ == null) { - if (!other.relatedResources_.isEmpty()) { - if (relatedResources_.isEmpty()) { - relatedResources_ = other.relatedResources_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRelatedResourcesIsMutable(); - relatedResources_.addAll(other.relatedResources_); - } - onChanged(); - } - } else { - if (!other.relatedResources_.isEmpty()) { - if (relatedResourcesBuilder_.isEmpty()) { - relatedResourcesBuilder_.dispose(); - relatedResourcesBuilder_ = null; - relatedResources_ = other.relatedResources_; - bitField0_ = (bitField0_ & ~0x00000001); - relatedResourcesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getRelatedResourcesFieldBuilder() : null; - } else { - relatedResourcesBuilder_.addAllMessages(other.relatedResources_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.RelatedResources parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelatedResources) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List relatedResources_ = - java.util.Collections.emptyList(); - private void ensureRelatedResourcesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - relatedResources_ = new java.util.ArrayList(relatedResources_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.RelatedResource, com.google.cloud.asset.v1.RelatedResource.Builder, com.google.cloud.asset.v1.RelatedResourceOrBuilder> relatedResourcesBuilder_; - - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public java.util.List getRelatedResourcesList() { - if (relatedResourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(relatedResources_); - } else { - return relatedResourcesBuilder_.getMessageList(); - } - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public int getRelatedResourcesCount() { - if (relatedResourcesBuilder_ == null) { - return relatedResources_.size(); - } else { - return relatedResourcesBuilder_.getCount(); - } - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index) { - if (relatedResourcesBuilder_ == null) { - return relatedResources_.get(index); - } else { - return relatedResourcesBuilder_.getMessage(index); - } - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder setRelatedResources( - int index, com.google.cloud.asset.v1.RelatedResource value) { - if (relatedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedResourcesIsMutable(); - relatedResources_.set(index, value); - onChanged(); - } else { - relatedResourcesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder setRelatedResources( - int index, com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { - if (relatedResourcesBuilder_ == null) { - ensureRelatedResourcesIsMutable(); - relatedResources_.set(index, builderForValue.build()); - onChanged(); - } else { - relatedResourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder addRelatedResources(com.google.cloud.asset.v1.RelatedResource value) { - if (relatedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedResourcesIsMutable(); - relatedResources_.add(value); - onChanged(); - } else { - relatedResourcesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder addRelatedResources( - int index, com.google.cloud.asset.v1.RelatedResource value) { - if (relatedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelatedResourcesIsMutable(); - relatedResources_.add(index, value); - onChanged(); - } else { - relatedResourcesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder addRelatedResources( - com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { - if (relatedResourcesBuilder_ == null) { - ensureRelatedResourcesIsMutable(); - relatedResources_.add(builderForValue.build()); - onChanged(); - } else { - relatedResourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder addRelatedResources( - int index, com.google.cloud.asset.v1.RelatedResource.Builder builderForValue) { - if (relatedResourcesBuilder_ == null) { - ensureRelatedResourcesIsMutable(); - relatedResources_.add(index, builderForValue.build()); - onChanged(); - } else { - relatedResourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder addAllRelatedResources( - java.lang.Iterable values) { - if (relatedResourcesBuilder_ == null) { - ensureRelatedResourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relatedResources_); - onChanged(); - } else { - relatedResourcesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder clearRelatedResources() { - if (relatedResourcesBuilder_ == null) { - relatedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - relatedResourcesBuilder_.clear(); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public Builder removeRelatedResources(int index) { - if (relatedResourcesBuilder_ == null) { - ensureRelatedResourcesIsMutable(); - relatedResources_.remove(index); - onChanged(); - } else { - relatedResourcesBuilder_.remove(index); - } - return this; - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public com.google.cloud.asset.v1.RelatedResource.Builder getRelatedResourcesBuilder( - int index) { - return getRelatedResourcesFieldBuilder().getBuilder(index); - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( - int index) { - if (relatedResourcesBuilder_ == null) { - return relatedResources_.get(index); } else { - return relatedResourcesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public java.util.List - getRelatedResourcesOrBuilderList() { - if (relatedResourcesBuilder_ != null) { - return relatedResourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(relatedResources_); - } - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public com.google.cloud.asset.v1.RelatedResource.Builder addRelatedResourcesBuilder() { - return getRelatedResourcesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()); - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public com.google.cloud.asset.v1.RelatedResource.Builder addRelatedResourcesBuilder( - int index) { - return getRelatedResourcesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.RelatedResource.getDefaultInstance()); - } - /** - *
-     * The detailed related resources of the primary resource.
-     * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - public java.util.List - getRelatedResourcesBuilderList() { - return getRelatedResourcesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.RelatedResource, com.google.cloud.asset.v1.RelatedResource.Builder, com.google.cloud.asset.v1.RelatedResourceOrBuilder> - getRelatedResourcesFieldBuilder() { - if (relatedResourcesBuilder_ == null) { - relatedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.RelatedResource, com.google.cloud.asset.v1.RelatedResource.Builder, com.google.cloud.asset.v1.RelatedResourceOrBuilder>( - relatedResources_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - relatedResources_ = null; - } - return relatedResourcesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedResources) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedResources) - private static final com.google.cloud.asset.v1.RelatedResources DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedResources(); - } - - public static com.google.cloud.asset.v1.RelatedResources getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedResources parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedResources(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelatedResources getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java deleted file mode 100644 index 10384ab80468..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedResourcesOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface RelatedResourcesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedResources) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - java.util.List - getRelatedResourcesList(); - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - com.google.cloud.asset.v1.RelatedResource getRelatedResources(int index); - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - int getRelatedResourcesCount(); - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - java.util.List - getRelatedResourcesOrBuilderList(); - /** - *
-   * The detailed related resources of the primary resource.
-   * 
- * - * repeated .google.cloud.asset.v1.RelatedResource related_resources = 1; - */ - com.google.cloud.asset.v1.RelatedResourceOrBuilder getRelatedResourcesOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java deleted file mode 100644 index d89053a3d5ed..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java +++ /dev/null @@ -1,1108 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * DEPRECATED. This message only presents for the purpose of
- * backward-compatibility. The server will never populate this message in
- * responses.
- * The relationship attributes which include  `type`, `source_resource_type`,
- * `target_resource_type` and `action`.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelationshipAttributes} - */ -@java.lang.Deprecated public final class RelationshipAttributes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelationshipAttributes) - RelationshipAttributesOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelationshipAttributes.newBuilder() to construct. - private RelationshipAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelationshipAttributes() { - type_ = ""; - sourceResourceType_ = ""; - targetResourceType_ = ""; - action_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelationshipAttributes(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelationshipAttributes( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceResourceType_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - targetResourceType_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - action_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelationshipAttributes.class, com.google.cloud.asset.v1.RelationshipAttributes.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object type_; - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_RESOURCE_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object sourceResourceType_; - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The sourceResourceType. - */ - @java.lang.Override - public java.lang.String getSourceResourceType() { - java.lang.Object ref = sourceResourceType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceResourceType_ = s; - return s; - } - } - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The bytes for sourceResourceType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceResourceTypeBytes() { - java.lang.Object ref = sourceResourceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_RESOURCE_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object targetResourceType_; - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The targetResourceType. - */ - @java.lang.Override - public java.lang.String getTargetResourceType() { - java.lang.Object ref = targetResourceType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetResourceType_ = s; - return s; - } - } - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The bytes for targetResourceType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTargetResourceTypeBytes() { - java.lang.Object ref = targetResourceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTION_FIELD_NUMBER = 3; - private volatile java.lang.Object action_; - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The action. - */ - @java.lang.Override - public java.lang.String getAction() { - java.lang.Object ref = action_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - action_ = s; - return s; - } - } - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The bytes for action. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getActionBytes() { - java.lang.Object ref = action_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - action_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.RelationshipAttributes)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.RelationshipAttributes other = (com.google.cloud.asset.v1.RelationshipAttributes) obj; - - if (!getType() - .equals(other.getType())) return false; - if (!getSourceResourceType() - .equals(other.getSourceResourceType())) return false; - if (!getTargetResourceType() - .equals(other.getTargetResourceType())) return false; - if (!getAction() - .equals(other.getAction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + SOURCE_RESOURCE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getSourceResourceType().hashCode(); - hash = (37 * hash) + TARGET_RESOURCE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getTargetResourceType().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + getAction().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.RelationshipAttributes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * DEPRECATED. This message only presents for the purpose of
-   * backward-compatibility. The server will never populate this message in
-   * responses.
-   * The relationship attributes which include  `type`, `source_resource_type`,
-   * `target_resource_type` and `action`.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.RelationshipAttributes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelationshipAttributes) - com.google.cloud.asset.v1.RelationshipAttributesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.RelationshipAttributes.class, com.google.cloud.asset.v1.RelationshipAttributes.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.RelationshipAttributes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = ""; - - sourceResourceType_ = ""; - - targetResourceType_ = ""; - - action_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstanceForType() { - return com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelationshipAttributes build() { - com.google.cloud.asset.v1.RelationshipAttributes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelationshipAttributes buildPartial() { - com.google.cloud.asset.v1.RelationshipAttributes result = new com.google.cloud.asset.v1.RelationshipAttributes(this); - result.type_ = type_; - result.sourceResourceType_ = sourceResourceType_; - result.targetResourceType_ = targetResourceType_; - result.action_ = action_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.RelationshipAttributes) { - return mergeFrom((com.google.cloud.asset.v1.RelationshipAttributes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.RelationshipAttributes other) { - if (other == com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - if (!other.getSourceResourceType().isEmpty()) { - sourceResourceType_ = other.sourceResourceType_; - onChanged(); - } - if (!other.getTargetResourceType().isEmpty()) { - targetResourceType_ = other.targetResourceType_; - onChanged(); - } - if (!other.getAction().isEmpty()) { - action_ = other.action_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.RelationshipAttributes parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.RelationshipAttributes) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object type_ = ""; - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private java.lang.Object sourceResourceType_ = ""; - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @return The sourceResourceType. - */ - public java.lang.String getSourceResourceType() { - java.lang.Object ref = sourceResourceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceResourceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @return The bytes for sourceResourceType. - */ - public com.google.protobuf.ByteString - getSourceResourceTypeBytes() { - java.lang.Object ref = sourceResourceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @param value The sourceResourceType to set. - * @return This builder for chaining. - */ - public Builder setSourceResourceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceResourceType_ = value; - onChanged(); - return this; - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @return This builder for chaining. - */ - public Builder clearSourceResourceType() { - - sourceResourceType_ = getDefaultInstance().getSourceResourceType(); - onChanged(); - return this; - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @param value The bytes for sourceResourceType to set. - * @return This builder for chaining. - */ - public Builder setSourceResourceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceResourceType_ = value; - onChanged(); - return this; - } - - private java.lang.Object targetResourceType_ = ""; - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @return The targetResourceType. - */ - public java.lang.String getTargetResourceType() { - java.lang.Object ref = targetResourceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetResourceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @return The bytes for targetResourceType. - */ - public com.google.protobuf.ByteString - getTargetResourceTypeBytes() { - java.lang.Object ref = targetResourceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @param value The targetResourceType to set. - * @return This builder for chaining. - */ - public Builder setTargetResourceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetResourceType_ = value; - onChanged(); - return this; - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @return This builder for chaining. - */ - public Builder clearTargetResourceType() { - - targetResourceType_ = getDefaultInstance().getTargetResourceType(); - onChanged(); - return this; - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @param value The bytes for targetResourceType to set. - * @return This builder for chaining. - */ - public Builder setTargetResourceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetResourceType_ = value; - onChanged(); - return this; - } - - private java.lang.Object action_ = ""; - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @return The action. - */ - public java.lang.String getAction() { - java.lang.Object ref = action_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - action_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @return The bytes for action. - */ - public com.google.protobuf.ByteString - getActionBytes() { - java.lang.Object ref = action_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - action_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value; - onChanged(); - return this; - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = getDefaultInstance().getAction(); - onChanged(); - return this; - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @param value The bytes for action to set. - * @return This builder for chaining. - */ - public Builder setActionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - action_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelationshipAttributes) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelationshipAttributes) - private static final com.google.cloud.asset.v1.RelationshipAttributes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelationshipAttributes(); - } - - public static com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelationshipAttributes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelationshipAttributes(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java deleted file mode 100644 index 5030889b1b69..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -@java.lang.Deprecated public interface RelationshipAttributesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelationshipAttributes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The sourceResourceType. - */ - java.lang.String getSourceResourceType(); - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The bytes for sourceResourceType. - */ - com.google.protobuf.ByteString - getSourceResourceTypeBytes(); - - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The targetResourceType. - */ - java.lang.String getTargetResourceType(); - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The bytes for targetResourceType. - */ - com.google.protobuf.ByteString - getTargetResourceTypeBytes(); - - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The action. - */ - java.lang.String getAction(); - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The bytes for action. - */ - com.google.protobuf.ByteString - getActionBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java deleted file mode 100644 index d35dadf4f5b3..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Resource.java +++ /dev/null @@ -1,1813 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A representation of a Google Cloud resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.Resource} - */ -public final class Resource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.Resource) - ResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Resource.newBuilder() to construct. - private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Resource() { - version_ = ""; - discoveryDocumentUri_ = ""; - discoveryName_ = ""; - resourceUrl_ = ""; - parent_ = ""; - location_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Resource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Resource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.Resource.class, com.google.cloud.asset.v1.Resource.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object discoveryDocumentUri_; - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - @java.lang.Override - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } - } - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object discoveryName_; - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - @java.lang.Override - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } - } - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceUrl_; - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - @java.lang.Override - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } - } - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 6; - private com.google.protobuf.Struct data_; - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - @java.lang.Override - public boolean hasData() { - return data_ != null; - } - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.Struct getData() { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - return getData(); - } - - public static final int LOCATION_FIELD_NUMBER = 8; - private volatile java.lang.Object location_; - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The location. - */ - @java.lang.Override - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } - } - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The bytes for location. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); - } - if (data_ != null) { - output.writeMessage(6, getData()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, location_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); - } - if (data_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getData()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, location_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.Resource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.Resource other = (com.google.cloud.asset.v1.Resource) obj; - - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getDiscoveryDocumentUri() - .equals(other.getDiscoveryDocumentUri())) return false; - if (!getDiscoveryName() - .equals(other.getDiscoveryName())) return false; - if (!getResourceUrl() - .equals(other.getResourceUrl())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (hasData() != other.hasData()) return false; - if (hasData()) { - if (!getData() - .equals(other.getData())) return false; - } - if (!getLocation() - .equals(other.getLocation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); - hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryName().hashCode(); - hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResourceUrl().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasData()) { - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - } - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.Resource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Resource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Resource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Resource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Resource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.Resource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.Resource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Resource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.Resource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Resource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.Resource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.Resource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.Resource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A representation of a Google Cloud resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.Resource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.Resource) - com.google.cloud.asset.v1.ResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.Resource.class, com.google.cloud.asset.v1.Resource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.Resource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - discoveryDocumentUri_ = ""; - - discoveryName_ = ""; - - resourceUrl_ = ""; - - parent_ = ""; - - if (dataBuilder_ == null) { - data_ = null; - } else { - data_ = null; - dataBuilder_ = null; - } - location_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_Resource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Resource getDefaultInstanceForType() { - return com.google.cloud.asset.v1.Resource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.Resource build() { - com.google.cloud.asset.v1.Resource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Resource buildPartial() { - com.google.cloud.asset.v1.Resource result = new com.google.cloud.asset.v1.Resource(this); - result.version_ = version_; - result.discoveryDocumentUri_ = discoveryDocumentUri_; - result.discoveryName_ = discoveryName_; - result.resourceUrl_ = resourceUrl_; - result.parent_ = parent_; - if (dataBuilder_ == null) { - result.data_ = data_; - } else { - result.data_ = dataBuilder_.build(); - } - result.location_ = location_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.Resource) { - return mergeFrom((com.google.cloud.asset.v1.Resource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.Resource other) { - if (other == com.google.cloud.asset.v1.Resource.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getDiscoveryDocumentUri().isEmpty()) { - discoveryDocumentUri_ = other.discoveryDocumentUri_; - onChanged(); - } - if (!other.getDiscoveryName().isEmpty()) { - discoveryName_ = other.discoveryName_; - onChanged(); - } - if (!other.getResourceUrl().isEmpty()) { - resourceUrl_ = other.resourceUrl_; - onChanged(); - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasData()) { - mergeData(other.getData()); - } - if (!other.getLocation().isEmpty()) { - location_ = other.location_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.Resource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.Resource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryDocumentUri_ = ""; - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return This builder for chaining. - */ - public Builder clearDiscoveryDocumentUri() { - - discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The bytes for discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryName_ = ""; - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @param value The discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryName_ = value; - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @return This builder for chaining. - */ - public Builder clearDiscoveryName() { - - discoveryName_ = getDefaultInstance().getDiscoveryName(); - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @param value The bytes for discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceUrl_ = ""; - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceUrl_ = value; - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return This builder for chaining. - */ - public Builder clearResourceUrl() { - - resourceUrl_ = getDefaultInstance().getResourceUrl(); - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The bytes for resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceUrl_ = value; - onChanged(); - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Struct data_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - public boolean hasData() { - return dataBuilder_ != null || data_ != null; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - public com.google.protobuf.Struct getData() { - if (dataBuilder_ == null) { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } else { - return dataBuilder_.getMessage(); - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - dataBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData( - com.google.protobuf.Struct.Builder builderForValue) { - if (dataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - dataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder mergeData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (data_ != null) { - data_ = - com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - dataBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder clearData() { - if (dataBuilder_ == null) { - data_ = null; - onChanged(); - } else { - data_ = null; - dataBuilder_ = null; - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.Struct.Builder getDataBuilder() { - - onChanged(); - return getDataFieldBuilder().getBuilder(); - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilder(); - } else { - return data_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : data_; - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getData(), - getParentForChildren(), - isClean()); - data_ = null; - } - return dataBuilder_; - } - - private java.lang.Object location_ = ""; - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @return The location. - */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @return The bytes for location. - */ - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @param value The location to set. - * @return This builder for chaining. - */ - public Builder setLocation( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - location_ = value; - onChanged(); - return this; - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @return This builder for chaining. - */ - public Builder clearLocation() { - - location_ = getDefaultInstance().getLocation(); - onChanged(); - return this; - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - location_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.Resource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.Resource) - private static final com.google.cloud.asset.v1.Resource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.Resource(); - } - - public static com.google.cloud.asset.v1.Resource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Resource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.Resource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java deleted file mode 100644 index ba179d56e8d2..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceOrBuilder.java +++ /dev/null @@ -1,199 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface ResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.Resource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - java.lang.String getDiscoveryDocumentUri(); - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes(); - - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - java.lang.String getDiscoveryName(); - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - com.google.protobuf.ByteString - getDiscoveryNameBytes(); - - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - java.lang.String getResourceUrl(); - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - com.google.protobuf.ByteString - getResourceUrlBytes(); - - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - boolean hasData(); - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - com.google.protobuf.Struct getData(); - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - com.google.protobuf.StructOrBuilder getDataOrBuilder(); - - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The location. - */ - java.lang.String getLocation(); - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The bytes for location. - */ - com.google.protobuf.ByteString - getLocationBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java deleted file mode 100644 index 6c2e3b4f661a..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java +++ /dev/null @@ -1,7406 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A result of Resource Search, containing information of a cloud resource.
- * Next ID: 29
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.ResourceSearchResult} - */ -public final class ResourceSearchResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ResourceSearchResult) - ResourceSearchResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use ResourceSearchResult.newBuilder() to construct. - private ResourceSearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ResourceSearchResult() { - name_ = ""; - assetType_ = ""; - project_ = ""; - folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - organization_ = ""; - displayName_ = ""; - description_ = ""; - location_ = ""; - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - kmsKey_ = ""; - state_ = ""; - parentFullResourceName_ = ""; - versionedResources_ = java.util.Collections.emptyList(); - attachedResources_ = java.util.Collections.emptyList(); - tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - parentAssetType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ResourceSearchResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ResourceSearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - networkTags_.add(s); - break; - } - case 74: { - com.google.protobuf.Struct.Builder subBuilder = null; - if (additionalAttributes_ != null) { - subBuilder = additionalAttributes_.toBuilder(); - } - additionalAttributes_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(additionalAttributes_); - additionalAttributes_ = subBuilder.buildPartial(); - } - - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKey_ = s; - break; - } - case 90: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - java.lang.String s = input.readStringRequireUtf8(); - - state_ = s; - break; - } - case 130: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - versionedResources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - versionedResources_.add( - input.readMessage(com.google.cloud.asset.v1.VersionedResource.parser(), extensionRegistry)); - break; - } - case 138: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - folders_.add(s); - break; - } - case 146: { - java.lang.String s = input.readStringRequireUtf8(); - - organization_ = s; - break; - } - case 154: { - java.lang.String s = input.readStringRequireUtf8(); - - parentFullResourceName_ = s; - break; - } - case 162: { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - attachedResources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - attachedResources_.add( - input.readMessage(com.google.cloud.asset.v1.AttachedResource.parser(), extensionRegistry)); - break; - } - case 170: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - relationships_ = com.google.protobuf.MapField.newMapField( - RelationshipsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000020; - } - com.google.protobuf.MapEntry - relationships__ = input.readMessage( - RelationshipsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - relationships_.getMutableMap().put( - relationships__.getKey(), relationships__.getValue()); - break; - } - case 186: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - tagKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - tagKeys_.add(s); - break; - } - case 202: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - tagValues_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - tagValues_.add(s); - break; - } - case 210: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - tagValueIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - tagValueIds_.add(s); - break; - } - case 826: { - java.lang.String s = input.readStringRequireUtf8(); - - parentAssetType_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - folders_ = folders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - attachedResources_ = java.util.Collections.unmodifiableList(attachedResources_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - tagKeys_ = tagKeys_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - tagValues_ = tagValues_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - tagValueIds_ = tagValueIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetLabels(); - case 21: - return internalGetRelationships(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ResourceSearchResult.class, com.google.cloud.asset.v1.ResourceSearchResult.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The full resource name of this resource. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `name`:
-   * * use a field query. Example: `name:instance1`
-   * * use a free text query. Example: `instance1`
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The full resource name of this resource. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `name`:
-   * * use a field query. Example: `name:instance1`
-   * * use a free text query. Example: `instance1`
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of this resource. Example: `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_type` field in your search request.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of this resource. Example: `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_type` field in your search request.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 3; - private volatile java.lang.Object project_; - /** - *
-   * The project that this resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. This field is available when the resource
-   * belongs to a project.
-   * To search against `project`:
-   * * use a field query. Example: `project:12345`
-   * * use a free text query. Example: `12345`
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 3; - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } - } - /** - *
-   * The project that this resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. This field is available when the resource
-   * belongs to a project.
-   * To search against `project`:
-   * * use a field query. Example: `project:12345`
-   * * use a free text query. Example: `12345`
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 3; - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FOLDERS_FIELD_NUMBER = 17; - private com.google.protobuf.LazyStringList folders_; - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @return A list containing the folders. - */ - public com.google.protobuf.ProtocolStringList - getFoldersList() { - return folders_; - } - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @return The count of folders. - */ - public int getFoldersCount() { - return folders_.size(); - } - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @param index The index of the element to return. - * @return The folders at the given index. - */ - public java.lang.String getFolders(int index) { - return folders_.get(index); - } - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @param index The index of the value to return. - * @return The bytes of the folders at the given index. - */ - public com.google.protobuf.ByteString - getFoldersBytes(int index) { - return folders_.getByteString(index); - } - - public static final int ORGANIZATION_FIELD_NUMBER = 18; - private volatile java.lang.Object organization_; - /** - *
-   * The organization that this resource belongs to, in the form of
-   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * resource belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 18; - * @return The organization. - */ - @java.lang.Override - public java.lang.String getOrganization() { - java.lang.Object ref = organization_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - organization_ = s; - return s; - } - } - /** - *
-   * The organization that this resource belongs to, in the form of
-   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * resource belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 18; - * @return The bytes for organization. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrganizationBytes() { - java.lang.Object ref = organization_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - organization_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object displayName_; - /** - *
-   * The display name of this resource. This field is available only when the
-   * resource's Protobuf contains it.
-   * To search against the `display_name`:
-   * * use a field query. Example: `displayName:"My Instance"`
-   * * use a free text query. Example: `"My Instance"`
-   * 
- * - * string display_name = 4; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The display name of this resource. This field is available only when the
-   * resource's Protobuf contains it.
-   * To search against the `display_name`:
-   * * use a field query. Example: `displayName:"My Instance"`
-   * * use a free text query. Example: `"My Instance"`
-   * 
- * - * string display_name = 4; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 5; - private volatile java.lang.Object description_; - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `description`:
-   * * use a field query. Example: `description:"important instance"`
-   * * use a free text query. Example: `"important instance"`
-   * 
- * - * string description = 5; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `description`:
-   * * use a field query. Example: `description:"important instance"`
-   * * use a free text query. Example: `"important instance"`
-   * 
- * - * string description = 5; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCATION_FIELD_NUMBER = 6; - private volatile java.lang.Object location_; - /** - *
-   * Location can be `global`, regional like `us-east1`, or zonal like
-   * `us-west1-b`. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against the `location`:
-   * * use a field query. Example: `location:us-west*`
-   * * use a free text query. Example: `us-west*`
-   * 
- * - * string location = 6; - * @return The location. - */ - @java.lang.Override - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } - } - /** - *
-   * Location can be `global`, regional like `us-east1`, or zonal like
-   * `us-west1-b`. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against the `location`:
-   * * use a field query. Example: `location:us-west*`
-   * * use a free text query. Example: `us-west*`
-   * 
- * - * string location = 6; - * @return The bytes for location. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 7; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int NETWORK_TAGS_FIELD_NUMBER = 8; - private com.google.protobuf.LazyStringList networkTags_; - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @return A list containing the networkTags. - */ - public com.google.protobuf.ProtocolStringList - getNetworkTagsList() { - return networkTags_; - } - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @return The count of networkTags. - */ - public int getNetworkTagsCount() { - return networkTags_.size(); - } - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - public java.lang.String getNetworkTags(int index) { - return networkTags_.get(index); - } - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - public com.google.protobuf.ByteString - getNetworkTagsBytes(int index) { - return networkTags_.getByteString(index); - } - - public static final int KMS_KEY_FIELD_NUMBER = 10; - private volatile java.lang.Object kmsKey_; - /** - *
-   * The Cloud KMS
-   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-   * name or
-   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-   * name. This field is available only when the resource's Protobuf contains
-   * it.
-   * To search against the `kms_key`:
-   * * use a field query. Example: `kmsKey:key`
-   * * use a free text query. Example: `key`
-   * 
- * - * string kms_key = 10; - * @return The kmsKey. - */ - @java.lang.Override - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } - } - /** - *
-   * The Cloud KMS
-   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-   * name or
-   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-   * name. This field is available only when the resource's Protobuf contains
-   * it.
-   * To search against the `kms_key`:
-   * * use a field query. Example: `kmsKey:key`
-   * * use a free text query. Example: `key`
-   * 
- * - * string kms_key = 10; - * @return The bytes for kmsKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 11; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * The create timestamp of this resource, at which the resource was created.
-   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-   * is available only when the resource's Protobuf contains it.
-   * To search against `create_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-   *     - value in date string. Example: `createTime > 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `createTime >
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp create_time = 11; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * The create timestamp of this resource, at which the resource was created.
-   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-   * is available only when the resource's Protobuf contains it.
-   * To search against `create_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-   *     - value in date string. Example: `createTime > 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `createTime >
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp create_time = 11; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * The create timestamp of this resource, at which the resource was created.
-   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-   * is available only when the resource's Protobuf contains it.
-   * To search against `create_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-   *     - value in date string. Example: `createTime > 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `createTime >
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 12; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The last update timestamp of this resource, at which the resource was last
-   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-   * always be 0. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against `update_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-   *     - value in date string. Example: `updateTime < 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `updateTime <
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp update_time = 12; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The last update timestamp of this resource, at which the resource was last
-   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-   * always be 0. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against `update_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-   *     - value in date string. Example: `updateTime < 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `updateTime <
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp update_time = 12; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The last update timestamp of this resource, at which the resource was last
-   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-   * always be 0. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against `update_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-   *     - value in date string. Example: `updateTime < 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `updateTime <
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int STATE_FIELD_NUMBER = 13; - private volatile java.lang.Object state_; - /** - *
-   * The state of this resource. Different resources types have different state
-   * definitions that are mapped from various fields of different resource
-   * types. This field is available only when the resource's Protobuf contains
-   * it.
-   * Example:
-   * If the resource is an instance provided by Compute Engine,
-   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-   * in [API
-   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-   * If the resource is a project provided by Cloud Resource Manager, its state
-   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-   * To search against the `state`:
-   * * use a field query. Example: `state:RUNNING`
-   * * use a free text query. Example: `RUNNING`
-   * 
- * - * string state = 13; - * @return The state. - */ - @java.lang.Override - public java.lang.String getState() { - java.lang.Object ref = state_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - state_ = s; - return s; - } - } - /** - *
-   * The state of this resource. Different resources types have different state
-   * definitions that are mapped from various fields of different resource
-   * types. This field is available only when the resource's Protobuf contains
-   * it.
-   * Example:
-   * If the resource is an instance provided by Compute Engine,
-   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-   * in [API
-   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-   * If the resource is a project provided by Cloud Resource Manager, its state
-   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-   * To search against the `state`:
-   * * use a field query. Example: `state:RUNNING`
-   * * use a free text query. Example: `RUNNING`
-   * 
- * - * string state = 13; - * @return The bytes for state. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDITIONAL_ATTRIBUTES_FIELD_NUMBER = 9; - private com.google.protobuf.Struct additionalAttributes_; - /** - *
-   * The additional searchable attributes of this resource. The attributes may
-   * vary from one resource type to another. Examples: `projectId` for Project,
-   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-   * metadata fields that are returned by the List or Get APIs provided by the
-   * corresponding GCP service (e.g., Compute Engine). see [API references and
-   * supported searchable
-   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-   * to see which fields are included.
-   * You can search values of these fields through free text search. However,
-   * you should not consume the field programically as the field names and
-   * values may change as the GCP service updates to a new incompatible API
-   * version.
-   * To search against the `additional_attributes`:
-   * * use a free text query to match the attributes values. Example: to search
-   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-   *   `foobar`.
-   * 
- * - * .google.protobuf.Struct additional_attributes = 9; - * @return Whether the additionalAttributes field is set. - */ - @java.lang.Override - public boolean hasAdditionalAttributes() { - return additionalAttributes_ != null; - } - /** - *
-   * The additional searchable attributes of this resource. The attributes may
-   * vary from one resource type to another. Examples: `projectId` for Project,
-   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-   * metadata fields that are returned by the List or Get APIs provided by the
-   * corresponding GCP service (e.g., Compute Engine). see [API references and
-   * supported searchable
-   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-   * to see which fields are included.
-   * You can search values of these fields through free text search. However,
-   * you should not consume the field programically as the field names and
-   * values may change as the GCP service updates to a new incompatible API
-   * version.
-   * To search against the `additional_attributes`:
-   * * use a free text query to match the attributes values. Example: to search
-   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-   *   `foobar`.
-   * 
- * - * .google.protobuf.Struct additional_attributes = 9; - * @return The additionalAttributes. - */ - @java.lang.Override - public com.google.protobuf.Struct getAdditionalAttributes() { - return additionalAttributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : additionalAttributes_; - } - /** - *
-   * The additional searchable attributes of this resource. The attributes may
-   * vary from one resource type to another. Examples: `projectId` for Project,
-   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-   * metadata fields that are returned by the List or Get APIs provided by the
-   * corresponding GCP service (e.g., Compute Engine). see [API references and
-   * supported searchable
-   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-   * to see which fields are included.
-   * You can search values of these fields through free text search. However,
-   * you should not consume the field programically as the field names and
-   * values may change as the GCP service updates to a new incompatible API
-   * version.
-   * To search against the `additional_attributes`:
-   * * use a free text query to match the attributes values. Example: to search
-   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-   *   `foobar`.
-   * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { - return getAdditionalAttributes(); - } - - public static final int PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER = 19; - private volatile java.lang.Object parentFullResourceName_; - /** - *
-   * The full resource name of this resource's parent, if it has one.
-   * To search against the `parent_full_resource_name`:
-   * * use a field query. Example:
-   * `parentFullResourceName:"project-name"`
-   * * use a free text query. Example:
-   * `project-name`
-   * 
- * - * string parent_full_resource_name = 19; - * @return The parentFullResourceName. - */ - @java.lang.Override - public java.lang.String getParentFullResourceName() { - java.lang.Object ref = parentFullResourceName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parentFullResourceName_ = s; - return s; - } - } - /** - *
-   * The full resource name of this resource's parent, if it has one.
-   * To search against the `parent_full_resource_name`:
-   * * use a field query. Example:
-   * `parentFullResourceName:"project-name"`
-   * * use a free text query. Example:
-   * `project-name`
-   * 
- * - * string parent_full_resource_name = 19; - * @return The bytes for parentFullResourceName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentFullResourceNameBytes() { - java.lang.Object ref = parentFullResourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parentFullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSIONED_RESOURCES_FIELD_NUMBER = 16; - private java.util.List versionedResources_; - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - @java.lang.Override - public java.util.List getVersionedResourcesList() { - return versionedResources_; - } - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - @java.lang.Override - public java.util.List - getVersionedResourcesOrBuilderList() { - return versionedResources_; - } - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - @java.lang.Override - public int getVersionedResourcesCount() { - return versionedResources_.size(); - } - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { - return versionedResources_.get(index); - } - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( - int index) { - return versionedResources_.get(index); - } - - public static final int ATTACHED_RESOURCES_FIELD_NUMBER = 20; - private java.util.List attachedResources_; - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - @java.lang.Override - public java.util.List getAttachedResourcesList() { - return attachedResources_; - } - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - @java.lang.Override - public java.util.List - getAttachedResourcesOrBuilderList() { - return attachedResources_; - } - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - @java.lang.Override - public int getAttachedResourcesCount() { - return attachedResources_.size(); - } - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index) { - return attachedResources_.get(index); - } - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder( - int index) { - return attachedResources_.get(index); - } - - public static final int RELATIONSHIPS_FIELD_NUMBER = 21; - private static final class RelationshipsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.asset.v1.RelatedResources> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_RelationshipsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.asset.v1.RelatedResources.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.asset.v1.RelatedResources> relationships_; - private com.google.protobuf.MapField - internalGetRelationships() { - if (relationships_ == null) { - return com.google.protobuf.MapField.emptyMapField( - RelationshipsDefaultEntryHolder.defaultEntry); - } - return relationships_; - } - - public int getRelationshipsCount() { - return internalGetRelationships().getMap().size(); - } - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - - @java.lang.Override - public boolean containsRelationships( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetRelationships().getMap().containsKey(key); - } - /** - * Use {@link #getRelationshipsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getRelationships() { - return getRelationshipsMap(); - } - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - @java.lang.Override - - public java.util.Map getRelationshipsMap() { - return internalGetRelationships().getMap(); - } - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( - java.lang.String key, - com.google.cloud.asset.v1.RelatedResources defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetRelationships().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetRelationships().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int TAG_KEYS_FIELD_NUMBER = 23; - private com.google.protobuf.LazyStringList tagKeys_; - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @return A list containing the tagKeys. - */ - public com.google.protobuf.ProtocolStringList - getTagKeysList() { - return tagKeys_; - } - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @return The count of tagKeys. - */ - public int getTagKeysCount() { - return tagKeys_.size(); - } - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @param index The index of the element to return. - * @return The tagKeys at the given index. - */ - public java.lang.String getTagKeys(int index) { - return tagKeys_.get(index); - } - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @param index The index of the value to return. - * @return The bytes of the tagKeys at the given index. - */ - public com.google.protobuf.ByteString - getTagKeysBytes(int index) { - return tagKeys_.getByteString(index); - } - - public static final int TAG_VALUES_FIELD_NUMBER = 25; - private com.google.protobuf.LazyStringList tagValues_; - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @return A list containing the tagValues. - */ - public com.google.protobuf.ProtocolStringList - getTagValuesList() { - return tagValues_; - } - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @return The count of tagValues. - */ - public int getTagValuesCount() { - return tagValues_.size(); - } - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @param index The index of the element to return. - * @return The tagValues at the given index. - */ - public java.lang.String getTagValues(int index) { - return tagValues_.get(index); - } - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @param index The index of the value to return. - * @return The bytes of the tagValues at the given index. - */ - public com.google.protobuf.ByteString - getTagValuesBytes(int index) { - return tagValues_.getByteString(index); - } - - public static final int TAG_VALUE_IDS_FIELD_NUMBER = 26; - private com.google.protobuf.LazyStringList tagValueIds_; - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @return A list containing the tagValueIds. - */ - public com.google.protobuf.ProtocolStringList - getTagValueIdsList() { - return tagValueIds_; - } - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @return The count of tagValueIds. - */ - public int getTagValueIdsCount() { - return tagValueIds_.size(); - } - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @param index The index of the element to return. - * @return The tagValueIds at the given index. - */ - public java.lang.String getTagValueIds(int index) { - return tagValueIds_.get(index); - } - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @param index The index of the value to return. - * @return The bytes of the tagValueIds at the given index. - */ - public com.google.protobuf.ByteString - getTagValueIdsBytes(int index) { - return tagValueIds_.getByteString(index); - } - - public static final int PARENT_ASSET_TYPE_FIELD_NUMBER = 103; - private volatile java.lang.Object parentAssetType_; - /** - *
-   * The type of this resource's immediate parent, if there is one.
-   * To search against the `parent_asset_type`:
-   * * use a field query. Example:
-   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-   * * use a free text query. Example:
-   * `cloudresourcemanager.googleapis.com/Project`
-   * 
- * - * string parent_asset_type = 103; - * @return The parentAssetType. - */ - @java.lang.Override - public java.lang.String getParentAssetType() { - java.lang.Object ref = parentAssetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parentAssetType_ = s; - return s; - } - } - /** - *
-   * The type of this resource's immediate parent, if there is one.
-   * To search against the `parent_asset_type`:
-   * * use a field query. Example:
-   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-   * * use a free text query. Example:
-   * `cloudresourcemanager.googleapis.com/Project`
-   * 
- * - * string parent_asset_type = 103; - * @return The bytes for parentAssetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentAssetTypeBytes() { - java.lang.Object ref = parentAssetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parentAssetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, location_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 7); - for (int i = 0; i < networkTags_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, networkTags_.getRaw(i)); - } - if (additionalAttributes_ != null) { - output.writeMessage(9, getAdditionalAttributes()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, kmsKey_); - } - if (createTime_ != null) { - output.writeMessage(11, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(12, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, state_); - } - for (int i = 0; i < versionedResources_.size(); i++) { - output.writeMessage(16, versionedResources_.get(i)); - } - for (int i = 0; i < folders_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, folders_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 18, organization_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentFullResourceName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 19, parentFullResourceName_); - } - for (int i = 0; i < attachedResources_.size(); i++) { - output.writeMessage(20, attachedResources_.get(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetRelationships(), - RelationshipsDefaultEntryHolder.defaultEntry, - 21); - for (int i = 0; i < tagKeys_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 23, tagKeys_.getRaw(i)); - } - for (int i = 0; i < tagValues_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 25, tagValues_.getRaw(i)); - } - for (int i = 0; i < tagValueIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 26, tagValueIds_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 103, parentAssetType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, location_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, labels__); - } - { - int dataSize = 0; - for (int i = 0; i < networkTags_.size(); i++) { - dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); - } - size += dataSize; - size += 1 * getNetworkTagsList().size(); - } - if (additionalAttributes_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getAdditionalAttributes()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, kmsKey_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, state_); - } - for (int i = 0; i < versionedResources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, versionedResources_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < folders_.size(); i++) { - dataSize += computeStringSizeNoTag(folders_.getRaw(i)); - } - size += dataSize; - size += 2 * getFoldersList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(organization_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, organization_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentFullResourceName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, parentFullResourceName_); - } - for (int i = 0; i < attachedResources_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(20, attachedResources_.get(i)); - } - for (java.util.Map.Entry entry - : internalGetRelationships().getMap().entrySet()) { - com.google.protobuf.MapEntry - relationships__ = RelationshipsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, relationships__); - } - { - int dataSize = 0; - for (int i = 0; i < tagKeys_.size(); i++) { - dataSize += computeStringSizeNoTag(tagKeys_.getRaw(i)); - } - size += dataSize; - size += 2 * getTagKeysList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < tagValues_.size(); i++) { - dataSize += computeStringSizeNoTag(tagValues_.getRaw(i)); - } - size += dataSize; - size += 2 * getTagValuesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < tagValueIds_.size(); i++) { - dataSize += computeStringSizeNoTag(tagValueIds_.getRaw(i)); - } - size += dataSize; - size += 2 * getTagValueIdsList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentAssetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(103, parentAssetType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.ResourceSearchResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.ResourceSearchResult other = (com.google.cloud.asset.v1.ResourceSearchResult) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (!getProject() - .equals(other.getProject())) return false; - if (!getFoldersList() - .equals(other.getFoldersList())) return false; - if (!getOrganization() - .equals(other.getOrganization())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getLocation() - .equals(other.getLocation())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getNetworkTagsList() - .equals(other.getNetworkTagsList())) return false; - if (!getKmsKey() - .equals(other.getKmsKey())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!getState() - .equals(other.getState())) return false; - if (hasAdditionalAttributes() != other.hasAdditionalAttributes()) return false; - if (hasAdditionalAttributes()) { - if (!getAdditionalAttributes() - .equals(other.getAdditionalAttributes())) return false; - } - if (!getParentFullResourceName() - .equals(other.getParentFullResourceName())) return false; - if (!getVersionedResourcesList() - .equals(other.getVersionedResourcesList())) return false; - if (!getAttachedResourcesList() - .equals(other.getAttachedResourcesList())) return false; - if (!internalGetRelationships().equals( - other.internalGetRelationships())) return false; - if (!getTagKeysList() - .equals(other.getTagKeysList())) return false; - if (!getTagValuesList() - .equals(other.getTagValuesList())) return false; - if (!getTagValueIdsList() - .equals(other.getTagValueIdsList())) return false; - if (!getParentAssetType() - .equals(other.getParentAssetType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - if (getFoldersCount() > 0) { - hash = (37 * hash) + FOLDERS_FIELD_NUMBER; - hash = (53 * hash) + getFoldersList().hashCode(); - } - hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; - hash = (53 * hash) + getOrganization().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (getNetworkTagsCount() > 0) { - hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; - hash = (53 * hash) + getNetworkTagsList().hashCode(); - } - hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; - hash = (53 * hash) + getKmsKey().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + getState().hashCode(); - if (hasAdditionalAttributes()) { - hash = (37 * hash) + ADDITIONAL_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getAdditionalAttributes().hashCode(); - } - hash = (37 * hash) + PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getParentFullResourceName().hashCode(); - if (getVersionedResourcesCount() > 0) { - hash = (37 * hash) + VERSIONED_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getVersionedResourcesList().hashCode(); - } - if (getAttachedResourcesCount() > 0) { - hash = (37 * hash) + ATTACHED_RESOURCES_FIELD_NUMBER; - hash = (53 * hash) + getAttachedResourcesList().hashCode(); - } - if (!internalGetRelationships().getMap().isEmpty()) { - hash = (37 * hash) + RELATIONSHIPS_FIELD_NUMBER; - hash = (53 * hash) + internalGetRelationships().hashCode(); - } - if (getTagKeysCount() > 0) { - hash = (37 * hash) + TAG_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getTagKeysList().hashCode(); - } - if (getTagValuesCount() > 0) { - hash = (37 * hash) + TAG_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getTagValuesList().hashCode(); - } - if (getTagValueIdsCount() > 0) { - hash = (37 * hash) + TAG_VALUE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getTagValueIdsList().hashCode(); - } - hash = (37 * hash) + PARENT_ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getParentAssetType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.ResourceSearchResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.ResourceSearchResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A result of Resource Search, containing information of a cloud resource.
-   * Next ID: 29
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.ResourceSearchResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ResourceSearchResult) - com.google.cloud.asset.v1.ResourceSearchResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetLabels(); - case 21: - return internalGetRelationships(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 7: - return internalGetMutableLabels(); - case 21: - return internalGetMutableRelationships(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.ResourceSearchResult.class, com.google.cloud.asset.v1.ResourceSearchResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.ResourceSearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getVersionedResourcesFieldBuilder(); - getAttachedResourcesFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assetType_ = ""; - - project_ = ""; - - folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - organization_ = ""; - - displayName_ = ""; - - description_ = ""; - - location_ = ""; - - internalGetMutableLabels().clear(); - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - kmsKey_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - state_ = ""; - - if (additionalAttributesBuilder_ == null) { - additionalAttributes_ = null; - } else { - additionalAttributes_ = null; - additionalAttributesBuilder_ = null; - } - parentFullResourceName_ = ""; - - if (versionedResourcesBuilder_ == null) { - versionedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - versionedResourcesBuilder_.clear(); - } - if (attachedResourcesBuilder_ == null) { - attachedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - attachedResourcesBuilder_.clear(); - } - internalGetMutableRelationships().clear(); - tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000080); - tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - parentAssetType_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.ResourceSearchResult build() { - com.google.cloud.asset.v1.ResourceSearchResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ResourceSearchResult buildPartial() { - com.google.cloud.asset.v1.ResourceSearchResult result = new com.google.cloud.asset.v1.ResourceSearchResult(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.assetType_ = assetType_; - result.project_ = project_; - if (((bitField0_ & 0x00000001) != 0)) { - folders_ = folders_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.folders_ = folders_; - result.organization_ = organization_; - result.displayName_ = displayName_; - result.description_ = description_; - result.location_ = location_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (((bitField0_ & 0x00000004) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.networkTags_ = networkTags_; - result.kmsKey_ = kmsKey_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.state_ = state_; - if (additionalAttributesBuilder_ == null) { - result.additionalAttributes_ = additionalAttributes_; - } else { - result.additionalAttributes_ = additionalAttributesBuilder_.build(); - } - result.parentFullResourceName_ = parentFullResourceName_; - if (versionedResourcesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - versionedResources_ = java.util.Collections.unmodifiableList(versionedResources_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.versionedResources_ = versionedResources_; - } else { - result.versionedResources_ = versionedResourcesBuilder_.build(); - } - if (attachedResourcesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - attachedResources_ = java.util.Collections.unmodifiableList(attachedResources_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.attachedResources_ = attachedResources_; - } else { - result.attachedResources_ = attachedResourcesBuilder_.build(); - } - result.relationships_ = internalGetRelationships(); - result.relationships_.makeImmutable(); - if (((bitField0_ & 0x00000040) != 0)) { - tagKeys_ = tagKeys_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.tagKeys_ = tagKeys_; - if (((bitField0_ & 0x00000080) != 0)) { - tagValues_ = tagValues_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.tagValues_ = tagValues_; - if (((bitField0_ & 0x00000100) != 0)) { - tagValueIds_ = tagValueIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.tagValueIds_ = tagValueIds_; - result.parentAssetType_ = parentAssetType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.ResourceSearchResult) { - return mergeFrom((com.google.cloud.asset.v1.ResourceSearchResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.ResourceSearchResult other) { - if (other == com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - onChanged(); - } - if (!other.folders_.isEmpty()) { - if (folders_.isEmpty()) { - folders_ = other.folders_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFoldersIsMutable(); - folders_.addAll(other.folders_); - } - onChanged(); - } - if (!other.getOrganization().isEmpty()) { - organization_ = other.organization_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getLocation().isEmpty()) { - location_ = other.location_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (!other.networkTags_.isEmpty()) { - if (networkTags_.isEmpty()) { - networkTags_ = other.networkTags_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNetworkTagsIsMutable(); - networkTags_.addAll(other.networkTags_); - } - onChanged(); - } - if (!other.getKmsKey().isEmpty()) { - kmsKey_ = other.kmsKey_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getState().isEmpty()) { - state_ = other.state_; - onChanged(); - } - if (other.hasAdditionalAttributes()) { - mergeAdditionalAttributes(other.getAdditionalAttributes()); - } - if (!other.getParentFullResourceName().isEmpty()) { - parentFullResourceName_ = other.parentFullResourceName_; - onChanged(); - } - if (versionedResourcesBuilder_ == null) { - if (!other.versionedResources_.isEmpty()) { - if (versionedResources_.isEmpty()) { - versionedResources_ = other.versionedResources_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureVersionedResourcesIsMutable(); - versionedResources_.addAll(other.versionedResources_); - } - onChanged(); - } - } else { - if (!other.versionedResources_.isEmpty()) { - if (versionedResourcesBuilder_.isEmpty()) { - versionedResourcesBuilder_.dispose(); - versionedResourcesBuilder_ = null; - versionedResources_ = other.versionedResources_; - bitField0_ = (bitField0_ & ~0x00000008); - versionedResourcesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVersionedResourcesFieldBuilder() : null; - } else { - versionedResourcesBuilder_.addAllMessages(other.versionedResources_); - } - } - } - if (attachedResourcesBuilder_ == null) { - if (!other.attachedResources_.isEmpty()) { - if (attachedResources_.isEmpty()) { - attachedResources_ = other.attachedResources_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureAttachedResourcesIsMutable(); - attachedResources_.addAll(other.attachedResources_); - } - onChanged(); - } - } else { - if (!other.attachedResources_.isEmpty()) { - if (attachedResourcesBuilder_.isEmpty()) { - attachedResourcesBuilder_.dispose(); - attachedResourcesBuilder_ = null; - attachedResources_ = other.attachedResources_; - bitField0_ = (bitField0_ & ~0x00000010); - attachedResourcesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAttachedResourcesFieldBuilder() : null; - } else { - attachedResourcesBuilder_.addAllMessages(other.attachedResources_); - } - } - } - internalGetMutableRelationships().mergeFrom( - other.internalGetRelationships()); - if (!other.tagKeys_.isEmpty()) { - if (tagKeys_.isEmpty()) { - tagKeys_ = other.tagKeys_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureTagKeysIsMutable(); - tagKeys_.addAll(other.tagKeys_); - } - onChanged(); - } - if (!other.tagValues_.isEmpty()) { - if (tagValues_.isEmpty()) { - tagValues_ = other.tagValues_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureTagValuesIsMutable(); - tagValues_.addAll(other.tagValues_); - } - onChanged(); - } - if (!other.tagValueIds_.isEmpty()) { - if (tagValueIds_.isEmpty()) { - tagValueIds_ = other.tagValueIds_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureTagValueIdsIsMutable(); - tagValueIds_.addAll(other.tagValueIds_); - } - onChanged(); - } - if (!other.getParentAssetType().isEmpty()) { - parentAssetType_ = other.parentAssetType_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.ResourceSearchResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.ResourceSearchResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The full resource name of this resource. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `name`:
-     * * use a field query. Example: `name:instance1`
-     * * use a free text query. Example: `instance1`
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full resource name of this resource. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `name`:
-     * * use a field query. Example: `name:instance1`
-     * * use a free text query. Example: `instance1`
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full resource name of this resource. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `name`:
-     * * use a field query. Example: `name:instance1`
-     * * use a free text query. Example: `instance1`
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The full resource name of this resource. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `name`:
-     * * use a field query. Example: `name:instance1`
-     * * use a free text query. Example: `instance1`
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The full resource name of this resource. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Cloud Asset Inventory Resource Name
-     * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-     * for more information.
-     * To search against the `name`:
-     * * use a field query. Example: `name:instance1`
-     * * use a free text query. Example: `instance1`
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of this resource. Example: `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_type` field in your search request.
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of this resource. Example: `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_type` field in your search request.
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of this resource. Example: `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_type` field in your search request.
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of this resource. Example: `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_type` field in your search request.
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of this resource. Example: `compute.googleapis.com/Disk`.
-     * To search against the `asset_type`:
-     * * specify the `asset_type` field in your search request.
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - *
-     * The project that this resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. This field is available when the resource
-     * belongs to a project.
-     * To search against `project`:
-     * * use a field query. Example: `project:12345`
-     * * use a free text query. Example: `12345`
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 3; - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. This field is available when the resource
-     * belongs to a project.
-     * To search against `project`:
-     * * use a field query. Example: `project:12345`
-     * * use a free text query. Example: `12345`
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 3; - * @return The bytes for project. - */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. This field is available when the resource
-     * belongs to a project.
-     * To search against `project`:
-     * * use a field query. Example: `project:12345`
-     * * use a free text query. Example: `12345`
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 3; - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - project_ = value; - onChanged(); - return this; - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. This field is available when the resource
-     * belongs to a project.
-     * To search against `project`:
-     * * use a field query. Example: `project:12345`
-     * * use a free text query. Example: `12345`
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 3; - * @return This builder for chaining. - */ - public Builder clearProject() { - - project_ = getDefaultInstance().getProject(); - onChanged(); - return this; - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * projects/{PROJECT_NUMBER}. This field is available when the resource
-     * belongs to a project.
-     * To search against `project`:
-     * * use a field query. Example: `project:12345`
-     * * use a free text query. Example: `12345`
-     * * specify the `scope` field as this project in your search request.
-     * 
- * - * string project = 3; - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - project_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureFoldersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - folders_ = new com.google.protobuf.LazyStringArrayList(folders_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @return A list containing the folders. - */ - public com.google.protobuf.ProtocolStringList - getFoldersList() { - return folders_.getUnmodifiableView(); - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @return The count of folders. - */ - public int getFoldersCount() { - return folders_.size(); - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @param index The index of the element to return. - * @return The folders at the given index. - */ - public java.lang.String getFolders(int index) { - return folders_.get(index); - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @param index The index of the value to return. - * @return The bytes of the folders at the given index. - */ - public com.google.protobuf.ByteString - getFoldersBytes(int index) { - return folders_.getByteString(index); - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @param index The index to set the value at. - * @param value The folders to set. - * @return This builder for chaining. - */ - public Builder setFolders( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFoldersIsMutable(); - folders_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @param value The folders to add. - * @return This builder for chaining. - */ - public Builder addFolders( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFoldersIsMutable(); - folders_.add(value); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @param values The folders to add. - * @return This builder for chaining. - */ - public Builder addAllFolders( - java.lang.Iterable values) { - ensureFoldersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, folders_); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @return This builder for chaining. - */ - public Builder clearFolders() { - folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The folder(s) that this resource belongs to, in the form of
-     * folders/{FOLDER_NUMBER}. This field is available when the resource
-     * belongs to one or more folders.
-     * To search against `folders`:
-     * * use a field query. Example: `folders:(123 OR 456)`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this folder in your search request.
-     * 
- * - * repeated string folders = 17; - * @param value The bytes of the folders to add. - * @return This builder for chaining. - */ - public Builder addFoldersBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureFoldersIsMutable(); - folders_.add(value); - onChanged(); - return this; - } - - private java.lang.Object organization_ = ""; - /** - *
-     * The organization that this resource belongs to, in the form of
-     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * resource belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 18; - * @return The organization. - */ - public java.lang.String getOrganization() { - java.lang.Object ref = organization_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - organization_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The organization that this resource belongs to, in the form of
-     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * resource belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 18; - * @return The bytes for organization. - */ - public com.google.protobuf.ByteString - getOrganizationBytes() { - java.lang.Object ref = organization_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - organization_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The organization that this resource belongs to, in the form of
-     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * resource belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 18; - * @param value The organization to set. - * @return This builder for chaining. - */ - public Builder setOrganization( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - organization_ = value; - onChanged(); - return this; - } - /** - *
-     * The organization that this resource belongs to, in the form of
-     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * resource belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 18; - * @return This builder for chaining. - */ - public Builder clearOrganization() { - - organization_ = getDefaultInstance().getOrganization(); - onChanged(); - return this; - } - /** - *
-     * The organization that this resource belongs to, in the form of
-     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-     * resource belongs to an organization.
-     * To search against `organization`:
-     * * use a field query. Example: `organization:123`
-     * * use a free text query. Example: `123`
-     * * specify the `scope` field as this organization in your search request.
-     * 
- * - * string organization = 18; - * @param value The bytes for organization to set. - * @return This builder for chaining. - */ - public Builder setOrganizationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - organization_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The display name of this resource. This field is available only when the
-     * resource's Protobuf contains it.
-     * To search against the `display_name`:
-     * * use a field query. Example: `displayName:"My Instance"`
-     * * use a free text query. Example: `"My Instance"`
-     * 
- * - * string display_name = 4; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The display name of this resource. This field is available only when the
-     * resource's Protobuf contains it.
-     * To search against the `display_name`:
-     * * use a field query. Example: `displayName:"My Instance"`
-     * * use a free text query. Example: `"My Instance"`
-     * 
- * - * string display_name = 4; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The display name of this resource. This field is available only when the
-     * resource's Protobuf contains it.
-     * To search against the `display_name`:
-     * * use a field query. Example: `displayName:"My Instance"`
-     * * use a free text query. Example: `"My Instance"`
-     * 
- * - * string display_name = 4; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The display name of this resource. This field is available only when the
-     * resource's Protobuf contains it.
-     * To search against the `display_name`:
-     * * use a field query. Example: `displayName:"My Instance"`
-     * * use a free text query. Example: `"My Instance"`
-     * 
- * - * string display_name = 4; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The display name of this resource. This field is available only when the
-     * resource's Protobuf contains it.
-     * To search against the `display_name`:
-     * * use a field query. Example: `displayName:"My Instance"`
-     * * use a free text query. Example: `"My Instance"`
-     * 
- * - * string display_name = 4; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `description`:
-     * * use a field query. Example: `description:"important instance"`
-     * * use a free text query. Example: `"important instance"`
-     * 
- * - * string description = 5; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `description`:
-     * * use a field query. Example: `description:"important instance"`
-     * * use a free text query. Example: `"important instance"`
-     * 
- * - * string description = 5; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `description`:
-     * * use a field query. Example: `description:"important instance"`
-     * * use a free text query. Example: `"important instance"`
-     * 
- * - * string description = 5; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `description`:
-     * * use a field query. Example: `description:"important instance"`
-     * * use a free text query. Example: `"important instance"`
-     * 
- * - * string description = 5; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `description`:
-     * * use a field query. Example: `description:"important instance"`
-     * * use a free text query. Example: `"important instance"`
-     * 
- * - * string description = 5; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object location_ = ""; - /** - *
-     * Location can be `global`, regional like `us-east1`, or zonal like
-     * `us-west1-b`. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against the `location`:
-     * * use a field query. Example: `location:us-west*`
-     * * use a free text query. Example: `us-west*`
-     * 
- * - * string location = 6; - * @return The location. - */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Location can be `global`, regional like `us-east1`, or zonal like
-     * `us-west1-b`. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against the `location`:
-     * * use a field query. Example: `location:us-west*`
-     * * use a free text query. Example: `us-west*`
-     * 
- * - * string location = 6; - * @return The bytes for location. - */ - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Location can be `global`, regional like `us-east1`, or zonal like
-     * `us-west1-b`. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against the `location`:
-     * * use a field query. Example: `location:us-west*`
-     * * use a free text query. Example: `us-west*`
-     * 
- * - * string location = 6; - * @param value The location to set. - * @return This builder for chaining. - */ - public Builder setLocation( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - location_ = value; - onChanged(); - return this; - } - /** - *
-     * Location can be `global`, regional like `us-east1`, or zonal like
-     * `us-west1-b`. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against the `location`:
-     * * use a field query. Example: `location:us-west*`
-     * * use a free text query. Example: `us-west*`
-     * 
- * - * string location = 6; - * @return This builder for chaining. - */ - public Builder clearLocation() { - - location_ = getDefaultInstance().getLocation(); - onChanged(); - return this; - } - /** - *
-     * Location can be `global`, regional like `us-east1`, or zonal like
-     * `us-west1-b`. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against the `location`:
-     * * use a field query. Example: `location:us-west*`
-     * * use a free text query. Example: `us-west*`
-     * 
- * - * string location = 6; - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - location_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `labels`:
-     * * use a field query:
-     *     - query on any label's key or value. Example: `labels:prod`
-     *     - query by a given label. Example: `labels.env:prod`
-     *     - query by a given label's existence. Example: `labels.env:*`
-     * * use a free text query. Example: `prod`
-     * 
- * - * map<string, string> labels = 7; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `labels`:
-     * * use a field query:
-     *     - query on any label's key or value. Example: `labels:prod`
-     *     - query by a given label. Example: `labels.env:prod`
-     *     - query by a given label's existence. Example: `labels.env:*`
-     * * use a free text query. Example: `prod`
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `labels`:
-     * * use a field query:
-     *     - query on any label's key or value. Example: `labels:prod`
-     *     - query by a given label. Example: `labels.env:prod`
-     *     - query by a given label's existence. Example: `labels.env:*`
-     * * use a free text query. Example: `prod`
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `labels`:
-     * * use a field query:
-     *     - query on any label's key or value. Example: `labels:prod`
-     *     - query by a given label. Example: `labels.env:prod`
-     *     - query by a given label's existence. Example: `labels.env:*`
-     * * use a free text query. Example: `prod`
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `labels`:
-     * * use a field query:
-     *     - query on any label's key or value. Example: `labels:prod`
-     *     - query by a given label. Example: `labels.env:prod`
-     *     - query by a given label's existence. Example: `labels.env:*`
-     * * use a free text query. Example: `prod`
-     * 
- * - * map<string, string> labels = 7; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `labels`:
-     * * use a field query:
-     *     - query on any label's key or value. Example: `labels:prod`
-     *     - query by a given label. Example: `labels.env:prod`
-     *     - query by a given label's existence. Example: `labels.env:*`
-     * * use a free text query. Example: `prod`
-     * 
- * - * map<string, string> labels = 7; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `labels`:
-     * * use a field query:
-     *     - query on any label's key or value. Example: `labels:prod`
-     *     - query by a given label. Example: `labels.env:prod`
-     *     - query by a given label's existence. Example: `labels.env:*`
-     * * use a free text query. Example: `prod`
-     * 
- * - * map<string, string> labels = 7; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureNetworkTagsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @return A list containing the networkTags. - */ - public com.google.protobuf.ProtocolStringList - getNetworkTagsList() { - return networkTags_.getUnmodifiableView(); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @return The count of networkTags. - */ - public int getNetworkTagsCount() { - return networkTags_.size(); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - public java.lang.String getNetworkTags(int index) { - return networkTags_.get(index); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - public com.google.protobuf.ByteString - getNetworkTagsBytes(int index) { - return networkTags_.getByteString(index); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @param index The index to set the value at. - * @param value The networkTags to set. - * @return This builder for chaining. - */ - public Builder setNetworkTags( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworkTagsIsMutable(); - networkTags_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @param value The networkTags to add. - * @return This builder for chaining. - */ - public Builder addNetworkTags( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworkTagsIsMutable(); - networkTags_.add(value); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @param values The networkTags to add. - * @return This builder for chaining. - */ - public Builder addAllNetworkTags( - java.lang.Iterable values) { - ensureNetworkTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, networkTags_); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @return This builder for chaining. - */ - public Builder clearNetworkTags() { - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information. This field is available only when the resource's
-     * Protobuf contains it.
-     * To search against the `network_tags`:
-     * * use a field query. Example: `networkTags:internal`
-     * * use a free text query. Example: `internal`
-     * 
- * - * repeated string network_tags = 8; - * @param value The bytes of the networkTags to add. - * @return This builder for chaining. - */ - public Builder addNetworkTagsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureNetworkTagsIsMutable(); - networkTags_.add(value); - onChanged(); - return this; - } - - private java.lang.Object kmsKey_ = ""; - /** - *
-     * The Cloud KMS
-     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-     * name or
-     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-     * name. This field is available only when the resource's Protobuf contains
-     * it.
-     * To search against the `kms_key`:
-     * * use a field query. Example: `kmsKey:key`
-     * * use a free text query. Example: `key`
-     * 
- * - * string kms_key = 10; - * @return The kmsKey. - */ - public java.lang.String getKmsKey() { - java.lang.Object ref = kmsKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kmsKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The Cloud KMS
-     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-     * name or
-     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-     * name. This field is available only when the resource's Protobuf contains
-     * it.
-     * To search against the `kms_key`:
-     * * use a field query. Example: `kmsKey:key`
-     * * use a free text query. Example: `key`
-     * 
- * - * string kms_key = 10; - * @return The bytes for kmsKey. - */ - public com.google.protobuf.ByteString - getKmsKeyBytes() { - java.lang.Object ref = kmsKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kmsKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The Cloud KMS
-     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-     * name or
-     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-     * name. This field is available only when the resource's Protobuf contains
-     * it.
-     * To search against the `kms_key`:
-     * * use a field query. Example: `kmsKey:key`
-     * * use a free text query. Example: `key`
-     * 
- * - * string kms_key = 10; - * @param value The kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kmsKey_ = value; - onChanged(); - return this; - } - /** - *
-     * The Cloud KMS
-     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-     * name or
-     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-     * name. This field is available only when the resource's Protobuf contains
-     * it.
-     * To search against the `kms_key`:
-     * * use a field query. Example: `kmsKey:key`
-     * * use a free text query. Example: `key`
-     * 
- * - * string kms_key = 10; - * @return This builder for chaining. - */ - public Builder clearKmsKey() { - - kmsKey_ = getDefaultInstance().getKmsKey(); - onChanged(); - return this; - } - /** - *
-     * The Cloud KMS
-     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-     * name or
-     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-     * name. This field is available only when the resource's Protobuf contains
-     * it.
-     * To search against the `kms_key`:
-     * * use a field query. Example: `kmsKey:key`
-     * * use a free text query. Example: `key`
-     * 
- * - * string kms_key = 10; - * @param value The bytes for kmsKey to set. - * @return This builder for chaining. - */ - public Builder setKmsKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kmsKey_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * The create timestamp of this resource, at which the resource was created.
-     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-     * is available only when the resource's Protobuf contains it.
-     * To search against `create_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-     *     - value in date string. Example: `createTime > 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `createTime >
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The last update timestamp of this resource, at which the resource was last
-     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-     * always be 0. This field is available only when the resource's Protobuf
-     * contains it.
-     * To search against `update_time`:
-     * * use a field query.
-     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-     *     - value in date string. Example: `updateTime < 2021-01-01`
-     *     - value in date-time string (must be quoted). Example: `updateTime <
-     *     "2021-01-01T00:00:00"`
-     * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object state_ = ""; - /** - *
-     * The state of this resource. Different resources types have different state
-     * definitions that are mapped from various fields of different resource
-     * types. This field is available only when the resource's Protobuf contains
-     * it.
-     * Example:
-     * If the resource is an instance provided by Compute Engine,
-     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-     * in [API
-     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-     * If the resource is a project provided by Cloud Resource Manager, its state
-     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-     * To search against the `state`:
-     * * use a field query. Example: `state:RUNNING`
-     * * use a free text query. Example: `RUNNING`
-     * 
- * - * string state = 13; - * @return The state. - */ - public java.lang.String getState() { - java.lang.Object ref = state_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - state_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The state of this resource. Different resources types have different state
-     * definitions that are mapped from various fields of different resource
-     * types. This field is available only when the resource's Protobuf contains
-     * it.
-     * Example:
-     * If the resource is an instance provided by Compute Engine,
-     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-     * in [API
-     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-     * If the resource is a project provided by Cloud Resource Manager, its state
-     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-     * To search against the `state`:
-     * * use a field query. Example: `state:RUNNING`
-     * * use a free text query. Example: `RUNNING`
-     * 
- * - * string state = 13; - * @return The bytes for state. - */ - public com.google.protobuf.ByteString - getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The state of this resource. Different resources types have different state
-     * definitions that are mapped from various fields of different resource
-     * types. This field is available only when the resource's Protobuf contains
-     * it.
-     * Example:
-     * If the resource is an instance provided by Compute Engine,
-     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-     * in [API
-     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-     * If the resource is a project provided by Cloud Resource Manager, its state
-     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-     * To search against the `state`:
-     * * use a field query. Example: `state:RUNNING`
-     * * use a free text query. Example: `RUNNING`
-     * 
- * - * string state = 13; - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value; - onChanged(); - return this; - } - /** - *
-     * The state of this resource. Different resources types have different state
-     * definitions that are mapped from various fields of different resource
-     * types. This field is available only when the resource's Protobuf contains
-     * it.
-     * Example:
-     * If the resource is an instance provided by Compute Engine,
-     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-     * in [API
-     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-     * If the resource is a project provided by Cloud Resource Manager, its state
-     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-     * To search against the `state`:
-     * * use a field query. Example: `state:RUNNING`
-     * * use a free text query. Example: `RUNNING`
-     * 
- * - * string state = 13; - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = getDefaultInstance().getState(); - onChanged(); - return this; - } - /** - *
-     * The state of this resource. Different resources types have different state
-     * definitions that are mapped from various fields of different resource
-     * types. This field is available only when the resource's Protobuf contains
-     * it.
-     * Example:
-     * If the resource is an instance provided by Compute Engine,
-     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-     * in [API
-     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-     * If the resource is a project provided by Cloud Resource Manager, its state
-     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-     * To search against the `state`:
-     * * use a field query. Example: `state:RUNNING`
-     * * use a free text query. Example: `RUNNING`
-     * 
- * - * string state = 13; - * @param value The bytes for state to set. - * @return This builder for chaining. - */ - public Builder setStateBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - state_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Struct additionalAttributes_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> additionalAttributesBuilder_; - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - * @return Whether the additionalAttributes field is set. - */ - public boolean hasAdditionalAttributes() { - return additionalAttributesBuilder_ != null || additionalAttributes_ != null; - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - * @return The additionalAttributes. - */ - public com.google.protobuf.Struct getAdditionalAttributes() { - if (additionalAttributesBuilder_ == null) { - return additionalAttributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : additionalAttributes_; - } else { - return additionalAttributesBuilder_.getMessage(); - } - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - public Builder setAdditionalAttributes(com.google.protobuf.Struct value) { - if (additionalAttributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - additionalAttributes_ = value; - onChanged(); - } else { - additionalAttributesBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - public Builder setAdditionalAttributes( - com.google.protobuf.Struct.Builder builderForValue) { - if (additionalAttributesBuilder_ == null) { - additionalAttributes_ = builderForValue.build(); - onChanged(); - } else { - additionalAttributesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - public Builder mergeAdditionalAttributes(com.google.protobuf.Struct value) { - if (additionalAttributesBuilder_ == null) { - if (additionalAttributes_ != null) { - additionalAttributes_ = - com.google.protobuf.Struct.newBuilder(additionalAttributes_).mergeFrom(value).buildPartial(); - } else { - additionalAttributes_ = value; - } - onChanged(); - } else { - additionalAttributesBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - public Builder clearAdditionalAttributes() { - if (additionalAttributesBuilder_ == null) { - additionalAttributes_ = null; - onChanged(); - } else { - additionalAttributes_ = null; - additionalAttributesBuilder_ = null; - } - - return this; - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - public com.google.protobuf.Struct.Builder getAdditionalAttributesBuilder() { - - onChanged(); - return getAdditionalAttributesFieldBuilder().getBuilder(); - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { - if (additionalAttributesBuilder_ != null) { - return additionalAttributesBuilder_.getMessageOrBuilder(); - } else { - return additionalAttributes_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : additionalAttributes_; - } - } - /** - *
-     * The additional searchable attributes of this resource. The attributes may
-     * vary from one resource type to another. Examples: `projectId` for Project,
-     * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-     * metadata fields that are returned by the List or Get APIs provided by the
-     * corresponding GCP service (e.g., Compute Engine). see [API references and
-     * supported searchable
-     * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-     * to see which fields are included.
-     * You can search values of these fields through free text search. However,
-     * you should not consume the field programically as the field names and
-     * values may change as the GCP service updates to a new incompatible API
-     * version.
-     * To search against the `additional_attributes`:
-     * * use a free text query to match the attributes values. Example: to search
-     *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-     *   `foobar`.
-     * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getAdditionalAttributesFieldBuilder() { - if (additionalAttributesBuilder_ == null) { - additionalAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getAdditionalAttributes(), - getParentForChildren(), - isClean()); - additionalAttributes_ = null; - } - return additionalAttributesBuilder_; - } - - private java.lang.Object parentFullResourceName_ = ""; - /** - *
-     * The full resource name of this resource's parent, if it has one.
-     * To search against the `parent_full_resource_name`:
-     * * use a field query. Example:
-     * `parentFullResourceName:"project-name"`
-     * * use a free text query. Example:
-     * `project-name`
-     * 
- * - * string parent_full_resource_name = 19; - * @return The parentFullResourceName. - */ - public java.lang.String getParentFullResourceName() { - java.lang.Object ref = parentFullResourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parentFullResourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full resource name of this resource's parent, if it has one.
-     * To search against the `parent_full_resource_name`:
-     * * use a field query. Example:
-     * `parentFullResourceName:"project-name"`
-     * * use a free text query. Example:
-     * `project-name`
-     * 
- * - * string parent_full_resource_name = 19; - * @return The bytes for parentFullResourceName. - */ - public com.google.protobuf.ByteString - getParentFullResourceNameBytes() { - java.lang.Object ref = parentFullResourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parentFullResourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full resource name of this resource's parent, if it has one.
-     * To search against the `parent_full_resource_name`:
-     * * use a field query. Example:
-     * `parentFullResourceName:"project-name"`
-     * * use a free text query. Example:
-     * `project-name`
-     * 
- * - * string parent_full_resource_name = 19; - * @param value The parentFullResourceName to set. - * @return This builder for chaining. - */ - public Builder setParentFullResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parentFullResourceName_ = value; - onChanged(); - return this; - } - /** - *
-     * The full resource name of this resource's parent, if it has one.
-     * To search against the `parent_full_resource_name`:
-     * * use a field query. Example:
-     * `parentFullResourceName:"project-name"`
-     * * use a free text query. Example:
-     * `project-name`
-     * 
- * - * string parent_full_resource_name = 19; - * @return This builder for chaining. - */ - public Builder clearParentFullResourceName() { - - parentFullResourceName_ = getDefaultInstance().getParentFullResourceName(); - onChanged(); - return this; - } - /** - *
-     * The full resource name of this resource's parent, if it has one.
-     * To search against the `parent_full_resource_name`:
-     * * use a field query. Example:
-     * `parentFullResourceName:"project-name"`
-     * * use a free text query. Example:
-     * `project-name`
-     * 
- * - * string parent_full_resource_name = 19; - * @param value The bytes for parentFullResourceName to set. - * @return This builder for chaining. - */ - public Builder setParentFullResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parentFullResourceName_ = value; - onChanged(); - return this; - } - - private java.util.List versionedResources_ = - java.util.Collections.emptyList(); - private void ensureVersionedResourcesIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - versionedResources_ = new java.util.ArrayList(versionedResources_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> versionedResourcesBuilder_; - - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public java.util.List getVersionedResourcesList() { - if (versionedResourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(versionedResources_); - } else { - return versionedResourcesBuilder_.getMessageList(); - } - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public int getVersionedResourcesCount() { - if (versionedResourcesBuilder_ == null) { - return versionedResources_.size(); - } else { - return versionedResourcesBuilder_.getCount(); - } - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index) { - if (versionedResourcesBuilder_ == null) { - return versionedResources_.get(index); - } else { - return versionedResourcesBuilder_.getMessage(index); - } - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder setVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource value) { - if (versionedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionedResourcesIsMutable(); - versionedResources_.set(index, value); - onChanged(); - } else { - versionedResourcesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder setVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.set(index, builderForValue.build()); - onChanged(); - } else { - versionedResourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder addVersionedResources(com.google.cloud.asset.v1.VersionedResource value) { - if (versionedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionedResourcesIsMutable(); - versionedResources_.add(value); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder addVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource value) { - if (versionedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVersionedResourcesIsMutable(); - versionedResources_.add(index, value); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder addVersionedResources( - com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.add(builderForValue.build()); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder addVersionedResources( - int index, com.google.cloud.asset.v1.VersionedResource.Builder builderForValue) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.add(index, builderForValue.build()); - onChanged(); - } else { - versionedResourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder addAllVersionedResources( - java.lang.Iterable values) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, versionedResources_); - onChanged(); - } else { - versionedResourcesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder clearVersionedResources() { - if (versionedResourcesBuilder_ == null) { - versionedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - versionedResourcesBuilder_.clear(); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public Builder removeVersionedResources(int index) { - if (versionedResourcesBuilder_ == null) { - ensureVersionedResourcesIsMutable(); - versionedResources_.remove(index); - onChanged(); - } else { - versionedResourcesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public com.google.cloud.asset.v1.VersionedResource.Builder getVersionedResourcesBuilder( - int index) { - return getVersionedResourcesFieldBuilder().getBuilder(index); - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( - int index) { - if (versionedResourcesBuilder_ == null) { - return versionedResources_.get(index); } else { - return versionedResourcesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public java.util.List - getVersionedResourcesOrBuilderList() { - if (versionedResourcesBuilder_ != null) { - return versionedResourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(versionedResources_); - } - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder() { - return getVersionedResourcesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public com.google.cloud.asset.v1.VersionedResource.Builder addVersionedResourcesBuilder( - int index) { - return getVersionedResourcesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()); - } - /** - *
-     * Versioned resource representations of this resource. This is repeated
-     * because there could be multiple versions of resource representations during
-     * version migration.
-     * This `versioned_resources` field is not searchable. Some attributes of the
-     * resource representations are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - public java.util.List - getVersionedResourcesBuilderList() { - return getVersionedResourcesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder> - getVersionedResourcesFieldBuilder() { - if (versionedResourcesBuilder_ == null) { - versionedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.VersionedResource, com.google.cloud.asset.v1.VersionedResource.Builder, com.google.cloud.asset.v1.VersionedResourceOrBuilder>( - versionedResources_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - versionedResources_ = null; - } - return versionedResourcesBuilder_; - } - - private java.util.List attachedResources_ = - java.util.Collections.emptyList(); - private void ensureAttachedResourcesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - attachedResources_ = new java.util.ArrayList(attachedResources_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.AttachedResource, com.google.cloud.asset.v1.AttachedResource.Builder, com.google.cloud.asset.v1.AttachedResourceOrBuilder> attachedResourcesBuilder_; - - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public java.util.List getAttachedResourcesList() { - if (attachedResourcesBuilder_ == null) { - return java.util.Collections.unmodifiableList(attachedResources_); - } else { - return attachedResourcesBuilder_.getMessageList(); - } - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public int getAttachedResourcesCount() { - if (attachedResourcesBuilder_ == null) { - return attachedResources_.size(); - } else { - return attachedResourcesBuilder_.getCount(); - } - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index) { - if (attachedResourcesBuilder_ == null) { - return attachedResources_.get(index); - } else { - return attachedResourcesBuilder_.getMessage(index); - } - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder setAttachedResources( - int index, com.google.cloud.asset.v1.AttachedResource value) { - if (attachedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttachedResourcesIsMutable(); - attachedResources_.set(index, value); - onChanged(); - } else { - attachedResourcesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder setAttachedResources( - int index, com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) { - if (attachedResourcesBuilder_ == null) { - ensureAttachedResourcesIsMutable(); - attachedResources_.set(index, builderForValue.build()); - onChanged(); - } else { - attachedResourcesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder addAttachedResources(com.google.cloud.asset.v1.AttachedResource value) { - if (attachedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttachedResourcesIsMutable(); - attachedResources_.add(value); - onChanged(); - } else { - attachedResourcesBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder addAttachedResources( - int index, com.google.cloud.asset.v1.AttachedResource value) { - if (attachedResourcesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttachedResourcesIsMutable(); - attachedResources_.add(index, value); - onChanged(); - } else { - attachedResourcesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder addAttachedResources( - com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) { - if (attachedResourcesBuilder_ == null) { - ensureAttachedResourcesIsMutable(); - attachedResources_.add(builderForValue.build()); - onChanged(); - } else { - attachedResourcesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder addAttachedResources( - int index, com.google.cloud.asset.v1.AttachedResource.Builder builderForValue) { - if (attachedResourcesBuilder_ == null) { - ensureAttachedResourcesIsMutable(); - attachedResources_.add(index, builderForValue.build()); - onChanged(); - } else { - attachedResourcesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder addAllAttachedResources( - java.lang.Iterable values) { - if (attachedResourcesBuilder_ == null) { - ensureAttachedResourcesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, attachedResources_); - onChanged(); - } else { - attachedResourcesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder clearAttachedResources() { - if (attachedResourcesBuilder_ == null) { - attachedResources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - attachedResourcesBuilder_.clear(); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public Builder removeAttachedResources(int index) { - if (attachedResourcesBuilder_ == null) { - ensureAttachedResourcesIsMutable(); - attachedResources_.remove(index); - onChanged(); - } else { - attachedResourcesBuilder_.remove(index); - } - return this; - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public com.google.cloud.asset.v1.AttachedResource.Builder getAttachedResourcesBuilder( - int index) { - return getAttachedResourcesFieldBuilder().getBuilder(index); - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder( - int index) { - if (attachedResourcesBuilder_ == null) { - return attachedResources_.get(index); } else { - return attachedResourcesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public java.util.List - getAttachedResourcesOrBuilderList() { - if (attachedResourcesBuilder_ != null) { - return attachedResourcesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(attachedResources_); - } - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public com.google.cloud.asset.v1.AttachedResource.Builder addAttachedResourcesBuilder() { - return getAttachedResourcesFieldBuilder().addBuilder( - com.google.cloud.asset.v1.AttachedResource.getDefaultInstance()); - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public com.google.cloud.asset.v1.AttachedResource.Builder addAttachedResourcesBuilder( - int index) { - return getAttachedResourcesFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.AttachedResource.getDefaultInstance()); - } - /** - *
-     * Attached resources of this resource. For example, an OSConfig
-     * Inventory is an attached resource of a Compute Instance. This field is
-     * repeated because a resource could have multiple attached resources.
-     * This `attached_resources` field is not searchable. Some attributes
-     * of the attached resources are exposed in `additional_attributes` field, so
-     * as to allow users to search on them.
-     * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - public java.util.List - getAttachedResourcesBuilderList() { - return getAttachedResourcesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.AttachedResource, com.google.cloud.asset.v1.AttachedResource.Builder, com.google.cloud.asset.v1.AttachedResourceOrBuilder> - getAttachedResourcesFieldBuilder() { - if (attachedResourcesBuilder_ == null) { - attachedResourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.AttachedResource, com.google.cloud.asset.v1.AttachedResource.Builder, com.google.cloud.asset.v1.AttachedResourceOrBuilder>( - attachedResources_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - attachedResources_ = null; - } - return attachedResourcesBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.asset.v1.RelatedResources> relationships_; - private com.google.protobuf.MapField - internalGetRelationships() { - if (relationships_ == null) { - return com.google.protobuf.MapField.emptyMapField( - RelationshipsDefaultEntryHolder.defaultEntry); - } - return relationships_; - } - private com.google.protobuf.MapField - internalGetMutableRelationships() { - onChanged();; - if (relationships_ == null) { - relationships_ = com.google.protobuf.MapField.newMapField( - RelationshipsDefaultEntryHolder.defaultEntry); - } - if (!relationships_.isMutable()) { - relationships_ = relationships_.copy(); - } - return relationships_; - } - - public int getRelationshipsCount() { - return internalGetRelationships().getMap().size(); - } - /** - *
-     * A map of related resources of this resource, keyed by the
-     * relationship type. A relationship type is in the format of
-     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-     * See [supported relationship
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-     * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - - @java.lang.Override - public boolean containsRelationships( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetRelationships().getMap().containsKey(key); - } - /** - * Use {@link #getRelationshipsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getRelationships() { - return getRelationshipsMap(); - } - /** - *
-     * A map of related resources of this resource, keyed by the
-     * relationship type. A relationship type is in the format of
-     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-     * See [supported relationship
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-     * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - @java.lang.Override - - public java.util.Map getRelationshipsMap() { - return internalGetRelationships().getMap(); - } - /** - *
-     * A map of related resources of this resource, keyed by the
-     * relationship type. A relationship type is in the format of
-     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-     * See [supported relationship
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-     * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( - java.lang.String key, - com.google.cloud.asset.v1.RelatedResources defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetRelationships().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * A map of related resources of this resource, keyed by the
-     * relationship type. A relationship type is in the format of
-     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-     * See [supported relationship
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-     * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - @java.lang.Override - - public com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetRelationships().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearRelationships() { - internalGetMutableRelationships().getMutableMap() - .clear(); - return this; - } - /** - *
-     * A map of related resources of this resource, keyed by the
-     * relationship type. A relationship type is in the format of
-     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-     * See [supported relationship
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-     * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - - public Builder removeRelationships( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableRelationships().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableRelationships() { - return internalGetMutableRelationships().getMutableMap(); - } - /** - *
-     * A map of related resources of this resource, keyed by the
-     * relationship type. A relationship type is in the format of
-     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-     * See [supported relationship
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-     * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - public Builder putRelationships( - java.lang.String key, - com.google.cloud.asset.v1.RelatedResources value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableRelationships().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * A map of related resources of this resource, keyed by the
-     * relationship type. A relationship type is in the format of
-     * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-     * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-     * See [supported relationship
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-     * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - - public Builder putAllRelationships( - java.util.Map values) { - internalGetMutableRelationships().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTagKeysIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - tagKeys_ = new com.google.protobuf.LazyStringArrayList(tagKeys_); - bitField0_ |= 0x00000040; - } - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @return A list containing the tagKeys. - */ - public com.google.protobuf.ProtocolStringList - getTagKeysList() { - return tagKeys_.getUnmodifiableView(); - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @return The count of tagKeys. - */ - public int getTagKeysCount() { - return tagKeys_.size(); - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @param index The index of the element to return. - * @return The tagKeys at the given index. - */ - public java.lang.String getTagKeys(int index) { - return tagKeys_.get(index); - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @param index The index of the value to return. - * @return The bytes of the tagKeys at the given index. - */ - public com.google.protobuf.ByteString - getTagKeysBytes(int index) { - return tagKeys_.getByteString(index); - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @param index The index to set the value at. - * @param value The tagKeys to set. - * @return This builder for chaining. - */ - public Builder setTagKeys( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagKeysIsMutable(); - tagKeys_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @param value The tagKeys to add. - * @return This builder for chaining. - */ - public Builder addTagKeys( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagKeysIsMutable(); - tagKeys_.add(value); - onChanged(); - return this; - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @param values The tagKeys to add. - * @return This builder for chaining. - */ - public Builder addAllTagKeys( - java.lang.Iterable values) { - ensureTagKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tagKeys_); - onChanged(); - return this; - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @return This builder for chaining. - */ - public Builder clearTagKeys() { - tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - *
-     * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-     * To search against the `tagKeys`:
-     * * use a field query. Example:
-     *     - `tagKeys:"123456789/env*"`
-     *     - `tagKeys="123456789/env"`
-     *     - `tagKeys:"env"`
-     * * use a free text query. Example:
-     *     - `env`
-     * 
- * - * repeated string tag_keys = 23; - * @param value The bytes of the tagKeys to add. - * @return This builder for chaining. - */ - public Builder addTagKeysBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureTagKeysIsMutable(); - tagKeys_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTagValuesIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - tagValues_ = new com.google.protobuf.LazyStringArrayList(tagValues_); - bitField0_ |= 0x00000080; - } - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @return A list containing the tagValues. - */ - public com.google.protobuf.ProtocolStringList - getTagValuesList() { - return tagValues_.getUnmodifiableView(); - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @return The count of tagValues. - */ - public int getTagValuesCount() { - return tagValues_.size(); - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @param index The index of the element to return. - * @return The tagValues at the given index. - */ - public java.lang.String getTagValues(int index) { - return tagValues_.get(index); - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @param index The index of the value to return. - * @return The bytes of the tagValues at the given index. - */ - public com.google.protobuf.ByteString - getTagValuesBytes(int index) { - return tagValues_.getByteString(index); - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @param index The index to set the value at. - * @param value The tagValues to set. - * @return This builder for chaining. - */ - public Builder setTagValues( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagValuesIsMutable(); - tagValues_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @param value The tagValues to add. - * @return This builder for chaining. - */ - public Builder addTagValues( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagValuesIsMutable(); - tagValues_.add(value); - onChanged(); - return this; - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @param values The tagValues to add. - * @return This builder for chaining. - */ - public Builder addAllTagValues( - java.lang.Iterable values) { - ensureTagValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tagValues_); - onChanged(); - return this; - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @return This builder for chaining. - */ - public Builder clearTagValues() { - tagValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - *
-     * TagValue namespaced names, in the format of
-     * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-     * To search against the `tagValues`:
-     * * use a field query. Example:
-     *     - `tagValues:"env"`
-     *     - `tagValues:"env/prod"`
-     *     - `tagValues:"123456789/env/prod*"`
-     *     - `tagValues="123456789/env/prod"`
-     * * use a free text query. Example:
-     *     - `prod`
-     * 
- * - * repeated string tag_values = 25; - * @param value The bytes of the tagValues to add. - * @return This builder for chaining. - */ - public Builder addTagValuesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureTagValuesIsMutable(); - tagValues_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTagValueIdsIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - tagValueIds_ = new com.google.protobuf.LazyStringArrayList(tagValueIds_); - bitField0_ |= 0x00000100; - } - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @return A list containing the tagValueIds. - */ - public com.google.protobuf.ProtocolStringList - getTagValueIdsList() { - return tagValueIds_.getUnmodifiableView(); - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @return The count of tagValueIds. - */ - public int getTagValueIdsCount() { - return tagValueIds_.size(); - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @param index The index of the element to return. - * @return The tagValueIds at the given index. - */ - public java.lang.String getTagValueIds(int index) { - return tagValueIds_.get(index); - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @param index The index of the value to return. - * @return The bytes of the tagValueIds at the given index. - */ - public com.google.protobuf.ByteString - getTagValueIdsBytes(int index) { - return tagValueIds_.getByteString(index); - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @param index The index to set the value at. - * @param value The tagValueIds to set. - * @return This builder for chaining. - */ - public Builder setTagValueIds( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagValueIdsIsMutable(); - tagValueIds_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @param value The tagValueIds to add. - * @return This builder for chaining. - */ - public Builder addTagValueIds( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagValueIdsIsMutable(); - tagValueIds_.add(value); - onChanged(); - return this; - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @param values The tagValueIds to add. - * @return This builder for chaining. - */ - public Builder addAllTagValueIds( - java.lang.Iterable values) { - ensureTagValueIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tagValueIds_); - onChanged(); - return this; - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @return This builder for chaining. - */ - public Builder clearTagValueIds() { - tagValueIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - return this; - } - /** - *
-     * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-     * To search against the `tagValueIds`:
-     * * use a field query. Example:
-     *     - `tagValueIds:"456"`
-     *     - `tagValueIds="tagValues/456"`
-     * * use a free text query. Example:
-     *     - `456`
-     * 
- * - * repeated string tag_value_ids = 26; - * @param value The bytes of the tagValueIds to add. - * @return This builder for chaining. - */ - public Builder addTagValueIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureTagValueIdsIsMutable(); - tagValueIds_.add(value); - onChanged(); - return this; - } - - private java.lang.Object parentAssetType_ = ""; - /** - *
-     * The type of this resource's immediate parent, if there is one.
-     * To search against the `parent_asset_type`:
-     * * use a field query. Example:
-     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-     * * use a free text query. Example:
-     * `cloudresourcemanager.googleapis.com/Project`
-     * 
- * - * string parent_asset_type = 103; - * @return The parentAssetType. - */ - public java.lang.String getParentAssetType() { - java.lang.Object ref = parentAssetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parentAssetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of this resource's immediate parent, if there is one.
-     * To search against the `parent_asset_type`:
-     * * use a field query. Example:
-     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-     * * use a free text query. Example:
-     * `cloudresourcemanager.googleapis.com/Project`
-     * 
- * - * string parent_asset_type = 103; - * @return The bytes for parentAssetType. - */ - public com.google.protobuf.ByteString - getParentAssetTypeBytes() { - java.lang.Object ref = parentAssetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parentAssetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of this resource's immediate parent, if there is one.
-     * To search against the `parent_asset_type`:
-     * * use a field query. Example:
-     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-     * * use a free text query. Example:
-     * `cloudresourcemanager.googleapis.com/Project`
-     * 
- * - * string parent_asset_type = 103; - * @param value The parentAssetType to set. - * @return This builder for chaining. - */ - public Builder setParentAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parentAssetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of this resource's immediate parent, if there is one.
-     * To search against the `parent_asset_type`:
-     * * use a field query. Example:
-     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-     * * use a free text query. Example:
-     * `cloudresourcemanager.googleapis.com/Project`
-     * 
- * - * string parent_asset_type = 103; - * @return This builder for chaining. - */ - public Builder clearParentAssetType() { - - parentAssetType_ = getDefaultInstance().getParentAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of this resource's immediate parent, if there is one.
-     * To search against the `parent_asset_type`:
-     * * use a field query. Example:
-     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-     * * use a free text query. Example:
-     * `cloudresourcemanager.googleapis.com/Project`
-     * 
- * - * string parent_asset_type = 103; - * @param value The bytes for parentAssetType to set. - * @return This builder for chaining. - */ - public Builder setParentAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parentAssetType_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.ResourceSearchResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ResourceSearchResult) - private static final com.google.cloud.asset.v1.ResourceSearchResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ResourceSearchResult(); - } - - public static com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ResourceSearchResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceSearchResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.ResourceSearchResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java deleted file mode 100644 index b79fffcafc2a..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java +++ /dev/null @@ -1,1209 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface ResourceSearchResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ResourceSearchResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The full resource name of this resource. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `name`:
-   * * use a field query. Example: `name:instance1`
-   * * use a free text query. Example: `instance1`
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The full resource name of this resource. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Cloud Asset Inventory Resource Name
-   * Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
-   * for more information.
-   * To search against the `name`:
-   * * use a field query. Example: `name:instance1`
-   * * use a free text query. Example: `instance1`
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The type of this resource. Example: `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_type` field in your search request.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of this resource. Example: `compute.googleapis.com/Disk`.
-   * To search against the `asset_type`:
-   * * specify the `asset_type` field in your search request.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * The project that this resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. This field is available when the resource
-   * belongs to a project.
-   * To search against `project`:
-   * * use a field query. Example: `project:12345`
-   * * use a free text query. Example: `12345`
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 3; - * @return The project. - */ - java.lang.String getProject(); - /** - *
-   * The project that this resource belongs to, in the form of
-   * projects/{PROJECT_NUMBER}. This field is available when the resource
-   * belongs to a project.
-   * To search against `project`:
-   * * use a field query. Example: `project:12345`
-   * * use a free text query. Example: `12345`
-   * * specify the `scope` field as this project in your search request.
-   * 
- * - * string project = 3; - * @return The bytes for project. - */ - com.google.protobuf.ByteString - getProjectBytes(); - - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @return A list containing the folders. - */ - java.util.List - getFoldersList(); - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @return The count of folders. - */ - int getFoldersCount(); - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @param index The index of the element to return. - * @return The folders at the given index. - */ - java.lang.String getFolders(int index); - /** - *
-   * The folder(s) that this resource belongs to, in the form of
-   * folders/{FOLDER_NUMBER}. This field is available when the resource
-   * belongs to one or more folders.
-   * To search against `folders`:
-   * * use a field query. Example: `folders:(123 OR 456)`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this folder in your search request.
-   * 
- * - * repeated string folders = 17; - * @param index The index of the value to return. - * @return The bytes of the folders at the given index. - */ - com.google.protobuf.ByteString - getFoldersBytes(int index); - - /** - *
-   * The organization that this resource belongs to, in the form of
-   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * resource belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 18; - * @return The organization. - */ - java.lang.String getOrganization(); - /** - *
-   * The organization that this resource belongs to, in the form of
-   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
-   * resource belongs to an organization.
-   * To search against `organization`:
-   * * use a field query. Example: `organization:123`
-   * * use a free text query. Example: `123`
-   * * specify the `scope` field as this organization in your search request.
-   * 
- * - * string organization = 18; - * @return The bytes for organization. - */ - com.google.protobuf.ByteString - getOrganizationBytes(); - - /** - *
-   * The display name of this resource. This field is available only when the
-   * resource's Protobuf contains it.
-   * To search against the `display_name`:
-   * * use a field query. Example: `displayName:"My Instance"`
-   * * use a free text query. Example: `"My Instance"`
-   * 
- * - * string display_name = 4; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The display name of this resource. This field is available only when the
-   * resource's Protobuf contains it.
-   * To search against the `display_name`:
-   * * use a field query. Example: `displayName:"My Instance"`
-   * * use a free text query. Example: `"My Instance"`
-   * 
- * - * string display_name = 4; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `description`:
-   * * use a field query. Example: `description:"important instance"`
-   * * use a free text query. Example: `"important instance"`
-   * 
- * - * string description = 5; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `description`:
-   * * use a field query. Example: `description:"important instance"`
-   * * use a free text query. Example: `"important instance"`
-   * 
- * - * string description = 5; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Location can be `global`, regional like `us-east1`, or zonal like
-   * `us-west1-b`. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against the `location`:
-   * * use a field query. Example: `location:us-west*`
-   * * use a free text query. Example: `us-west*`
-   * 
- * - * string location = 6; - * @return The location. - */ - java.lang.String getLocation(); - /** - *
-   * Location can be `global`, regional like `us-east1`, or zonal like
-   * `us-west1-b`. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against the `location`:
-   * * use a field query. Example: `location:us-west*`
-   * * use a free text query. Example: `us-west*`
-   * 
- * - * string location = 6; - * @return The bytes for location. - */ - com.google.protobuf.ByteString - getLocationBytes(); - - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - int getLabelsCount(); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `labels`:
-   * * use a field query:
-   *     - query on any label's key or value. Example: `labels:prod`
-   *     - query by a given label. Example: `labels.env:prod`
-   *     - query by a given label's existence. Example: `labels.env:*`
-   * * use a free text query. Example: `prod`
-   * 
- * - * map<string, string> labels = 7; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @return A list containing the networkTags. - */ - java.util.List - getNetworkTagsList(); - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @return The count of networkTags. - */ - int getNetworkTagsCount(); - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - java.lang.String getNetworkTags(int index); - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information. This field is available only when the resource's
-   * Protobuf contains it.
-   * To search against the `network_tags`:
-   * * use a field query. Example: `networkTags:internal`
-   * * use a free text query. Example: `internal`
-   * 
- * - * repeated string network_tags = 8; - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - com.google.protobuf.ByteString - getNetworkTagsBytes(int index); - - /** - *
-   * The Cloud KMS
-   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-   * name or
-   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-   * name. This field is available only when the resource's Protobuf contains
-   * it.
-   * To search against the `kms_key`:
-   * * use a field query. Example: `kmsKey:key`
-   * * use a free text query. Example: `key`
-   * 
- * - * string kms_key = 10; - * @return The kmsKey. - */ - java.lang.String getKmsKey(); - /** - *
-   * The Cloud KMS
-   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys)
-   * name or
-   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions)
-   * name. This field is available only when the resource's Protobuf contains
-   * it.
-   * To search against the `kms_key`:
-   * * use a field query. Example: `kmsKey:key`
-   * * use a free text query. Example: `key`
-   * 
- * - * string kms_key = 10; - * @return The bytes for kmsKey. - */ - com.google.protobuf.ByteString - getKmsKeyBytes(); - - /** - *
-   * The create timestamp of this resource, at which the resource was created.
-   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-   * is available only when the resource's Protobuf contains it.
-   * To search against `create_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-   *     - value in date string. Example: `createTime > 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `createTime >
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp create_time = 11; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * The create timestamp of this resource, at which the resource was created.
-   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-   * is available only when the resource's Protobuf contains it.
-   * To search against `create_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-   *     - value in date string. Example: `createTime > 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `createTime >
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp create_time = 11; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * The create timestamp of this resource, at which the resource was created.
-   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
-   * is available only when the resource's Protobuf contains it.
-   * To search against `create_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
-   *     - value in date string. Example: `createTime > 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `createTime >
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp create_time = 11; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * The last update timestamp of this resource, at which the resource was last
-   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-   * always be 0. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against `update_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-   *     - value in date string. Example: `updateTime < 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `updateTime <
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp update_time = 12; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The last update timestamp of this resource, at which the resource was last
-   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-   * always be 0. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against `update_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-   *     - value in date string. Example: `updateTime < 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `updateTime <
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp update_time = 12; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The last update timestamp of this resource, at which the resource was last
-   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
-   * always be 0. This field is available only when the resource's Protobuf
-   * contains it.
-   * To search against `update_time`:
-   * * use a field query.
-   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
-   *     - value in date string. Example: `updateTime < 2021-01-01`
-   *     - value in date-time string (must be quoted). Example: `updateTime <
-   *     "2021-01-01T00:00:00"`
-   * 
- * - * .google.protobuf.Timestamp update_time = 12; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * The state of this resource. Different resources types have different state
-   * definitions that are mapped from various fields of different resource
-   * types. This field is available only when the resource's Protobuf contains
-   * it.
-   * Example:
-   * If the resource is an instance provided by Compute Engine,
-   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-   * in [API
-   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-   * If the resource is a project provided by Cloud Resource Manager, its state
-   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-   * To search against the `state`:
-   * * use a field query. Example: `state:RUNNING`
-   * * use a free text query. Example: `RUNNING`
-   * 
- * - * string state = 13; - * @return The state. - */ - java.lang.String getState(); - /** - *
-   * The state of this resource. Different resources types have different state
-   * definitions that are mapped from various fields of different resource
-   * types. This field is available only when the resource's Protobuf contains
-   * it.
-   * Example:
-   * If the resource is an instance provided by Compute Engine,
-   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
-   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
-   * in [API
-   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
-   * If the resource is a project provided by Cloud Resource Manager, its state
-   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
-   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
-   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
-   * To search against the `state`:
-   * * use a field query. Example: `state:RUNNING`
-   * * use a free text query. Example: `RUNNING`
-   * 
- * - * string state = 13; - * @return The bytes for state. - */ - com.google.protobuf.ByteString - getStateBytes(); - - /** - *
-   * The additional searchable attributes of this resource. The attributes may
-   * vary from one resource type to another. Examples: `projectId` for Project,
-   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-   * metadata fields that are returned by the List or Get APIs provided by the
-   * corresponding GCP service (e.g., Compute Engine). see [API references and
-   * supported searchable
-   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-   * to see which fields are included.
-   * You can search values of these fields through free text search. However,
-   * you should not consume the field programically as the field names and
-   * values may change as the GCP service updates to a new incompatible API
-   * version.
-   * To search against the `additional_attributes`:
-   * * use a free text query to match the attributes values. Example: to search
-   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-   *   `foobar`.
-   * 
- * - * .google.protobuf.Struct additional_attributes = 9; - * @return Whether the additionalAttributes field is set. - */ - boolean hasAdditionalAttributes(); - /** - *
-   * The additional searchable attributes of this resource. The attributes may
-   * vary from one resource type to another. Examples: `projectId` for Project,
-   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-   * metadata fields that are returned by the List or Get APIs provided by the
-   * corresponding GCP service (e.g., Compute Engine). see [API references and
-   * supported searchable
-   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-   * to see which fields are included.
-   * You can search values of these fields through free text search. However,
-   * you should not consume the field programically as the field names and
-   * values may change as the GCP service updates to a new incompatible API
-   * version.
-   * To search against the `additional_attributes`:
-   * * use a free text query to match the attributes values. Example: to search
-   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-   *   `foobar`.
-   * 
- * - * .google.protobuf.Struct additional_attributes = 9; - * @return The additionalAttributes. - */ - com.google.protobuf.Struct getAdditionalAttributes(); - /** - *
-   * The additional searchable attributes of this resource. The attributes may
-   * vary from one resource type to another. Examples: `projectId` for Project,
-   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
-   * metadata fields that are returned by the List or Get APIs provided by the
-   * corresponding GCP service (e.g., Compute Engine). see [API references and
-   * supported searchable
-   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
-   * to see which fields are included.
-   * You can search values of these fields through free text search. However,
-   * you should not consume the field programically as the field names and
-   * values may change as the GCP service updates to a new incompatible API
-   * version.
-   * To search against the `additional_attributes`:
-   * * use a free text query to match the attributes values. Example: to search
-   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
-   *   `foobar`.
-   * 
- * - * .google.protobuf.Struct additional_attributes = 9; - */ - com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder(); - - /** - *
-   * The full resource name of this resource's parent, if it has one.
-   * To search against the `parent_full_resource_name`:
-   * * use a field query. Example:
-   * `parentFullResourceName:"project-name"`
-   * * use a free text query. Example:
-   * `project-name`
-   * 
- * - * string parent_full_resource_name = 19; - * @return The parentFullResourceName. - */ - java.lang.String getParentFullResourceName(); - /** - *
-   * The full resource name of this resource's parent, if it has one.
-   * To search against the `parent_full_resource_name`:
-   * * use a field query. Example:
-   * `parentFullResourceName:"project-name"`
-   * * use a free text query. Example:
-   * `project-name`
-   * 
- * - * string parent_full_resource_name = 19; - * @return The bytes for parentFullResourceName. - */ - com.google.protobuf.ByteString - getParentFullResourceNameBytes(); - - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - java.util.List - getVersionedResourcesList(); - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - com.google.cloud.asset.v1.VersionedResource getVersionedResources(int index); - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - int getVersionedResourcesCount(); - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - java.util.List - getVersionedResourcesOrBuilderList(); - /** - *
-   * Versioned resource representations of this resource. This is repeated
-   * because there could be multiple versions of resource representations during
-   * version migration.
-   * This `versioned_resources` field is not searchable. Some attributes of the
-   * resource representations are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.VersionedResource versioned_resources = 16; - */ - com.google.cloud.asset.v1.VersionedResourceOrBuilder getVersionedResourcesOrBuilder( - int index); - - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - java.util.List - getAttachedResourcesList(); - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - com.google.cloud.asset.v1.AttachedResource getAttachedResources(int index); - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - int getAttachedResourcesCount(); - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - java.util.List - getAttachedResourcesOrBuilderList(); - /** - *
-   * Attached resources of this resource. For example, an OSConfig
-   * Inventory is an attached resource of a Compute Instance. This field is
-   * repeated because a resource could have multiple attached resources.
-   * This `attached_resources` field is not searchable. Some attributes
-   * of the attached resources are exposed in `additional_attributes` field, so
-   * as to allow users to search on them.
-   * 
- * - * repeated .google.cloud.asset.v1.AttachedResource attached_resources = 20; - */ - com.google.cloud.asset.v1.AttachedResourceOrBuilder getAttachedResourcesOrBuilder( - int index); - - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - int getRelationshipsCount(); - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - boolean containsRelationships( - java.lang.String key); - /** - * Use {@link #getRelationshipsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getRelationships(); - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - java.util.Map - getRelationshipsMap(); - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - - /* nullable */ -com.google.cloud.asset.v1.RelatedResources getRelationshipsOrDefault( - java.lang.String key, - /* nullable */ -com.google.cloud.asset.v1.RelatedResources defaultValue); - /** - *
-   * A map of related resources of this resource, keyed by the
-   * relationship type. A relationship type is in the format of
-   * {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`,
-   * `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`.
-   * See [supported relationship
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).
-   * 
- * - * map<string, .google.cloud.asset.v1.RelatedResources> relationships = 21; - */ - - com.google.cloud.asset.v1.RelatedResources getRelationshipsOrThrow( - java.lang.String key); - - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @return A list containing the tagKeys. - */ - java.util.List - getTagKeysList(); - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @return The count of tagKeys. - */ - int getTagKeysCount(); - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @param index The index of the element to return. - * @return The tagKeys at the given index. - */ - java.lang.String getTagKeys(int index); - /** - *
-   * TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
-   * To search against the `tagKeys`:
-   * * use a field query. Example:
-   *     - `tagKeys:"123456789/env*"`
-   *     - `tagKeys="123456789/env"`
-   *     - `tagKeys:"env"`
-   * * use a free text query. Example:
-   *     - `env`
-   * 
- * - * repeated string tag_keys = 23; - * @param index The index of the value to return. - * @return The bytes of the tagKeys at the given index. - */ - com.google.protobuf.ByteString - getTagKeysBytes(int index); - - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @return A list containing the tagValues. - */ - java.util.List - getTagValuesList(); - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @return The count of tagValues. - */ - int getTagValuesCount(); - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @param index The index of the element to return. - * @return The tagValues at the given index. - */ - java.lang.String getTagValues(int index); - /** - *
-   * TagValue namespaced names, in the format of
-   * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
-   * To search against the `tagValues`:
-   * * use a field query. Example:
-   *     - `tagValues:"env"`
-   *     - `tagValues:"env/prod"`
-   *     - `tagValues:"123456789/env/prod*"`
-   *     - `tagValues="123456789/env/prod"`
-   * * use a free text query. Example:
-   *     - `prod`
-   * 
- * - * repeated string tag_values = 25; - * @param index The index of the value to return. - * @return The bytes of the tagValues at the given index. - */ - com.google.protobuf.ByteString - getTagValuesBytes(int index); - - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @return A list containing the tagValueIds. - */ - java.util.List - getTagValueIdsList(); - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @return The count of tagValueIds. - */ - int getTagValueIdsCount(); - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @param index The index of the element to return. - * @return The tagValueIds at the given index. - */ - java.lang.String getTagValueIds(int index); - /** - *
-   * TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}.
-   * To search against the `tagValueIds`:
-   * * use a field query. Example:
-   *     - `tagValueIds:"456"`
-   *     - `tagValueIds="tagValues/456"`
-   * * use a free text query. Example:
-   *     - `456`
-   * 
- * - * repeated string tag_value_ids = 26; - * @param index The index of the value to return. - * @return The bytes of the tagValueIds at the given index. - */ - com.google.protobuf.ByteString - getTagValueIdsBytes(int index); - - /** - *
-   * The type of this resource's immediate parent, if there is one.
-   * To search against the `parent_asset_type`:
-   * * use a field query. Example:
-   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-   * * use a free text query. Example:
-   * `cloudresourcemanager.googleapis.com/Project`
-   * 
- * - * string parent_asset_type = 103; - * @return The parentAssetType. - */ - java.lang.String getParentAssetType(); - /** - *
-   * The type of this resource's immediate parent, if there is one.
-   * To search against the `parent_asset_type`:
-   * * use a field query. Example:
-   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
-   * * use a free text query. Example:
-   * `cloudresourcemanager.googleapis.com/Project`
-   * 
- * - * string parent_asset_type = 103; - * @return The bytes for parentAssetType. - */ - com.google.protobuf.ByteString - getParentAssetTypeBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java deleted file mode 100644 index 94c7f12605a8..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQuery.java +++ /dev/null @@ -1,3055 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A saved query which can be shared with others or used later.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.SavedQuery} - */ -public final class SavedQuery extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SavedQuery) - SavedQueryOrBuilder { -private static final long serialVersionUID = 0L; - // Use SavedQuery.newBuilder() to construct. - private SavedQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SavedQuery() { - name_ = ""; - description_ = ""; - creator_ = ""; - lastUpdater_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SavedQuery(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SavedQuery( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - creator_ = s; - break; - } - case 42: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastUpdateTime_ != null) { - subBuilder = lastUpdateTime_.toBuilder(); - } - lastUpdateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastUpdateTime_); - lastUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - lastUpdater_ = s; - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 66: { - com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder subBuilder = null; - if (content_ != null) { - subBuilder = content_.toBuilder(); - } - content_ = input.readMessage(com.google.cloud.asset.v1.SavedQuery.QueryContent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(content_); - content_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SavedQuery.class, com.google.cloud.asset.v1.SavedQuery.Builder.class); - } - - public interface QueryContentOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SavedQuery.QueryContent) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * An IAM Policy Analysis query, which could be used in
-     * the
-     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-     * rpc or the
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - * @return Whether the iamPolicyAnalysisQuery field is set. - */ - boolean hasIamPolicyAnalysisQuery(); - /** - *
-     * An IAM Policy Analysis query, which could be used in
-     * the
-     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-     * rpc or the
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - * @return The iamPolicyAnalysisQuery. - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQuery getIamPolicyAnalysisQuery(); - /** - *
-     * An IAM Policy Analysis query, which could be used in
-     * the
-     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-     * rpc or the
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getIamPolicyAnalysisQueryOrBuilder(); - - public com.google.cloud.asset.v1.SavedQuery.QueryContent.QueryContentCase getQueryContentCase(); - } - /** - *
-   * The query content.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.SavedQuery.QueryContent} - */ - public static final class QueryContent extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SavedQuery.QueryContent) - QueryContentOrBuilder { - private static final long serialVersionUID = 0L; - // Use QueryContent.newBuilder() to construct. - private QueryContent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private QueryContent() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new QueryContent(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private QueryContent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; - if (queryContentCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_).toBuilder(); - } - queryContent_ = - input.readMessage(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); - queryContent_ = subBuilder.buildPartial(); - } - queryContentCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SavedQuery.QueryContent.class, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder.class); - } - - private int queryContentCase_ = 0; - private java.lang.Object queryContent_; - public enum QueryContentCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - IAM_POLICY_ANALYSIS_QUERY(1), - QUERYCONTENT_NOT_SET(0); - private final int value; - private QueryContentCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static QueryContentCase valueOf(int value) { - return forNumber(value); - } - - public static QueryContentCase forNumber(int value) { - switch (value) { - case 1: return IAM_POLICY_ANALYSIS_QUERY; - case 0: return QUERYCONTENT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public QueryContentCase - getQueryContentCase() { - return QueryContentCase.forNumber( - queryContentCase_); - } - - public static final int IAM_POLICY_ANALYSIS_QUERY_FIELD_NUMBER = 1; - /** - *
-     * An IAM Policy Analysis query, which could be used in
-     * the
-     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-     * rpc or the
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - * @return Whether the iamPolicyAnalysisQuery field is set. - */ - @java.lang.Override - public boolean hasIamPolicyAnalysisQuery() { - return queryContentCase_ == 1; - } - /** - *
-     * An IAM Policy Analysis query, which could be used in
-     * the
-     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-     * rpc or the
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - * @return The iamPolicyAnalysisQuery. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getIamPolicyAnalysisQuery() { - if (queryContentCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); - } - /** - *
-     * An IAM Policy Analysis query, which could be used in
-     * the
-     * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-     * rpc or the
-     * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-     * rpc.
-     * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getIamPolicyAnalysisQueryOrBuilder() { - if (queryContentCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (queryContentCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (queryContentCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.SavedQuery.QueryContent)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.SavedQuery.QueryContent other = (com.google.cloud.asset.v1.SavedQuery.QueryContent) obj; - - if (!getQueryContentCase().equals(other.getQueryContentCase())) return false; - switch (queryContentCase_) { - case 1: - if (!getIamPolicyAnalysisQuery() - .equals(other.getIamPolicyAnalysisQuery())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (queryContentCase_) { - case 1: - hash = (37 * hash) + IAM_POLICY_ANALYSIS_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicyAnalysisQuery().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SavedQuery.QueryContent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.SavedQuery.QueryContent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * The query content.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1.SavedQuery.QueryContent} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SavedQuery.QueryContent) - com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SavedQuery.QueryContent.class, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.SavedQuery.QueryContent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - queryContentCase_ = 0; - queryContent_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_QueryContent_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery.QueryContent getDefaultInstanceForType() { - return com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery.QueryContent build() { - com.google.cloud.asset.v1.SavedQuery.QueryContent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery.QueryContent buildPartial() { - com.google.cloud.asset.v1.SavedQuery.QueryContent result = new com.google.cloud.asset.v1.SavedQuery.QueryContent(this); - if (queryContentCase_ == 1) { - if (iamPolicyAnalysisQueryBuilder_ == null) { - result.queryContent_ = queryContent_; - } else { - result.queryContent_ = iamPolicyAnalysisQueryBuilder_.build(); - } - } - result.queryContentCase_ = queryContentCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.SavedQuery.QueryContent) { - return mergeFrom((com.google.cloud.asset.v1.SavedQuery.QueryContent)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.SavedQuery.QueryContent other) { - if (other == com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance()) return this; - switch (other.getQueryContentCase()) { - case IAM_POLICY_ANALYSIS_QUERY: { - mergeIamPolicyAnalysisQuery(other.getIamPolicyAnalysisQuery()); - break; - } - case QUERYCONTENT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.SavedQuery.QueryContent parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.SavedQuery.QueryContent) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int queryContentCase_ = 0; - private java.lang.Object queryContent_; - public QueryContentCase - getQueryContentCase() { - return QueryContentCase.forNumber( - queryContentCase_); - } - - public Builder clearQueryContent() { - queryContentCase_ = 0; - queryContent_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> iamPolicyAnalysisQueryBuilder_; - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - * @return Whether the iamPolicyAnalysisQuery field is set. - */ - @java.lang.Override - public boolean hasIamPolicyAnalysisQuery() { - return queryContentCase_ == 1; - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - * @return The iamPolicyAnalysisQuery. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getIamPolicyAnalysisQuery() { - if (iamPolicyAnalysisQueryBuilder_ == null) { - if (queryContentCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); - } else { - if (queryContentCase_ == 1) { - return iamPolicyAnalysisQueryBuilder_.getMessage(); - } - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); - } - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - public Builder setIamPolicyAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (iamPolicyAnalysisQueryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queryContent_ = value; - onChanged(); - } else { - iamPolicyAnalysisQueryBuilder_.setMessage(value); - } - queryContentCase_ = 1; - return this; - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - public Builder setIamPolicyAnalysisQuery( - com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { - if (iamPolicyAnalysisQueryBuilder_ == null) { - queryContent_ = builderForValue.build(); - onChanged(); - } else { - iamPolicyAnalysisQueryBuilder_.setMessage(builderForValue.build()); - } - queryContentCase_ = 1; - return this; - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - public Builder mergeIamPolicyAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { - if (iamPolicyAnalysisQueryBuilder_ == null) { - if (queryContentCase_ == 1 && - queryContent_ != com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance()) { - queryContent_ = com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_) - .mergeFrom(value).buildPartial(); - } else { - queryContent_ = value; - } - onChanged(); - } else { - if (queryContentCase_ == 1) { - iamPolicyAnalysisQueryBuilder_.mergeFrom(value); - } else { - iamPolicyAnalysisQueryBuilder_.setMessage(value); - } - } - queryContentCase_ = 1; - return this; - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - public Builder clearIamPolicyAnalysisQuery() { - if (iamPolicyAnalysisQueryBuilder_ == null) { - if (queryContentCase_ == 1) { - queryContentCase_ = 0; - queryContent_ = null; - onChanged(); - } - } else { - if (queryContentCase_ == 1) { - queryContentCase_ = 0; - queryContent_ = null; - } - iamPolicyAnalysisQueryBuilder_.clear(); - } - return this; - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getIamPolicyAnalysisQueryBuilder() { - return getIamPolicyAnalysisQueryFieldBuilder().getBuilder(); - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getIamPolicyAnalysisQueryOrBuilder() { - if ((queryContentCase_ == 1) && (iamPolicyAnalysisQueryBuilder_ != null)) { - return iamPolicyAnalysisQueryBuilder_.getMessageOrBuilder(); - } else { - if (queryContentCase_ == 1) { - return (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_; - } - return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); - } - } - /** - *
-       * An IAM Policy Analysis query, which could be used in
-       * the
-       * [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]
-       * rpc or the
-       * [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]
-       * rpc.
-       * 
- * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> - getIamPolicyAnalysisQueryFieldBuilder() { - if (iamPolicyAnalysisQueryBuilder_ == null) { - if (!(queryContentCase_ == 1)) { - queryContent_ = com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); - } - iamPolicyAnalysisQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicyAnalysisQuery, com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( - (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) queryContent_, - getParentForChildren(), - isClean()); - queryContent_ = null; - } - queryContentCase_ = 1; - onChanged();; - return iamPolicyAnalysisQueryBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SavedQuery.QueryContent) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SavedQuery.QueryContent) - private static final com.google.cloud.asset.v1.SavedQuery.QueryContent DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SavedQuery.QueryContent(); - } - - public static com.google.cloud.asset.v1.SavedQuery.QueryContent getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryContent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryContent(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery.QueryContent getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The resource name of the saved query. The format must be:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The resource name of the saved query. The format must be:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - *
-   * The description of this saved query. This value should be fewer than 255
-   * characters.
-   * 
- * - * string description = 2; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * The description of this saved query. This value should be fewer than 255
-   * characters.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; - /** - *
-   * Output only. The create time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - *
-   * Output only. The create time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - *
-   * Output only. The create time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int CREATOR_FIELD_NUMBER = 4; - private volatile java.lang.Object creator_; - /** - *
-   * Output only. The account's email address who has created this saved query.
-   * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The creator. - */ - @java.lang.Override - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } - } - /** - *
-   * Output only. The account's email address who has created this saved query.
-   * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for creator. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp lastUpdateTime_; - /** - *
-   * Output only. The last update time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the lastUpdateTime field is set. - */ - @java.lang.Override - public boolean hasLastUpdateTime() { - return lastUpdateTime_ != null; - } - /** - *
-   * Output only. The last update time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastUpdateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getLastUpdateTime() { - return lastUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastUpdateTime_; - } - /** - *
-   * Output only. The last update time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - return getLastUpdateTime(); - } - - public static final int LAST_UPDATER_FIELD_NUMBER = 6; - private volatile java.lang.Object lastUpdater_; - /** - *
-   * Output only. The account's email address who has updated this saved query
-   * most recently.
-   * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastUpdater. - */ - @java.lang.Override - public java.lang.String getLastUpdater() { - java.lang.Object ref = lastUpdater_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lastUpdater_ = s; - return s; - } - } - /** - *
-   * Output only. The account's email address who has updated this saved query
-   * most recently.
-   * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for lastUpdater. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLastUpdaterBytes() { - java.lang.Object ref = lastUpdater_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lastUpdater_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 7; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int CONTENT_FIELD_NUMBER = 8; - private com.google.cloud.asset.v1.SavedQuery.QueryContent content_; - /** - *
-   * The query content.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - * @return Whether the content field is set. - */ - @java.lang.Override - public boolean hasContent() { - return content_ != null; - } - /** - *
-   * The query content.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - * @return The content. - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery.QueryContent getContent() { - return content_ == null ? com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance() : content_; - } - /** - *
-   * The query content.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder getContentOrBuilder() { - return getContent(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (createTime_ != null) { - output.writeMessage(3, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, creator_); - } - if (lastUpdateTime_ != null) { - output.writeMessage(5, getLastUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastUpdater_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, lastUpdater_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 7); - if (content_ != null) { - output.writeMessage(8, getContent()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getCreateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(creator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, creator_); - } - if (lastUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getLastUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastUpdater_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, lastUpdater_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, labels__); - } - if (content_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getContent()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.SavedQuery)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.SavedQuery other = (com.google.cloud.asset.v1.SavedQuery) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime() - .equals(other.getCreateTime())) return false; - } - if (!getCreator() - .equals(other.getCreator())) return false; - if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; - if (hasLastUpdateTime()) { - if (!getLastUpdateTime() - .equals(other.getLastUpdateTime())) return false; - } - if (!getLastUpdater() - .equals(other.getLastUpdater())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (hasContent() != other.hasContent()) return false; - if (hasContent()) { - if (!getContent() - .equals(other.getContent())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + CREATOR_FIELD_NUMBER; - hash = (53 * hash) + getCreator().hashCode(); - if (hasLastUpdateTime()) { - hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdateTime().hashCode(); - } - hash = (37 * hash) + LAST_UPDATER_FIELD_NUMBER; - hash = (53 * hash) + getLastUpdater().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (hasContent()) { - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SavedQuery parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SavedQuery parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.SavedQuery prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A saved query which can be shared with others or used later.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.SavedQuery} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SavedQuery) - com.google.cloud.asset.v1.SavedQueryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 7: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 7: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SavedQuery.class, com.google.cloud.asset.v1.SavedQuery.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.SavedQuery.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - creator_ = ""; - - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - lastUpdater_ = ""; - - internalGetMutableLabels().clear(); - if (contentBuilder_ == null) { - content_ = null; - } else { - content_ = null; - contentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SavedQuery_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery getDefaultInstanceForType() { - return com.google.cloud.asset.v1.SavedQuery.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery build() { - com.google.cloud.asset.v1.SavedQuery result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery buildPartial() { - com.google.cloud.asset.v1.SavedQuery result = new com.google.cloud.asset.v1.SavedQuery(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.creator_ = creator_; - if (lastUpdateTimeBuilder_ == null) { - result.lastUpdateTime_ = lastUpdateTime_; - } else { - result.lastUpdateTime_ = lastUpdateTimeBuilder_.build(); - } - result.lastUpdater_ = lastUpdater_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (contentBuilder_ == null) { - result.content_ = content_; - } else { - result.content_ = contentBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.SavedQuery) { - return mergeFrom((com.google.cloud.asset.v1.SavedQuery)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.SavedQuery other) { - if (other == com.google.cloud.asset.v1.SavedQuery.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (!other.getCreator().isEmpty()) { - creator_ = other.creator_; - onChanged(); - } - if (other.hasLastUpdateTime()) { - mergeLastUpdateTime(other.getLastUpdateTime()); - } - if (!other.getLastUpdater().isEmpty()) { - lastUpdater_ = other.lastUpdater_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (other.hasContent()) { - mergeContent(other.getContent()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.SavedQuery parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.SavedQuery) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The resource name of the saved query. The format must be:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The resource name of the saved query. The format must be:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The resource name of the saved query. The format must be:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The resource name of the saved query. The format must be:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The resource name of the saved query. The format must be:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * The description of this saved query. This value should be fewer than 255
-     * characters.
-     * 
- * - * string description = 2; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The description of this saved query. This value should be fewer than 255
-     * characters.
-     * 
- * - * string description = 2; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The description of this saved query. This value should be fewer than 255
-     * characters.
-     * 
- * - * string description = 2; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * The description of this saved query. This value should be fewer than 255
-     * characters.
-     * 
- * - * string description = 2; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * The description of this saved query. This value should be fewer than 255
-     * characters.
-     * 
- * - * string description = 2; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setCreateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - } - /** - *
-     * Output only. The create time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), - getParentForChildren(), - isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private java.lang.Object creator_ = ""; - /** - *
-     * Output only. The account's email address who has created this saved query.
-     * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The creator. - */ - public java.lang.String getCreator() { - java.lang.Object ref = creator_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - creator_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The account's email address who has created this saved query.
-     * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for creator. - */ - public com.google.protobuf.ByteString - getCreatorBytes() { - java.lang.Object ref = creator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - creator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The account's email address who has created this saved query.
-     * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The creator to set. - * @return This builder for chaining. - */ - public Builder setCreator( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - creator_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The account's email address who has created this saved query.
-     * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearCreator() { - - creator_ = getDefaultInstance().getCreator(); - onChanged(); - return this; - } - /** - *
-     * Output only. The account's email address who has created this saved query.
-     * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for creator to set. - * @return This builder for chaining. - */ - public Builder setCreatorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - creator_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp lastUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastUpdateTimeBuilder_; - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the lastUpdateTime field is set. - */ - public boolean hasLastUpdateTime() { - return lastUpdateTimeBuilder_ != null || lastUpdateTime_ != null; - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastUpdateTime. - */ - public com.google.protobuf.Timestamp getLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - return lastUpdateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastUpdateTime_; - } else { - return lastUpdateTimeBuilder_.getMessage(); - } - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lastUpdateTime_ = value; - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder setLastUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - lastUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { - if (lastUpdateTimeBuilder_ == null) { - if (lastUpdateTime_ != null) { - lastUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(lastUpdateTime_).mergeFrom(value).buildPartial(); - } else { - lastUpdateTime_ = value; - } - onChanged(); - } else { - lastUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public Builder clearLastUpdateTime() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTime_ = null; - onChanged(); - } else { - lastUpdateTime_ = null; - lastUpdateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { - - onChanged(); - return getLastUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { - if (lastUpdateTimeBuilder_ != null) { - return lastUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return lastUpdateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lastUpdateTime_; - } - } - /** - *
-     * Output only. The last update time of this saved query.
-     * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getLastUpdateTimeFieldBuilder() { - if (lastUpdateTimeBuilder_ == null) { - lastUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLastUpdateTime(), - getParentForChildren(), - isClean()); - lastUpdateTime_ = null; - } - return lastUpdateTimeBuilder_; - } - - private java.lang.Object lastUpdater_ = ""; - /** - *
-     * Output only. The account's email address who has updated this saved query
-     * most recently.
-     * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastUpdater. - */ - public java.lang.String getLastUpdater() { - java.lang.Object ref = lastUpdater_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lastUpdater_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Output only. The account's email address who has updated this saved query
-     * most recently.
-     * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for lastUpdater. - */ - public com.google.protobuf.ByteString - getLastUpdaterBytes() { - java.lang.Object ref = lastUpdater_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lastUpdater_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Output only. The account's email address who has updated this saved query
-     * most recently.
-     * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The lastUpdater to set. - * @return This builder for chaining. - */ - public Builder setLastUpdater( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - lastUpdater_ = value; - onChanged(); - return this; - } - /** - *
-     * Output only. The account's email address who has updated this saved query
-     * most recently.
-     * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return This builder for chaining. - */ - public Builder clearLastUpdater() { - - lastUpdater_ = getDefaultInstance().getLastUpdater(); - onChanged(); - return this; - } - /** - *
-     * Output only. The account's email address who has updated this saved query
-     * most recently.
-     * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param value The bytes for lastUpdater to set. - * @return This builder for chaining. - */ - public Builder setLastUpdaterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - lastUpdater_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels applied on the resource.
-     * This value should not contain more than 10 entries. The key and value of
-     * each entry must be non-empty and fewer than 64 characters.
-     * 
- * - * map<string, string> labels = 7; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels applied on the resource.
-     * This value should not contain more than 10 entries. The key and value of
-     * each entry must be non-empty and fewer than 64 characters.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels applied on the resource.
-     * This value should not contain more than 10 entries. The key and value of
-     * each entry must be non-empty and fewer than 64 characters.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels applied on the resource.
-     * This value should not contain more than 10 entries. The key and value of
-     * each entry must be non-empty and fewer than 64 characters.
-     * 
- * - * map<string, string> labels = 7; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels applied on the resource.
-     * This value should not contain more than 10 entries. The key and value of
-     * each entry must be non-empty and fewer than 64 characters.
-     * 
- * - * map<string, string> labels = 7; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels applied on the resource.
-     * This value should not contain more than 10 entries. The key and value of
-     * each entry must be non-empty and fewer than 64 characters.
-     * 
- * - * map<string, string> labels = 7; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels applied on the resource.
-     * This value should not contain more than 10 entries. The key and value of
-     * each entry must be non-empty and fewer than 64 characters.
-     * 
- * - * map<string, string> labels = 7; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.cloud.asset.v1.SavedQuery.QueryContent content_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery.QueryContent, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder, com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder> contentBuilder_; - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - * @return Whether the content field is set. - */ - public boolean hasContent() { - return contentBuilder_ != null || content_ != null; - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - * @return The content. - */ - public com.google.cloud.asset.v1.SavedQuery.QueryContent getContent() { - if (contentBuilder_ == null) { - return content_ == null ? com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance() : content_; - } else { - return contentBuilder_.getMessage(); - } - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - public Builder setContent(com.google.cloud.asset.v1.SavedQuery.QueryContent value) { - if (contentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - onChanged(); - } else { - contentBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - public Builder setContent( - com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder builderForValue) { - if (contentBuilder_ == null) { - content_ = builderForValue.build(); - onChanged(); - } else { - contentBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - public Builder mergeContent(com.google.cloud.asset.v1.SavedQuery.QueryContent value) { - if (contentBuilder_ == null) { - if (content_ != null) { - content_ = - com.google.cloud.asset.v1.SavedQuery.QueryContent.newBuilder(content_).mergeFrom(value).buildPartial(); - } else { - content_ = value; - } - onChanged(); - } else { - contentBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - public Builder clearContent() { - if (contentBuilder_ == null) { - content_ = null; - onChanged(); - } else { - content_ = null; - contentBuilder_ = null; - } - - return this; - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - public com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder getContentBuilder() { - - onChanged(); - return getContentFieldBuilder().getBuilder(); - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - public com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder getContentOrBuilder() { - if (contentBuilder_ != null) { - return contentBuilder_.getMessageOrBuilder(); - } else { - return content_ == null ? - com.google.cloud.asset.v1.SavedQuery.QueryContent.getDefaultInstance() : content_; - } - } - /** - *
-     * The query content.
-     * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery.QueryContent, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder, com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder> - getContentFieldBuilder() { - if (contentBuilder_ == null) { - contentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery.QueryContent, com.google.cloud.asset.v1.SavedQuery.QueryContent.Builder, com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder>( - getContent(), - getParentForChildren(), - isClean()); - content_ = null; - } - return contentBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SavedQuery) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SavedQuery) - private static final com.google.cloud.asset.v1.SavedQuery DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SavedQuery(); - } - - public static com.google.cloud.asset.v1.SavedQuery getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SavedQuery parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SavedQuery(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java deleted file mode 100644 index bd562e165a0a..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryName.java +++ /dev/null @@ -1,378 +0,0 @@ -/* - * Copyright 2022 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.v1; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class SavedQueryName implements ResourceName { - private static final PathTemplate PROJECT_SAVED_QUERY = - PathTemplate.createWithoutUrlEncoding("projects/{project}/savedQueries/{saved_query}"); - private static final PathTemplate FOLDER_SAVED_QUERY = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/savedQueries/{saved_query}"); - private static final PathTemplate ORGANIZATION_SAVED_QUERY = - PathTemplate.createWithoutUrlEncoding( - "organizations/{organization}/savedQueries/{saved_query}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String savedQuery; - private final String folder; - private final String organization; - - @Deprecated - protected SavedQueryName() { - project = null; - savedQuery = null; - folder = null; - organization = null; - } - - private SavedQueryName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - savedQuery = Preconditions.checkNotNull(builder.getSavedQuery()); - folder = null; - organization = null; - pathTemplate = PROJECT_SAVED_QUERY; - } - - private SavedQueryName(FolderSavedQueryBuilder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - savedQuery = Preconditions.checkNotNull(builder.getSavedQuery()); - project = null; - organization = null; - pathTemplate = FOLDER_SAVED_QUERY; - } - - private SavedQueryName(OrganizationSavedQueryBuilder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - savedQuery = Preconditions.checkNotNull(builder.getSavedQuery()); - project = null; - folder = null; - pathTemplate = ORGANIZATION_SAVED_QUERY; - } - - public String getProject() { - return project; - } - - public String getSavedQuery() { - return savedQuery; - } - - public String getFolder() { - return folder; - } - - public String getOrganization() { - return organization; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectSavedQueryBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static FolderSavedQueryBuilder newFolderSavedQueryBuilder() { - return new FolderSavedQueryBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static OrganizationSavedQueryBuilder newOrganizationSavedQueryBuilder() { - return new OrganizationSavedQueryBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static SavedQueryName of(String project, String savedQuery) { - return newBuilder().setProject(project).setSavedQuery(savedQuery).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static SavedQueryName ofProjectSavedQueryName(String project, String savedQuery) { - return newBuilder().setProject(project).setSavedQuery(savedQuery).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static SavedQueryName ofFolderSavedQueryName(String folder, String savedQuery) { - return newFolderSavedQueryBuilder().setFolder(folder).setSavedQuery(savedQuery).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static SavedQueryName ofOrganizationSavedQueryName( - String organization, String savedQuery) { - return newOrganizationSavedQueryBuilder() - .setOrganization(organization) - .setSavedQuery(savedQuery) - .build(); - } - - public static String format(String project, String savedQuery) { - return newBuilder().setProject(project).setSavedQuery(savedQuery).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectSavedQueryName(String project, String savedQuery) { - return newBuilder().setProject(project).setSavedQuery(savedQuery).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatFolderSavedQueryName(String folder, String savedQuery) { - return newFolderSavedQueryBuilder() - .setFolder(folder) - .setSavedQuery(savedQuery) - .build() - .toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationSavedQueryName(String organization, String savedQuery) { - return newOrganizationSavedQueryBuilder() - .setOrganization(organization) - .setSavedQuery(savedQuery) - .build() - .toString(); - } - - public static SavedQueryName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_SAVED_QUERY.matches(formattedString)) { - Map matchMap = PROJECT_SAVED_QUERY.match(formattedString); - return ofProjectSavedQueryName(matchMap.get("project"), matchMap.get("saved_query")); - } else if (FOLDER_SAVED_QUERY.matches(formattedString)) { - Map matchMap = FOLDER_SAVED_QUERY.match(formattedString); - return ofFolderSavedQueryName(matchMap.get("folder"), matchMap.get("saved_query")); - } else if (ORGANIZATION_SAVED_QUERY.matches(formattedString)) { - Map matchMap = ORGANIZATION_SAVED_QUERY.match(formattedString); - return ofOrganizationSavedQueryName( - matchMap.get("organization"), matchMap.get("saved_query")); - } - throw new ValidationException("SavedQueryName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (SavedQueryName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_SAVED_QUERY.matches(formattedString) - || FOLDER_SAVED_QUERY.matches(formattedString) - || ORGANIZATION_SAVED_QUERY.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (savedQuery != null) { - fieldMapBuilder.put("saved_query", savedQuery); - } - if (folder != null) { - fieldMapBuilder.put("folder", folder); - } - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - SavedQueryName that = ((SavedQueryName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.savedQuery, that.savedQuery) - && Objects.equals(this.folder, that.folder) - && Objects.equals(this.organization, that.organization); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(savedQuery); - h *= 1000003; - h ^= Objects.hashCode(folder); - h *= 1000003; - h ^= Objects.hashCode(organization); - return h; - } - - /** Builder for projects/{project}/savedQueries/{saved_query}. */ - public static class Builder { - private String project; - private String savedQuery; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getSavedQuery() { - return savedQuery; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setSavedQuery(String savedQuery) { - this.savedQuery = savedQuery; - return this; - } - - private Builder(SavedQueryName savedQueryName) { - Preconditions.checkArgument( - Objects.equals(savedQueryName.pathTemplate, PROJECT_SAVED_QUERY), - "toBuilder is only supported when SavedQueryName has the pattern of projects/{project}/savedQueries/{saved_query}"); - this.project = savedQueryName.project; - this.savedQuery = savedQueryName.savedQuery; - } - - public SavedQueryName build() { - return new SavedQueryName(this); - } - } - - /** Builder for folders/{folder}/savedQueries/{saved_query}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class FolderSavedQueryBuilder { - private String folder; - private String savedQuery; - - protected FolderSavedQueryBuilder() {} - - public String getFolder() { - return folder; - } - - public String getSavedQuery() { - return savedQuery; - } - - public FolderSavedQueryBuilder setFolder(String folder) { - this.folder = folder; - return this; - } - - public FolderSavedQueryBuilder setSavedQuery(String savedQuery) { - this.savedQuery = savedQuery; - return this; - } - - public SavedQueryName build() { - return new SavedQueryName(this); - } - } - - /** Builder for organizations/{organization}/savedQueries/{saved_query}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class OrganizationSavedQueryBuilder { - private String organization; - private String savedQuery; - - protected OrganizationSavedQueryBuilder() {} - - public String getOrganization() { - return organization; - } - - public String getSavedQuery() { - return savedQuery; - } - - public OrganizationSavedQueryBuilder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public OrganizationSavedQueryBuilder setSavedQuery(String savedQuery) { - this.savedQuery = savedQuery; - return this; - } - - public SavedQueryName build() { - return new SavedQueryName(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java deleted file mode 100644 index 96eeda6cf74d..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SavedQueryOrBuilder.java +++ /dev/null @@ -1,246 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface SavedQueryOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SavedQuery) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The resource name of the saved query. The format must be:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The resource name of the saved query. The format must be:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The description of this saved query. This value should be fewer than 255
-   * characters.
-   * 
- * - * string description = 2; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * The description of this saved query. This value should be fewer than 255
-   * characters.
-   * 
- * - * string description = 2; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Output only. The create time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - *
-   * Output only. The create time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - *
-   * Output only. The create time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - *
-   * Output only. The account's email address who has created this saved query.
-   * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The creator. - */ - java.lang.String getCreator(); - /** - *
-   * Output only. The account's email address who has created this saved query.
-   * 
- * - * string creator = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for creator. - */ - com.google.protobuf.ByteString - getCreatorBytes(); - - /** - *
-   * Output only. The last update time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return Whether the lastUpdateTime field is set. - */ - boolean hasLastUpdateTime(); - /** - *
-   * Output only. The last update time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastUpdateTime. - */ - com.google.protobuf.Timestamp getLastUpdateTime(); - /** - *
-   * Output only. The last update time of this saved query.
-   * 
- * - * .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); - - /** - *
-   * Output only. The account's email address who has updated this saved query
-   * most recently.
-   * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The lastUpdater. - */ - java.lang.String getLastUpdater(); - /** - *
-   * Output only. The account's email address who has updated this saved query
-   * most recently.
-   * 
- * - * string last_updater = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return The bytes for lastUpdater. - */ - com.google.protobuf.ByteString - getLastUpdaterBytes(); - - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - int getLabelsCount(); - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels applied on the resource.
-   * This value should not contain more than 10 entries. The key and value of
-   * each entry must be non-empty and fewer than 64 characters.
-   * 
- * - * map<string, string> labels = 7; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * The query content.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - * @return Whether the content field is set. - */ - boolean hasContent(); - /** - *
-   * The query content.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - * @return The content. - */ - com.google.cloud.asset.v1.SavedQuery.QueryContent getContent(); - /** - *
-   * The query content.
-   * 
- * - * .google.cloud.asset.v1.SavedQuery.QueryContent content = 8; - */ - com.google.cloud.asset.v1.SavedQuery.QueryContentOrBuilder getContentOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java deleted file mode 100644 index ee1eb9ddf53a..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java +++ /dev/null @@ -1,2025 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Search all IAM policies request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesRequest} - */ -public final class SearchAllIamPoliciesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllIamPoliciesRequest) - SearchAllIamPoliciesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllIamPoliciesRequest.newBuilder() to construct. - private SearchAllIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllIamPoliciesRequest() { - scope_ = ""; - query_ = ""; - pageToken_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllIamPoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllIamPoliciesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - scope_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 24: { - - pageSize_ = input.readInt32(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.Builder.class); - } - - public static final int SCOPE_FIELD_NUMBER = 1; - private volatile java.lang.Object scope_; - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the IAM policies within the `scope`. The caller must
-   * be granted the
-   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - @java.lang.Override - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } - } - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the IAM policies within the `scope`. The caller must
-   * be granted the
-   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_FIELD_NUMBER = 2; - private volatile java.lang.Object query_; - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * IAM policies within the specified `scope`. Note that the query string is
-   * compared against each Cloud IAM policy binding, including its principals,
-   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-   * contain the bindings that match your query. To learn more about the IAM
-   * policy structure, see the [IAM policy
-   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-   * Examples:
-   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-   *   "amy@gmail.com".
-   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-   *   the Compute Admin role.
-   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-   *   prefix of any word in the binding.
-   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-   *   bindings that specify a role containing "storage.buckets.update"
-   *   permission. Note that if callers don't have `iam.roles.get` access to a
-   *   role's included permissions, policy bindings that specify this role will
-   *   be dropped from the search results.
-   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-   *   role containing "upd" as a prefix of any word in the role permission.
-   *   Note that if callers don't have `iam.roles.get` access to a role's
-   *   included permissions, policy bindings that specify this role will be
-   *   dropped from the search results.
-   * * `resource:organizations/123456` to find IAM policy bindings
-   *   that are set on "organizations/123456".
-   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-   *   find IAM policy bindings that are set on the project named "myproject".
-   * * `Important` to find IAM policy bindings that contain "Important" as a
-   *   word in any of the searchable fields (except for the included
-   *   permissions).
-   * * `resource:(instance1 OR instance2) policy:amy` to find
-   *   IAM policy bindings that are set on resources "instance1" or
-   *   "instance2" and also specify user "amy".
-   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-   *   Compute Admin role.
-   * * `memberTypes:user` to find IAM policy bindings that contain the
-   *   principal type "user".
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } - } - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * IAM policies within the specified `scope`. Note that the query string is
-   * compared against each Cloud IAM policy binding, including its principals,
-   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-   * contain the bindings that match your query. To learn more about the IAM
-   * policy structure, see the [IAM policy
-   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-   * Examples:
-   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-   *   "amy@gmail.com".
-   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-   *   the Compute Admin role.
-   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-   *   prefix of any word in the binding.
-   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-   *   bindings that specify a role containing "storage.buckets.update"
-   *   permission. Note that if callers don't have `iam.roles.get` access to a
-   *   role's included permissions, policy bindings that specify this role will
-   *   be dropped from the search results.
-   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-   *   role containing "upd" as a prefix of any word in the role permission.
-   *   Note that if callers don't have `iam.roles.get` access to a role's
-   *   included permissions, policy bindings that specify this role will be
-   *   dropped from the search results.
-   * * `resource:organizations/123456` to find IAM policy bindings
-   *   that are set on "organizations/123456".
-   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-   *   find IAM policy bindings that are set on the project named "myproject".
-   * * `Important` to find IAM policy bindings that contain "Important" as a
-   *   word in any of the searchable fields (except for the included
-   *   permissions).
-   * * `resource:(instance1 OR instance2) policy:amy` to find
-   *   IAM policy bindings that are set on resources "instance1" or
-   *   "instance2" and also specify user "amy".
-   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-   *   Compute Admin role.
-   * * `memberTypes:user` to find IAM policy bindings that contain the
-   *   principal type "user".
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_; - /** - *
-   * Optional. The page size for search result pagination. Page size is capped
-   * at 500 even if a larger value is given. If set to zero, server will pick an
-   * appropriate default. Returned results may be fewer than requested. When
-   * this happens, there could be more results as long as `next_page_token` is
-   * returned.
-   * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - private volatile java.lang.Object pageToken_; - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding
-   * call to this method. `page_token` must be the value of `next_page_token`
-   * from the previous response. The values of all other method parameters must
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding
-   * call to this method. `page_token` must be the value of `next_page_token`
-   * from the previous response. The values of all other method parameters must
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int ORDER_BY_FIELD_NUMBER = 7; - private volatile java.lang.Object orderBy_; - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "assetType DESC, resource".
-   * Only singular primitive fields in the response are sortable:
-   *   * resource
-   *   * assetType
-   *   * project
-   * All the other fields such as repeated fields (e.g., `folders`) and
-   * non-primitive fields (e.g., `policy`) are not supported.
-   * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "assetType DESC, resource".
-   * Only singular primitive fields in the response are sortable:
-   *   * resource
-   *   * assetType
-   *   * project
-   * All the other fields such as repeated fields (e.g., `folders`) and
-   * non-primitive fields (e.g., `policy`) are not supported.
-   * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, assetTypes_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, orderBy_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, orderBy_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest other = (com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) obj; - - if (!getScope() - .equals(other.getScope())) return false; - if (!getQuery() - .equals(other.getQuery())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScope().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllIamPoliciesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all IAM policies request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllIamPoliciesRequest) - com.google.cloud.asset.v1.SearchAllIamPoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - query_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - orderBy_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest build() { - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest buildPartial() { - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest result = new com.google.cloud.asset.v1.SearchAllIamPoliciesRequest(this); - int from_bitField0_ = bitField0_; - result.scope_ = scope_; - result.query_ = query_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.orderBy_ = orderBy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) { - return mergeFrom((com.google.cloud.asset.v1.SearchAllIamPoliciesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllIamPoliciesRequest other) { - if (other == com.google.cloud.asset.v1.SearchAllIamPoliciesRequest.getDefaultInstance()) return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllIamPoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.SearchAllIamPoliciesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object scope_ = ""; - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the IAM policies within the `scope`. The caller must
-     * be granted the
-     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the IAM policies within the `scope`. The caller must
-     * be granted the
-     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the IAM policies within the `scope`. The caller must
-     * be granted the
-     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - scope_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the IAM policies within the `scope`. The caller must
-     * be granted the
-     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearScope() { - - scope_ = getDefaultInstance().getScope(); - onChanged(); - return this; - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the IAM policies within the `scope`. The caller must
-     * be granted the
-     * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - scope_ = value; - onChanged(); - return this; - } - - private java.lang.Object query_ = ""; - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * IAM policies within the specified `scope`. Note that the query string is
-     * compared against each Cloud IAM policy binding, including its principals,
-     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-     * contain the bindings that match your query. To learn more about the IAM
-     * policy structure, see the [IAM policy
-     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-     * Examples:
-     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-     *   "amy@gmail.com".
-     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-     *   the Compute Admin role.
-     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-     *   prefix of any word in the binding.
-     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-     *   bindings that specify a role containing "storage.buckets.update"
-     *   permission. Note that if callers don't have `iam.roles.get` access to a
-     *   role's included permissions, policy bindings that specify this role will
-     *   be dropped from the search results.
-     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-     *   role containing "upd" as a prefix of any word in the role permission.
-     *   Note that if callers don't have `iam.roles.get` access to a role's
-     *   included permissions, policy bindings that specify this role will be
-     *   dropped from the search results.
-     * * `resource:organizations/123456` to find IAM policy bindings
-     *   that are set on "organizations/123456".
-     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-     *   find IAM policy bindings that are set on the project named "myproject".
-     * * `Important` to find IAM policy bindings that contain "Important" as a
-     *   word in any of the searchable fields (except for the included
-     *   permissions).
-     * * `resource:(instance1 OR instance2) policy:amy` to find
-     *   IAM policy bindings that are set on resources "instance1" or
-     *   "instance2" and also specify user "amy".
-     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-     *   Compute Admin role.
-     * * `memberTypes:user` to find IAM policy bindings that contain the
-     *   principal type "user".
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * IAM policies within the specified `scope`. Note that the query string is
-     * compared against each Cloud IAM policy binding, including its principals,
-     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-     * contain the bindings that match your query. To learn more about the IAM
-     * policy structure, see the [IAM policy
-     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-     * Examples:
-     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-     *   "amy@gmail.com".
-     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-     *   the Compute Admin role.
-     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-     *   prefix of any word in the binding.
-     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-     *   bindings that specify a role containing "storage.buckets.update"
-     *   permission. Note that if callers don't have `iam.roles.get` access to a
-     *   role's included permissions, policy bindings that specify this role will
-     *   be dropped from the search results.
-     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-     *   role containing "upd" as a prefix of any word in the role permission.
-     *   Note that if callers don't have `iam.roles.get` access to a role's
-     *   included permissions, policy bindings that specify this role will be
-     *   dropped from the search results.
-     * * `resource:organizations/123456` to find IAM policy bindings
-     *   that are set on "organizations/123456".
-     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-     *   find IAM policy bindings that are set on the project named "myproject".
-     * * `Important` to find IAM policy bindings that contain "Important" as a
-     *   word in any of the searchable fields (except for the included
-     *   permissions).
-     * * `resource:(instance1 OR instance2) policy:amy` to find
-     *   IAM policy bindings that are set on resources "instance1" or
-     *   "instance2" and also specify user "amy".
-     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-     *   Compute Admin role.
-     * * `memberTypes:user` to find IAM policy bindings that contain the
-     *   principal type "user".
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * IAM policies within the specified `scope`. Note that the query string is
-     * compared against each Cloud IAM policy binding, including its principals,
-     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-     * contain the bindings that match your query. To learn more about the IAM
-     * policy structure, see the [IAM policy
-     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-     * Examples:
-     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-     *   "amy@gmail.com".
-     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-     *   the Compute Admin role.
-     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-     *   prefix of any word in the binding.
-     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-     *   bindings that specify a role containing "storage.buckets.update"
-     *   permission. Note that if callers don't have `iam.roles.get` access to a
-     *   role's included permissions, policy bindings that specify this role will
-     *   be dropped from the search results.
-     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-     *   role containing "upd" as a prefix of any word in the role permission.
-     *   Note that if callers don't have `iam.roles.get` access to a role's
-     *   included permissions, policy bindings that specify this role will be
-     *   dropped from the search results.
-     * * `resource:organizations/123456` to find IAM policy bindings
-     *   that are set on "organizations/123456".
-     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-     *   find IAM policy bindings that are set on the project named "myproject".
-     * * `Important` to find IAM policy bindings that contain "Important" as a
-     *   word in any of the searchable fields (except for the included
-     *   permissions).
-     * * `resource:(instance1 OR instance2) policy:amy` to find
-     *   IAM policy bindings that are set on resources "instance1" or
-     *   "instance2" and also specify user "amy".
-     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-     *   Compute Admin role.
-     * * `memberTypes:user` to find IAM policy bindings that contain the
-     *   principal type "user".
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - query_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * IAM policies within the specified `scope`. Note that the query string is
-     * compared against each Cloud IAM policy binding, including its principals,
-     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-     * contain the bindings that match your query. To learn more about the IAM
-     * policy structure, see the [IAM policy
-     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-     * Examples:
-     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-     *   "amy@gmail.com".
-     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-     *   the Compute Admin role.
-     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-     *   prefix of any word in the binding.
-     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-     *   bindings that specify a role containing "storage.buckets.update"
-     *   permission. Note that if callers don't have `iam.roles.get` access to a
-     *   role's included permissions, policy bindings that specify this role will
-     *   be dropped from the search results.
-     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-     *   role containing "upd" as a prefix of any word in the role permission.
-     *   Note that if callers don't have `iam.roles.get` access to a role's
-     *   included permissions, policy bindings that specify this role will be
-     *   dropped from the search results.
-     * * `resource:organizations/123456` to find IAM policy bindings
-     *   that are set on "organizations/123456".
-     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-     *   find IAM policy bindings that are set on the project named "myproject".
-     * * `Important` to find IAM policy bindings that contain "Important" as a
-     *   word in any of the searchable fields (except for the included
-     *   permissions).
-     * * `resource:(instance1 OR instance2) policy:amy` to find
-     *   IAM policy bindings that are set on resources "instance1" or
-     *   "instance2" and also specify user "amy".
-     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-     *   Compute Admin role.
-     * * `memberTypes:user` to find IAM policy bindings that contain the
-     *   principal type "user".
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearQuery() { - - query_ = getDefaultInstance().getQuery(); - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * IAM policies within the specified `scope`. Note that the query string is
-     * compared against each Cloud IAM policy binding, including its principals,
-     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-     * contain the bindings that match your query. To learn more about the IAM
-     * policy structure, see the [IAM policy
-     * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-     * Examples:
-     * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-     *   "amy@gmail.com".
-     * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-     *   the Compute Admin role.
-     * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-     *   prefix of any word in the binding.
-     * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-     *   bindings that specify a role containing "storage.buckets.update"
-     *   permission. Note that if callers don't have `iam.roles.get` access to a
-     *   role's included permissions, policy bindings that specify this role will
-     *   be dropped from the search results.
-     * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-     *   role containing "upd" as a prefix of any word in the role permission.
-     *   Note that if callers don't have `iam.roles.get` access to a role's
-     *   included permissions, policy bindings that specify this role will be
-     *   dropped from the search results.
-     * * `resource:organizations/123456` to find IAM policy bindings
-     *   that are set on "organizations/123456".
-     * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-     *   find IAM policy bindings that are set on the project named "myproject".
-     * * `Important` to find IAM policy bindings that contain "Important" as a
-     *   word in any of the searchable fields (except for the included
-     *   permissions).
-     * * `resource:(instance1 OR instance2) policy:amy` to find
-     *   IAM policy bindings that are set on resources "instance1" or
-     *   "instance2" and also specify user "amy".
-     * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-     *   Compute Admin role.
-     * * `memberTypes:user` to find IAM policy bindings that contain the
-     *   principal type "user".
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for query to set. - * @return This builder for chaining. - */ - public Builder setQueryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - query_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Optional. The page size for search result pagination. Page size is capped
-     * at 500 even if a larger value is given. If set to zero, server will pick an
-     * appropriate default. Returned results may be fewer than requested. When
-     * this happens, there could be more results as long as `next_page_token` is
-     * returned.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped
-     * at 500 even if a larger value is given. If set to zero, server will pick an
-     * appropriate default. Returned results may be fewer than requested. When
-     * this happens, there could be more results as long as `next_page_token` is
-     * returned.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped
-     * at 500 even if a larger value is given. If set to zero, server will pick an
-     * appropriate default. Returned results may be fewer than requested. When
-     * this happens, there could be more results as long as `next_page_token` is
-     * returned.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding
-     * call to this method. `page_token` must be the value of `next_page_token`
-     * from the previous response. The values of all other method parameters must
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding
-     * call to this method. `page_token` must be the value of `next_page_token`
-     * from the previous response. The values of all other method parameters must
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding
-     * call to this method. `page_token` must be the value of `next_page_token`
-     * from the previous response. The values of all other method parameters must
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding
-     * call to this method. `page_token` must be the value of `next_page_token`
-     * from the previous response. The values of all other method parameters must
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding
-     * call to this method. `page_token` must be the value of `next_page_token`
-     * from the previous response. The values of all other method parameters must
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that the IAM policies are attached to. If
-     * empty, it will search the IAM policies that are attached to all the
-     * [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-     * starts with "compute.googleapis.com".
-     * * ".*Instance" snapshots IAM policies attached to asset type ends with
-     * "Instance".
-     * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-     * "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "assetType DESC, resource".
-     * Only singular primitive fields in the response are sortable:
-     *   * resource
-     *   * assetType
-     *   * project
-     * All the other fields such as repeated fields (e.g., `folders`) and
-     * non-primitive fields (e.g., `policy`) are not supported.
-     * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "assetType DESC, resource".
-     * Only singular primitive fields in the response are sortable:
-     *   * resource
-     *   * assetType
-     *   * project
-     * All the other fields such as repeated fields (e.g., `folders`) and
-     * non-primitive fields (e.g., `policy`) are not supported.
-     * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "assetType DESC, resource".
-     * Only singular primitive fields in the response are sortable:
-     *   * resource
-     *   * assetType
-     *   * project
-     * All the other fields such as repeated fields (e.g., `folders`) and
-     * non-primitive fields (e.g., `policy`) are not supported.
-     * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "assetType DESC, resource".
-     * Only singular primitive fields in the response are sortable:
-     *   * resource
-     *   * assetType
-     *   * project
-     * All the other fields such as repeated fields (e.g., `folders`) and
-     * non-primitive fields (e.g., `policy`) are not supported.
-     * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "assetType DESC, resource".
-     * Only singular primitive fields in the response are sortable:
-     *   * resource
-     *   * assetType
-     *   * project
-     * All the other fields such as repeated fields (e.g., `folders`) and
-     * non-primitive fields (e.g., `policy`) are not supported.
-     * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllIamPoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllIamPoliciesRequest) - private static final com.google.cloud.asset.v1.SearchAllIamPoliciesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllIamPoliciesRequest(); - } - - public static com.google.cloud.asset.v1.SearchAllIamPoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllIamPoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java deleted file mode 100644 index 5922758b60d5..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java +++ /dev/null @@ -1,316 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface SearchAllIamPoliciesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllIamPoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the IAM policies within the `scope`. The caller must
-   * be granted the
-   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - java.lang.String getScope(); - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the IAM policies within the `scope`. The caller must
-   * be granted the
-   * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - com.google.protobuf.ByteString - getScopeBytes(); - - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * IAM policies within the specified `scope`. Note that the query string is
-   * compared against each Cloud IAM policy binding, including its principals,
-   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-   * contain the bindings that match your query. To learn more about the IAM
-   * policy structure, see the [IAM policy
-   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-   * Examples:
-   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-   *   "amy@gmail.com".
-   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-   *   the Compute Admin role.
-   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-   *   prefix of any word in the binding.
-   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-   *   bindings that specify a role containing "storage.buckets.update"
-   *   permission. Note that if callers don't have `iam.roles.get` access to a
-   *   role's included permissions, policy bindings that specify this role will
-   *   be dropped from the search results.
-   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-   *   role containing "upd" as a prefix of any word in the role permission.
-   *   Note that if callers don't have `iam.roles.get` access to a role's
-   *   included permissions, policy bindings that specify this role will be
-   *   dropped from the search results.
-   * * `resource:organizations/123456` to find IAM policy bindings
-   *   that are set on "organizations/123456".
-   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-   *   find IAM policy bindings that are set on the project named "myproject".
-   * * `Important` to find IAM policy bindings that contain "Important" as a
-   *   word in any of the searchable fields (except for the included
-   *   permissions).
-   * * `resource:(instance1 OR instance2) policy:amy` to find
-   *   IAM policy bindings that are set on resources "instance1" or
-   *   "instance2" and also specify user "amy".
-   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-   *   Compute Admin role.
-   * * `memberTypes:user` to find IAM policy bindings that contain the
-   *   principal type "user".
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - java.lang.String getQuery(); - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * IAM policies within the specified `scope`. Note that the query string is
-   * compared against each Cloud IAM policy binding, including its principals,
-   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
-   * contain the bindings that match your query. To learn more about the IAM
-   * policy structure, see the [IAM policy
-   * documentation](https://cloud.google.com/iam/help/allow-policies/structure).
-   * Examples:
-   * * `policy:amy@gmail.com` to find IAM policy bindings that specify user
-   *   "amy@gmail.com".
-   * * `policy:roles/compute.admin` to find IAM policy bindings that specify
-   *   the Compute Admin role.
-   * * `policy:comp*` to find IAM policy bindings that contain "comp" as a
-   *   prefix of any word in the binding.
-   * * `policy.role.permissions:storage.buckets.update` to find IAM policy
-   *   bindings that specify a role containing "storage.buckets.update"
-   *   permission. Note that if callers don't have `iam.roles.get` access to a
-   *   role's included permissions, policy bindings that specify this role will
-   *   be dropped from the search results.
-   * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a
-   *   role containing "upd" as a prefix of any word in the role permission.
-   *   Note that if callers don't have `iam.roles.get` access to a role's
-   *   included permissions, policy bindings that specify this role will be
-   *   dropped from the search results.
-   * * `resource:organizations/123456` to find IAM policy bindings
-   *   that are set on "organizations/123456".
-   * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to
-   *   find IAM policy bindings that are set on the project named "myproject".
-   * * `Important` to find IAM policy bindings that contain "Important" as a
-   *   word in any of the searchable fields (except for the included
-   *   permissions).
-   * * `resource:(instance1 OR instance2) policy:amy` to find
-   *   IAM policy bindings that are set on resources "instance1" or
-   *   "instance2" and also specify user "amy".
-   * * `roles:roles/compute.admin` to find IAM policy bindings that specify the
-   *   Compute Admin role.
-   * * `memberTypes:user` to find IAM policy bindings that contain the
-   *   principal type "user".
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - com.google.protobuf.ByteString - getQueryBytes(); - - /** - *
-   * Optional. The page size for search result pagination. Page size is capped
-   * at 500 even if a larger value is given. If set to zero, server will pick an
-   * appropriate default. Returned results may be fewer than requested. When
-   * this happens, there could be more results as long as `next_page_token` is
-   * returned.
-   * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding
-   * call to this method. `page_token` must be the value of `next_page_token`
-   * from the previous response. The values of all other method parameters must
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding
-   * call to this method. `page_token` must be the value of `next_page_token`
-   * from the previous response. The values of all other method parameters must
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * Optional. A list of asset types that the IAM policies are attached to. If
-   * empty, it will search the IAM policies that are attached to all the
-   * [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots IAM policies attached to asset type
-   * starts with "compute.googleapis.com".
-   * * ".*Instance" snapshots IAM policies attached to asset type ends with
-   * "Instance".
-   * * ".*Instance.*" snapshots IAM policies attached to asset type contains
-   * "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "assetType DESC, resource".
-   * Only singular primitive fields in the response are sortable:
-   *   * resource
-   *   * assetType
-   *   * project
-   * All the other fields such as repeated fields (e.g., `folders`) and
-   * non-primitive fields (e.g., `policy`) are not supported.
-   * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "assetType DESC, resource".
-   * Only singular primitive fields in the response are sortable:
-   *   * resource
-   *   * assetType
-   *   * project
-   * All the other fields such as repeated fields (e.g., `folders`) and
-   * non-primitive fields (e.g., `policy`) are not supported.
-   * 
- * - * string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java deleted file mode 100644 index fa526bc5f7ac..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponse.java +++ /dev/null @@ -1,1075 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Search all IAM policies response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesResponse} - */ -public final class SearchAllIamPoliciesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllIamPoliciesResponse) - SearchAllIamPoliciesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllIamPoliciesResponse.newBuilder() to construct. - private SearchAllIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllIamPoliciesResponse() { - results_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllIamPoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllIamPoliciesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.asset.v1.IamPolicySearchResult.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.Builder.class); - } - - public static final int RESULTS_FIELD_NUMBER = 1; - private java.util.List results_; - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResult getResults(int index) { - return results_.get(index); - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse other = (com.google.cloud.asset.v1.SearchAllIamPoliciesResponse) obj; - - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllIamPoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all IAM policies response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllIamPoliciesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllIamPoliciesResponse) - com.google.cloud.asset.v1.SearchAllIamPoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse build() { - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse buildPartial() { - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse result = new com.google.cloud.asset.v1.SearchAllIamPoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.SearchAllIamPoliciesResponse) { - return mergeFrom((com.google.cloud.asset.v1.SearchAllIamPoliciesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllIamPoliciesResponse other) { - if (other == com.google.cloud.asset.v1.SearchAllIamPoliciesResponse.getDefaultInstance()) return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllIamPoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.SearchAllIamPoliciesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicySearchResult, com.google.cloud.asset.v1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder> resultsBuilder_; - - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1.IamPolicySearchResult getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1.IamPolicySearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1.IamPolicySearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder addResults(com.google.cloud.asset.v1.IamPolicySearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1.IamPolicySearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder addResults( - com.google.cloud.asset.v1.IamPolicySearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1.IamPolicySearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1.IamPolicySearchResult.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1.IamPolicySearchResult.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance()); - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1.IamPolicySearchResult.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.IamPolicySearchResult.getDefaultInstance()); - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicySearchResult, com.google.cloud.asset.v1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.IamPolicySearchResult, com.google.cloud.asset.v1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllIamPoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllIamPoliciesResponse) - private static final com.google.cloud.asset.v1.SearchAllIamPoliciesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllIamPoliciesResponse(); - } - - public static com.google.cloud.asset.v1.SearchAllIamPoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllIamPoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java deleted file mode 100644 index e1866ae585cc..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesResponseOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface SearchAllIamPoliciesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllIamPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - java.util.List - getResultsList(); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - com.google.cloud.asset.v1.IamPolicySearchResult getResults(int index); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - int getResultsCount(); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1; - */ - com.google.cloud.asset.v1.IamPolicySearchResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java deleted file mode 100644 index d1c31d44dcca..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java +++ /dev/null @@ -1,2658 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Search all resources request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesRequest} - */ -public final class SearchAllResourcesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllResourcesRequest) - SearchAllResourcesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllResourcesRequest.newBuilder() to construct. - private SearchAllResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllResourcesRequest() { - scope_ = ""; - query_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - pageToken_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllResourcesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllResourcesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - scope_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: { - - pageSize_ = input.readInt32(); - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 66: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (readMask_ != null) { - subBuilder = readMask_.toBuilder(); - } - readMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readMask_); - readMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1.SearchAllResourcesRequest.Builder.class); - } - - public static final int SCOPE_FIELD_NUMBER = 1; - private volatile java.lang.Object scope_; - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the resources within the `scope`. The caller must be
-   * granted the
-   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - @java.lang.Override - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } - } - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the resources within the `scope`. The caller must be
-   * granted the
-   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_FIELD_NUMBER = 2; - private volatile java.lang.Object query_; - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * resources within the specified `scope`.
-   * Examples:
-   * * `name:Important` to find Cloud resources whose name contains
-   *   "Important" as a word.
-   * * `name=Important` to find the Cloud resource whose name is exactly
-   *   "Important".
-   * * `displayName:Impor*` to find Cloud resources whose display name
-   *   contains "Impor" as a prefix of any word in the field.
-   * * `location:us-west*` to find Cloud resources whose location contains both
-   *   "us" and "west" as prefixes.
-   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-   *   a key or value.
-   * * `labels.env:prod` to find Cloud resources that have a label "env"
-   *   and its value is "prod".
-   * * `labels.env:*` to find Cloud resources that have a label "env".
-   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-   *   encryption key whose name contains the word "key".
-   * * `relationships:instance-group-1` to find Cloud resources that have
-   *   relationships with "instance-group-1" in the related resource name.
-   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-   *   compute instances that have relationships with "instance-group-1" in the
-   *   compute instance group resource name, for relationship type
-   *   "INSTANCE_TO_INSTANCEGROUP".
-   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-   *   word.
-   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-   *   "ACTIVE" as a word.
-   * * `createTime<1609459200` to find Cloud resources that were created before
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `updateTime>1609459200` to find Cloud resources that were updated after
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `Important` to find Cloud resources that contain "Important" as a word
-   *   in any of the searchable fields.
-   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-   *   word in any of the searchable fields.
-   * * `Important location:(us-west1 OR global)` to find Cloud
-   *   resources that contain "Important" as a word in any of the searchable
-   *   fields and are also located in the "us-west1" region or the "global"
-   *   location.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } - } - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * resources within the specified `scope`.
-   * Examples:
-   * * `name:Important` to find Cloud resources whose name contains
-   *   "Important" as a word.
-   * * `name=Important` to find the Cloud resource whose name is exactly
-   *   "Important".
-   * * `displayName:Impor*` to find Cloud resources whose display name
-   *   contains "Impor" as a prefix of any word in the field.
-   * * `location:us-west*` to find Cloud resources whose location contains both
-   *   "us" and "west" as prefixes.
-   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-   *   a key or value.
-   * * `labels.env:prod` to find Cloud resources that have a label "env"
-   *   and its value is "prod".
-   * * `labels.env:*` to find Cloud resources that have a label "env".
-   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-   *   encryption key whose name contains the word "key".
-   * * `relationships:instance-group-1` to find Cloud resources that have
-   *   relationships with "instance-group-1" in the related resource name.
-   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-   *   compute instances that have relationships with "instance-group-1" in the
-   *   compute instance group resource name, for relationship type
-   *   "INSTANCE_TO_INSTANCEGROUP".
-   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-   *   word.
-   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-   *   "ACTIVE" as a word.
-   * * `createTime<1609459200` to find Cloud resources that were created before
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `updateTime>1609459200` to find Cloud resources that were updated after
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `Important` to find Cloud resources that contain "Important" as a word
-   *   in any of the searchable fields.
-   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-   *   word in any of the searchable fields.
-   * * `Important location:(us-west1 OR global)` to find Cloud
-   *   resources that contain "Important" as a word in any of the searchable
-   *   fields and are also located in the "us-west1" region or the "global"
-   *   location.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - *
-   * Optional. The page size for search result pagination. Page size is capped
-   * at 500 even if a larger value is given. If set to zero, server will pick an
-   * appropriate default. Returned results may be fewer than requested. When
-   * this happens, there could be more results as long as `next_page_token` is
-   * returned.
-   * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 5; - private volatile java.lang.Object pageToken_; - /** - *
-   * Optional. If present, then retrieve the next batch of results from the
-   * preceding call to this method. `page_token` must be the value of
-   * `next_page_token` from the previous response. The values of all other
-   * method parameters, must be identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Optional. If present, then retrieve the next batch of results from the
-   * preceding call to this method. `page_token` must be the value of
-   * `next_page_token` from the previous response. The values of all other
-   * method parameters, must be identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 6; - private volatile java.lang.Object orderBy_; - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "location DESC, name".
-   * Only singular primitive fields in the response are sortable:
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * parentFullResourceName
-   *   * parentAssetType
-   * All the other fields such as repeated fields (e.g., `networkTags`), map
-   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-   * are not supported.
-   * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "location DESC, name".
-   * Only singular primitive fields in the response are sortable:
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * parentFullResourceName
-   *   * parentAssetType
-   * All the other fields such as repeated fields (e.g., `networkTags`), map
-   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-   * are not supported.
-   * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_MASK_FIELD_NUMBER = 8; - private com.google.protobuf.FieldMask readMask_; - /** - *
-   * Optional. A comma-separated list of fields specifying which fields to be
-   * returned in ResourceSearchResult. Only '*' or combination of top level
-   * fields can be specified. Field names of both snake_case and camelCase are
-   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-   * The read_mask paths must be valid field paths listed but not limited to
-   * (both snake_case and camelCase are supported):
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * tagKeys
-   *   * tagValues
-   *   * tagValueIds
-   *   * labels
-   *   * networkTags
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * additionalAttributes
-   *   * versionedResources
-   * If read_mask is not specified, all fields except versionedResources will
-   * be returned.
-   * If only '*' is specified, all fields including versionedResources will be
-   * returned.
-   * Any invalid field path will trigger INVALID_ARGUMENT error.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readMask field is set. - */ - @java.lang.Override - public boolean hasReadMask() { - return readMask_ != null; - } - /** - *
-   * Optional. A comma-separated list of fields specifying which fields to be
-   * returned in ResourceSearchResult. Only '*' or combination of top level
-   * fields can be specified. Field names of both snake_case and camelCase are
-   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-   * The read_mask paths must be valid field paths listed but not limited to
-   * (both snake_case and camelCase are supported):
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * tagKeys
-   *   * tagValues
-   *   * tagValueIds
-   *   * labels
-   *   * networkTags
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * additionalAttributes
-   *   * versionedResources
-   * If read_mask is not specified, all fields except versionedResources will
-   * be returned.
-   * If only '*' is specified, all fields including versionedResources will be
-   * returned.
-   * Any invalid field path will trigger INVALID_ARGUMENT error.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getReadMask() { - return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; - } - /** - *
-   * Optional. A comma-separated list of fields specifying which fields to be
-   * returned in ResourceSearchResult. Only '*' or combination of top level
-   * fields can be specified. Field names of both snake_case and camelCase are
-   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-   * The read_mask paths must be valid field paths listed but not limited to
-   * (both snake_case and camelCase are supported):
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * tagKeys
-   *   * tagValues
-   *   * tagValueIds
-   *   * labels
-   *   * networkTags
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * additionalAttributes
-   *   * versionedResources
-   * If read_mask is not specified, all fields except versionedResources will
-   * be returned.
-   * If only '*' is specified, all fields including versionedResources will be
-   * returned.
-   * Any invalid field path will trigger INVALID_ARGUMENT error.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { - return getReadMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); - } - if (readMask_ != null) { - output.writeMessage(8, getReadMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); - } - if (readMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, getReadMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.SearchAllResourcesRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.SearchAllResourcesRequest other = (com.google.cloud.asset.v1.SearchAllResourcesRequest) obj; - - if (!getScope() - .equals(other.getScope())) return false; - if (!getQuery() - .equals(other.getQuery())) return false; - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (hasReadMask() != other.hasReadMask()) return false; - if (hasReadMask()) { - if (!getReadMask() - .equals(other.getReadMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScope().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - if (hasReadMask()) { - hash = (37 * hash) + READ_MASK_FIELD_NUMBER; - hash = (53 * hash) + getReadMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllResourcesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all resources request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllResourcesRequest) - com.google.cloud.asset.v1.SearchAllResourcesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1.SearchAllResourcesRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.SearchAllResourcesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - query_ = ""; - - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - pageSize_ = 0; - - pageToken_ = ""; - - orderBy_ = ""; - - if (readMaskBuilder_ == null) { - readMask_ = null; - } else { - readMask_ = null; - readMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.SearchAllResourcesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesRequest build() { - com.google.cloud.asset.v1.SearchAllResourcesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesRequest buildPartial() { - com.google.cloud.asset.v1.SearchAllResourcesRequest result = new com.google.cloud.asset.v1.SearchAllResourcesRequest(this); - int from_bitField0_ = bitField0_; - result.scope_ = scope_; - result.query_ = query_; - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.orderBy_ = orderBy_; - if (readMaskBuilder_ == null) { - result.readMask_ = readMask_; - } else { - result.readMask_ = readMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.SearchAllResourcesRequest) { - return mergeFrom((com.google.cloud.asset.v1.SearchAllResourcesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllResourcesRequest other) { - if (other == com.google.cloud.asset.v1.SearchAllResourcesRequest.getDefaultInstance()) return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - onChanged(); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - if (other.hasReadMask()) { - mergeReadMask(other.getReadMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllResourcesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.SearchAllResourcesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object scope_ = ""; - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the resources within the `scope`. The caller must be
-     * granted the
-     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the resources within the `scope`. The caller must be
-     * granted the
-     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the resources within the `scope`. The caller must be
-     * granted the
-     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - scope_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the resources within the `scope`. The caller must be
-     * granted the
-     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearScope() { - - scope_ = getDefaultInstance().getScope(); - onChanged(); - return this; - } - /** - *
-     * Required. A scope can be a project, a folder, or an organization. The
-     * search is limited to the resources within the `scope`. The caller must be
-     * granted the
-     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-     * permission on the desired scope.
-     * The allowed values are:
-     * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-     * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-     * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-     * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - scope_ = value; - onChanged(); - return this; - } - - private java.lang.Object query_ = ""; - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * resources within the specified `scope`.
-     * Examples:
-     * * `name:Important` to find Cloud resources whose name contains
-     *   "Important" as a word.
-     * * `name=Important` to find the Cloud resource whose name is exactly
-     *   "Important".
-     * * `displayName:Impor*` to find Cloud resources whose display name
-     *   contains "Impor" as a prefix of any word in the field.
-     * * `location:us-west*` to find Cloud resources whose location contains both
-     *   "us" and "west" as prefixes.
-     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-     *   a key or value.
-     * * `labels.env:prod` to find Cloud resources that have a label "env"
-     *   and its value is "prod".
-     * * `labels.env:*` to find Cloud resources that have a label "env".
-     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-     *   encryption key whose name contains the word "key".
-     * * `relationships:instance-group-1` to find Cloud resources that have
-     *   relationships with "instance-group-1" in the related resource name.
-     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-     *   compute instances that have relationships with "instance-group-1" in the
-     *   compute instance group resource name, for relationship type
-     *   "INSTANCE_TO_INSTANCEGROUP".
-     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-     *   word.
-     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-     *   "ACTIVE" as a word.
-     * * `createTime<1609459200` to find Cloud resources that were created before
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `updateTime>1609459200` to find Cloud resources that were updated after
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `Important` to find Cloud resources that contain "Important" as a word
-     *   in any of the searchable fields.
-     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-     *   word in any of the searchable fields.
-     * * `Important location:(us-west1 OR global)` to find Cloud
-     *   resources that contain "Important" as a word in any of the searchable
-     *   fields and are also located in the "us-west1" region or the "global"
-     *   location.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * resources within the specified `scope`.
-     * Examples:
-     * * `name:Important` to find Cloud resources whose name contains
-     *   "Important" as a word.
-     * * `name=Important` to find the Cloud resource whose name is exactly
-     *   "Important".
-     * * `displayName:Impor*` to find Cloud resources whose display name
-     *   contains "Impor" as a prefix of any word in the field.
-     * * `location:us-west*` to find Cloud resources whose location contains both
-     *   "us" and "west" as prefixes.
-     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-     *   a key or value.
-     * * `labels.env:prod` to find Cloud resources that have a label "env"
-     *   and its value is "prod".
-     * * `labels.env:*` to find Cloud resources that have a label "env".
-     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-     *   encryption key whose name contains the word "key".
-     * * `relationships:instance-group-1` to find Cloud resources that have
-     *   relationships with "instance-group-1" in the related resource name.
-     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-     *   compute instances that have relationships with "instance-group-1" in the
-     *   compute instance group resource name, for relationship type
-     *   "INSTANCE_TO_INSTANCEGROUP".
-     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-     *   word.
-     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-     *   "ACTIVE" as a word.
-     * * `createTime<1609459200` to find Cloud resources that were created before
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `updateTime>1609459200` to find Cloud resources that were updated after
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `Important` to find Cloud resources that contain "Important" as a word
-     *   in any of the searchable fields.
-     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-     *   word in any of the searchable fields.
-     * * `Important location:(us-west1 OR global)` to find Cloud
-     *   resources that contain "Important" as a word in any of the searchable
-     *   fields and are also located in the "us-west1" region or the "global"
-     *   location.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * resources within the specified `scope`.
-     * Examples:
-     * * `name:Important` to find Cloud resources whose name contains
-     *   "Important" as a word.
-     * * `name=Important` to find the Cloud resource whose name is exactly
-     *   "Important".
-     * * `displayName:Impor*` to find Cloud resources whose display name
-     *   contains "Impor" as a prefix of any word in the field.
-     * * `location:us-west*` to find Cloud resources whose location contains both
-     *   "us" and "west" as prefixes.
-     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-     *   a key or value.
-     * * `labels.env:prod` to find Cloud resources that have a label "env"
-     *   and its value is "prod".
-     * * `labels.env:*` to find Cloud resources that have a label "env".
-     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-     *   encryption key whose name contains the word "key".
-     * * `relationships:instance-group-1` to find Cloud resources that have
-     *   relationships with "instance-group-1" in the related resource name.
-     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-     *   compute instances that have relationships with "instance-group-1" in the
-     *   compute instance group resource name, for relationship type
-     *   "INSTANCE_TO_INSTANCEGROUP".
-     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-     *   word.
-     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-     *   "ACTIVE" as a word.
-     * * `createTime<1609459200` to find Cloud resources that were created before
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `updateTime>1609459200` to find Cloud resources that were updated after
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `Important` to find Cloud resources that contain "Important" as a word
-     *   in any of the searchable fields.
-     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-     *   word in any of the searchable fields.
-     * * `Important location:(us-west1 OR global)` to find Cloud
-     *   resources that contain "Important" as a word in any of the searchable
-     *   fields and are also located in the "us-west1" region or the "global"
-     *   location.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - query_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * resources within the specified `scope`.
-     * Examples:
-     * * `name:Important` to find Cloud resources whose name contains
-     *   "Important" as a word.
-     * * `name=Important` to find the Cloud resource whose name is exactly
-     *   "Important".
-     * * `displayName:Impor*` to find Cloud resources whose display name
-     *   contains "Impor" as a prefix of any word in the field.
-     * * `location:us-west*` to find Cloud resources whose location contains both
-     *   "us" and "west" as prefixes.
-     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-     *   a key or value.
-     * * `labels.env:prod` to find Cloud resources that have a label "env"
-     *   and its value is "prod".
-     * * `labels.env:*` to find Cloud resources that have a label "env".
-     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-     *   encryption key whose name contains the word "key".
-     * * `relationships:instance-group-1` to find Cloud resources that have
-     *   relationships with "instance-group-1" in the related resource name.
-     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-     *   compute instances that have relationships with "instance-group-1" in the
-     *   compute instance group resource name, for relationship type
-     *   "INSTANCE_TO_INSTANCEGROUP".
-     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-     *   word.
-     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-     *   "ACTIVE" as a word.
-     * * `createTime<1609459200` to find Cloud resources that were created before
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `updateTime>1609459200` to find Cloud resources that were updated after
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `Important` to find Cloud resources that contain "Important" as a word
-     *   in any of the searchable fields.
-     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-     *   word in any of the searchable fields.
-     * * `Important location:(us-west1 OR global)` to find Cloud
-     *   resources that contain "Important" as a word in any of the searchable
-     *   fields and are also located in the "us-west1" region or the "global"
-     *   location.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearQuery() { - - query_ = getDefaultInstance().getQuery(); - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement. See [how to construct a
-     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-     * for more information. If not specified or empty, it will search all the
-     * resources within the specified `scope`.
-     * Examples:
-     * * `name:Important` to find Cloud resources whose name contains
-     *   "Important" as a word.
-     * * `name=Important` to find the Cloud resource whose name is exactly
-     *   "Important".
-     * * `displayName:Impor*` to find Cloud resources whose display name
-     *   contains "Impor" as a prefix of any word in the field.
-     * * `location:us-west*` to find Cloud resources whose location contains both
-     *   "us" and "west" as prefixes.
-     * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-     *   a key or value.
-     * * `labels.env:prod` to find Cloud resources that have a label "env"
-     *   and its value is "prod".
-     * * `labels.env:*` to find Cloud resources that have a label "env".
-     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-     *   encryption key whose name contains the word "key".
-     * * `relationships:instance-group-1` to find Cloud resources that have
-     *   relationships with "instance-group-1" in the related resource name.
-     * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-     *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-     * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-     *   compute instances that have relationships with "instance-group-1" in the
-     *   compute instance group resource name, for relationship type
-     *   "INSTANCE_TO_INSTANCEGROUP".
-     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-     *   word.
-     * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-     *   "ACTIVE" as a word.
-     * * `createTime<1609459200` to find Cloud resources that were created before
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `updateTime>1609459200` to find Cloud resources that were updated after
-     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-     *   "2021-01-01 00:00:00 UTC" in seconds.
-     * * `Important` to find Cloud resources that contain "Important" as a word
-     *   in any of the searchable fields.
-     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-     *   word in any of the searchable fields.
-     * * `Important location:(us-west1 OR global)` to find Cloud
-     *   resources that contain "Important" as a word in any of the searchable
-     *   fields and are also located in the "us-west1" region or the "global"
-     *   location.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for query to set. - * @return This builder for chaining. - */ - public Builder setQueryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - query_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty,
-     * it will search all the [searchable asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Optional. The page size for search result pagination. Page size is capped
-     * at 500 even if a larger value is given. If set to zero, server will pick an
-     * appropriate default. Returned results may be fewer than requested. When
-     * this happens, there could be more results as long as `next_page_token` is
-     * returned.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped
-     * at 500 even if a larger value is given. If set to zero, server will pick an
-     * appropriate default. Returned results may be fewer than requested. When
-     * this happens, there could be more results as long as `next_page_token` is
-     * returned.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped
-     * at 500 even if a larger value is given. If set to zero, server will pick an
-     * appropriate default. Returned results may be fewer than requested. When
-     * this happens, there could be more results as long as `next_page_token` is
-     * returned.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Optional. If present, then retrieve the next batch of results from the
-     * preceding call to this method. `page_token` must be the value of
-     * `next_page_token` from the previous response. The values of all other
-     * method parameters, must be identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the
-     * preceding call to this method. `page_token` must be the value of
-     * `next_page_token` from the previous response. The values of all other
-     * method parameters, must be identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the
-     * preceding call to this method. `page_token` must be the value of
-     * `next_page_token` from the previous response. The values of all other
-     * method parameters, must be identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the
-     * preceding call to this method. `page_token` must be the value of
-     * `next_page_token` from the previous response. The values of all other
-     * method parameters, must be identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the
-     * preceding call to this method. `page_token` must be the value of
-     * `next_page_token` from the previous response. The values of all other
-     * method parameters, must be identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "location DESC, name".
-     * Only singular primitive fields in the response are sortable:
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * parentFullResourceName
-     *   * parentAssetType
-     * All the other fields such as repeated fields (e.g., `networkTags`), map
-     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-     * are not supported.
-     * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "location DESC, name".
-     * Only singular primitive fields in the response are sortable:
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * parentFullResourceName
-     *   * parentAssetType
-     * All the other fields such as repeated fields (e.g., `networkTags`), map
-     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-     * are not supported.
-     * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "location DESC, name".
-     * Only singular primitive fields in the response are sortable:
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * parentFullResourceName
-     *   * parentAssetType
-     * All the other fields such as repeated fields (e.g., `networkTags`), map
-     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-     * are not supported.
-     * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "location DESC, name".
-     * Only singular primitive fields in the response are sortable:
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * parentFullResourceName
-     *   * parentAssetType
-     * All the other fields such as repeated fields (e.g., `networkTags`), map
-     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-     * are not supported.
-     * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying the sorting order of
-     * the results. The default order is ascending. Add " DESC" after the field
-     * name to indicate descending order. Redundant space characters are ignored.
-     * Example: "location DESC, name".
-     * Only singular primitive fields in the response are sortable:
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * parentFullResourceName
-     *   * parentAssetType
-     * All the other fields such as repeated fields (e.g., `networkTags`), map
-     * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-     * are not supported.
-     * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.FieldMask readMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> readMaskBuilder_; - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readMask field is set. - */ - public boolean hasReadMask() { - return readMaskBuilder_ != null || readMask_ != null; - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readMask. - */ - public com.google.protobuf.FieldMask getReadMask() { - if (readMaskBuilder_ == null) { - return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; - } else { - return readMaskBuilder_.getMessage(); - } - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadMask(com.google.protobuf.FieldMask value) { - if (readMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readMask_ = value; - onChanged(); - } else { - readMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder setReadMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (readMaskBuilder_ == null) { - readMask_ = builderForValue.build(); - onChanged(); - } else { - readMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder mergeReadMask(com.google.protobuf.FieldMask value) { - if (readMaskBuilder_ == null) { - if (readMask_ != null) { - readMask_ = - com.google.protobuf.FieldMask.newBuilder(readMask_).mergeFrom(value).buildPartial(); - } else { - readMask_ = value; - } - onChanged(); - } else { - readMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public Builder clearReadMask() { - if (readMaskBuilder_ == null) { - readMask_ = null; - onChanged(); - } else { - readMask_ = null; - readMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { - - onChanged(); - return getReadMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { - if (readMaskBuilder_ != null) { - return readMaskBuilder_.getMessageOrBuilder(); - } else { - return readMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; - } - } - /** - *
-     * Optional. A comma-separated list of fields specifying which fields to be
-     * returned in ResourceSearchResult. Only '*' or combination of top level
-     * fields can be specified. Field names of both snake_case and camelCase are
-     * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-     * The read_mask paths must be valid field paths listed but not limited to
-     * (both snake_case and camelCase are supported):
-     *   * name
-     *   * assetType
-     *   * project
-     *   * displayName
-     *   * description
-     *   * location
-     *   * tagKeys
-     *   * tagValues
-     *   * tagValueIds
-     *   * labels
-     *   * networkTags
-     *   * kmsKey
-     *   * createTime
-     *   * updateTime
-     *   * state
-     *   * additionalAttributes
-     *   * versionedResources
-     * If read_mask is not specified, all fields except versionedResources will
-     * be returned.
-     * If only '*' is specified, all fields including versionedResources will be
-     * returned.
-     * Any invalid field path will trigger INVALID_ARGUMENT error.
-     * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getReadMaskFieldBuilder() { - if (readMaskBuilder_ == null) { - readMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getReadMask(), - getParentForChildren(), - isClean()); - readMask_ = null; - } - return readMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllResourcesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllResourcesRequest) - private static final com.google.cloud.asset.v1.SearchAllResourcesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllResourcesRequest(); - } - - public static com.google.cloud.asset.v1.SearchAllResourcesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllResourcesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java deleted file mode 100644 index 65d5c36ec558..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java +++ /dev/null @@ -1,444 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface SearchAllResourcesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllResourcesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the resources within the `scope`. The caller must be
-   * granted the
-   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - java.lang.String getScope(); - /** - *
-   * Required. A scope can be a project, a folder, or an organization. The
-   * search is limited to the resources within the `scope`. The caller must be
-   * granted the
-   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
-   * permission on the desired scope.
-   * The allowed values are:
-   * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
-   * * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
-   * * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
-   * * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - com.google.protobuf.ByteString - getScopeBytes(); - - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * resources within the specified `scope`.
-   * Examples:
-   * * `name:Important` to find Cloud resources whose name contains
-   *   "Important" as a word.
-   * * `name=Important` to find the Cloud resource whose name is exactly
-   *   "Important".
-   * * `displayName:Impor*` to find Cloud resources whose display name
-   *   contains "Impor" as a prefix of any word in the field.
-   * * `location:us-west*` to find Cloud resources whose location contains both
-   *   "us" and "west" as prefixes.
-   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-   *   a key or value.
-   * * `labels.env:prod` to find Cloud resources that have a label "env"
-   *   and its value is "prod".
-   * * `labels.env:*` to find Cloud resources that have a label "env".
-   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-   *   encryption key whose name contains the word "key".
-   * * `relationships:instance-group-1` to find Cloud resources that have
-   *   relationships with "instance-group-1" in the related resource name.
-   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-   *   compute instances that have relationships with "instance-group-1" in the
-   *   compute instance group resource name, for relationship type
-   *   "INSTANCE_TO_INSTANCEGROUP".
-   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-   *   word.
-   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-   *   "ACTIVE" as a word.
-   * * `createTime<1609459200` to find Cloud resources that were created before
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `updateTime>1609459200` to find Cloud resources that were updated after
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `Important` to find Cloud resources that contain "Important" as a word
-   *   in any of the searchable fields.
-   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-   *   word in any of the searchable fields.
-   * * `Important location:(us-west1 OR global)` to find Cloud
-   *   resources that contain "Important" as a word in any of the searchable
-   *   fields and are also located in the "us-west1" region or the "global"
-   *   location.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - java.lang.String getQuery(); - /** - *
-   * Optional. The query statement. See [how to construct a
-   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
-   * for more information. If not specified or empty, it will search all the
-   * resources within the specified `scope`.
-   * Examples:
-   * * `name:Important` to find Cloud resources whose name contains
-   *   "Important" as a word.
-   * * `name=Important` to find the Cloud resource whose name is exactly
-   *   "Important".
-   * * `displayName:Impor*` to find Cloud resources whose display name
-   *   contains "Impor" as a prefix of any word in the field.
-   * * `location:us-west*` to find Cloud resources whose location contains both
-   *   "us" and "west" as prefixes.
-   * * `labels:prod` to find Cloud resources whose labels contain "prod" as
-   *   a key or value.
-   * * `labels.env:prod` to find Cloud resources that have a label "env"
-   *   and its value is "prod".
-   * * `labels.env:*` to find Cloud resources that have a label "env".
-   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
-   *   encryption key whose name contains the word "key".
-   * * `relationships:instance-group-1` to find Cloud resources that have
-   *   relationships with "instance-group-1" in the related resource name.
-   * * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
-   *   have relationships of type "INSTANCE_TO_INSTANCEGROUP".
-   * * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
-   *   compute instances that have relationships with "instance-group-1" in the
-   *   compute instance group resource name, for relationship type
-   *   "INSTANCE_TO_INSTANCEGROUP".
-   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
-   *   word.
-   * * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
-   *   "ACTIVE" as a word.
-   * * `createTime<1609459200` to find Cloud resources that were created before
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `updateTime>1609459200` to find Cloud resources that were updated after
-   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
-   *   "2021-01-01 00:00:00 UTC" in seconds.
-   * * `Important` to find Cloud resources that contain "Important" as a word
-   *   in any of the searchable fields.
-   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
-   *   word in any of the searchable fields.
-   * * `Important location:(us-west1 OR global)` to find Cloud
-   *   resources that contain "Important" as a word in any of the searchable
-   *   fields and are also located in the "us-west1" region or the "global"
-   *   location.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - com.google.protobuf.ByteString - getQueryBytes(); - - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * Optional. A list of asset types that this request searches for. If empty,
-   * it will search all the [searchable asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Optional. The page size for search result pagination. Page size is capped
-   * at 500 even if a larger value is given. If set to zero, server will pick an
-   * appropriate default. Returned results may be fewer than requested. When
-   * this happens, there could be more results as long as `next_page_token` is
-   * returned.
-   * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Optional. If present, then retrieve the next batch of results from the
-   * preceding call to this method. `page_token` must be the value of
-   * `next_page_token` from the previous response. The values of all other
-   * method parameters, must be identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Optional. If present, then retrieve the next batch of results from the
-   * preceding call to this method. `page_token` must be the value of
-   * `next_page_token` from the previous response. The values of all other
-   * method parameters, must be identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "location DESC, name".
-   * Only singular primitive fields in the response are sortable:
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * parentFullResourceName
-   *   * parentAssetType
-   * All the other fields such as repeated fields (e.g., `networkTags`), map
-   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-   * are not supported.
-   * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Optional. A comma-separated list of fields specifying the sorting order of
-   * the results. The default order is ascending. Add " DESC" after the field
-   * name to indicate descending order. Redundant space characters are ignored.
-   * Example: "location DESC, name".
-   * Only singular primitive fields in the response are sortable:
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * parentFullResourceName
-   *   * parentAssetType
-   * All the other fields such as repeated fields (e.g., `networkTags`), map
-   * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
-   * are not supported.
-   * 
- * - * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); - - /** - *
-   * Optional. A comma-separated list of fields specifying which fields to be
-   * returned in ResourceSearchResult. Only '*' or combination of top level
-   * fields can be specified. Field names of both snake_case and camelCase are
-   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-   * The read_mask paths must be valid field paths listed but not limited to
-   * (both snake_case and camelCase are supported):
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * tagKeys
-   *   * tagValues
-   *   * tagValueIds
-   *   * labels
-   *   * networkTags
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * additionalAttributes
-   *   * versionedResources
-   * If read_mask is not specified, all fields except versionedResources will
-   * be returned.
-   * If only '*' is specified, all fields including versionedResources will be
-   * returned.
-   * Any invalid field path will trigger INVALID_ARGUMENT error.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return Whether the readMask field is set. - */ - boolean hasReadMask(); - /** - *
-   * Optional. A comma-separated list of fields specifying which fields to be
-   * returned in ResourceSearchResult. Only '*' or combination of top level
-   * fields can be specified. Field names of both snake_case and camelCase are
-   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-   * The read_mask paths must be valid field paths listed but not limited to
-   * (both snake_case and camelCase are supported):
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * tagKeys
-   *   * tagValues
-   *   * tagValueIds
-   *   * labels
-   *   * networkTags
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * additionalAttributes
-   *   * versionedResources
-   * If read_mask is not specified, all fields except versionedResources will
-   * be returned.
-   * If only '*' is specified, all fields including versionedResources will be
-   * returned.
-   * Any invalid field path will trigger INVALID_ARGUMENT error.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return The readMask. - */ - com.google.protobuf.FieldMask getReadMask(); - /** - *
-   * Optional. A comma-separated list of fields specifying which fields to be
-   * returned in ResourceSearchResult. Only '*' or combination of top level
-   * fields can be specified. Field names of both snake_case and camelCase are
-   * supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`.
-   * The read_mask paths must be valid field paths listed but not limited to
-   * (both snake_case and camelCase are supported):
-   *   * name
-   *   * assetType
-   *   * project
-   *   * displayName
-   *   * description
-   *   * location
-   *   * tagKeys
-   *   * tagValues
-   *   * tagValueIds
-   *   * labels
-   *   * networkTags
-   *   * kmsKey
-   *   * createTime
-   *   * updateTime
-   *   * state
-   *   * additionalAttributes
-   *   * versionedResources
-   * If read_mask is not specified, all fields except versionedResources will
-   * be returned.
-   * If only '*' is specified, all fields including versionedResources will be
-   * returned.
-   * Any invalid field path will trigger INVALID_ARGUMENT error.
-   * 
- * - * .google.protobuf.FieldMask read_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java deleted file mode 100644 index 652140b9c30e..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponse.java +++ /dev/null @@ -1,1075 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Search all resources response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesResponse} - */ -public final class SearchAllResourcesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.SearchAllResourcesResponse) - SearchAllResourcesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllResourcesResponse.newBuilder() to construct. - private SearchAllResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllResourcesResponse() { - results_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllResourcesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllResourcesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.asset.v1.ResourceSearchResult.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1.SearchAllResourcesResponse.Builder.class); - } - - public static final int RESULTS_FIELD_NUMBER = 1; - private java.util.List results_; - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.ResourceSearchResult getResults(int index) { - return results_.get(index); - } - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.ResourceSearchResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included. To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included. To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.SearchAllResourcesResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.SearchAllResourcesResponse other = (com.google.cloud.asset.v1.SearchAllResourcesResponse) obj; - - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.SearchAllResourcesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all resources response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.SearchAllResourcesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.SearchAllResourcesResponse) - com.google.cloud.asset.v1.SearchAllResourcesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1.SearchAllResourcesResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.SearchAllResourcesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1.SearchAllResourcesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesResponse build() { - com.google.cloud.asset.v1.SearchAllResourcesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesResponse buildPartial() { - com.google.cloud.asset.v1.SearchAllResourcesResponse result = new com.google.cloud.asset.v1.SearchAllResourcesResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.SearchAllResourcesResponse) { - return mergeFrom((com.google.cloud.asset.v1.SearchAllResourcesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.SearchAllResourcesResponse other) { - if (other == com.google.cloud.asset.v1.SearchAllResourcesResponse.getDefaultInstance()) return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.SearchAllResourcesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.SearchAllResourcesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.ResourceSearchResult, com.google.cloud.asset.v1.ResourceSearchResult.Builder, com.google.cloud.asset.v1.ResourceSearchResultOrBuilder> resultsBuilder_; - - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public com.google.cloud.asset.v1.ResourceSearchResult getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1.ResourceSearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1.ResourceSearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder addResults(com.google.cloud.asset.v1.ResourceSearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1.ResourceSearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder addResults( - com.google.cloud.asset.v1.ResourceSearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1.ResourceSearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public com.google.cloud.asset.v1.ResourceSearchResult.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public com.google.cloud.asset.v1.ResourceSearchResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public com.google.cloud.asset.v1.ResourceSearchResult.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance()); - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public com.google.cloud.asset.v1.ResourceSearchResult.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.ResourceSearchResult.getDefaultInstance()); - } - /** - *
-     * A list of Resources that match the search query. It contains the resource
-     * standard metadata information.
-     * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.ResourceSearchResult, com.google.cloud.asset.v1.ResourceSearchResult.Builder, com.google.cloud.asset.v1.ResourceSearchResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.ResourceSearchResult, com.google.cloud.asset.v1.ResourceSearchResult.Builder, com.google.cloud.asset.v1.ResourceSearchResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included. To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included. To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included. To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included. To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included. To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.SearchAllResourcesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.SearchAllResourcesResponse) - private static final com.google.cloud.asset.v1.SearchAllResourcesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.SearchAllResourcesResponse(); - } - - public static com.google.cloud.asset.v1.SearchAllResourcesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllResourcesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.SearchAllResourcesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java deleted file mode 100644 index d0999fac75c7..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesResponseOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface SearchAllResourcesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.SearchAllResourcesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - java.util.List - getResultsList(); - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - com.google.cloud.asset.v1.ResourceSearchResult getResults(int index); - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - int getResultsCount(); - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * A list of Resources that match the search query. It contains the resource
-   * standard metadata information.
-   * 
- * - * repeated .google.cloud.asset.v1.ResourceSearchResult results = 1; - */ - com.google.cloud.asset.v1.ResourceSearchResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included. To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included. To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java deleted file mode 100644 index 1bfbe370709e..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchema.java +++ /dev/null @@ -1,1512 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A field in TableSchema.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.TableFieldSchema} - */ -public final class TableFieldSchema extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TableFieldSchema) - TableFieldSchemaOrBuilder { -private static final long serialVersionUID = 0L; - // Use TableFieldSchema.newBuilder() to construct. - private TableFieldSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TableFieldSchema() { - field_ = ""; - type_ = ""; - mode_ = ""; - fields_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TableFieldSchema(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TableFieldSchema( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - field_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - mode_ = s; - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage(com.google.cloud.asset.v1.TableFieldSchema.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TableFieldSchema.class, com.google.cloud.asset.v1.TableFieldSchema.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private volatile java.lang.Object field_; - /** - *
-   * The field name. The name must contain only letters (a-z, A-Z),
-   * numbers (0-9), or underscores (_), and must start with a letter or
-   * underscore. The maximum length is 128 characters.
-   * 
- * - * string field = 1; - * @return The field. - */ - @java.lang.Override - public java.lang.String getField() { - java.lang.Object ref = field_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - field_ = s; - return s; - } - } - /** - *
-   * The field name. The name must contain only letters (a-z, A-Z),
-   * numbers (0-9), or underscores (_), and must start with a letter or
-   * underscore. The maximum length is 128 characters.
-   * 
- * - * string field = 1; - * @return The bytes for field. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFieldBytes() { - java.lang.Object ref = field_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - field_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object type_; - /** - *
-   * The field data type. Possible values include
-   * * STRING
-   * * BYTES
-   * * INTEGER
-   * * FLOAT
-   * * BOOLEAN
-   * * TIMESTAMP
-   * * DATE
-   * * TIME
-   * * DATETIME
-   * * GEOGRAPHY,
-   * * NUMERIC,
-   * * BIGNUMERIC,
-   * * RECORD
-   * (where RECORD indicates that the field contains a nested schema).
-   * 
- * - * string type = 2; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * The field data type. Possible values include
-   * * STRING
-   * * BYTES
-   * * INTEGER
-   * * FLOAT
-   * * BOOLEAN
-   * * TIMESTAMP
-   * * DATE
-   * * TIME
-   * * DATETIME
-   * * GEOGRAPHY,
-   * * NUMERIC,
-   * * BIGNUMERIC,
-   * * RECORD
-   * (where RECORD indicates that the field contains a nested schema).
-   * 
- * - * string type = 2; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODE_FIELD_NUMBER = 3; - private volatile java.lang.Object mode_; - /** - *
-   * The field mode. Possible values include NULLABLE, REQUIRED and
-   * REPEATED. The default value is NULLABLE.
-   * 
- * - * string mode = 3; - * @return The mode. - */ - @java.lang.Override - public java.lang.String getMode() { - java.lang.Object ref = mode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mode_ = s; - return s; - } - } - /** - *
-   * The field mode. Possible values include NULLABLE, REQUIRED and
-   * REPEATED. The default value is NULLABLE.
-   * 
- * - * string mode = 3; - * @return The bytes for mode. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getModeBytes() { - java.lang.Object ref = mode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FIELDS_FIELD_NUMBER = 4; - private java.util.List fields_; - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - @java.lang.Override - public java.util.List getFieldsList() { - return fields_; - } - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - @java.lang.Override - public java.util.List - getFieldsOrBuilderList() { - return fields_; - } - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - @java.lang.Override - public int getFieldsCount() { - return fields_.size(); - } - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { - return fields_.get(index); - } - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( - int index) { - return fields_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mode_); - } - for (int i = 0; i < fields_.size(); i++) { - output.writeMessage(4, fields_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mode_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mode_); - } - for (int i = 0; i < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, fields_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.TableFieldSchema)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.TableFieldSchema other = (com.google.cloud.asset.v1.TableFieldSchema) obj; - - if (!getField() - .equals(other.getField())) return false; - if (!getType() - .equals(other.getType())) return false; - if (!getMode() - .equals(other.getMode())) return false; - if (!getFieldsList() - .equals(other.getFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_FIELD_NUMBER; - hash = (53 * hash) + getField().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + MODE_FIELD_NUMBER; - hash = (53 * hash) + getMode().hashCode(); - if (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TableFieldSchema parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.TableFieldSchema prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A field in TableSchema.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.TableFieldSchema} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TableFieldSchema) - com.google.cloud.asset.v1.TableFieldSchemaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TableFieldSchema.class, com.google.cloud.asset.v1.TableFieldSchema.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.TableFieldSchema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - field_ = ""; - - type_ = ""; - - mode_ = ""; - - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableFieldSchema_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchema getDefaultInstanceForType() { - return com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchema build() { - com.google.cloud.asset.v1.TableFieldSchema result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchema buildPartial() { - com.google.cloud.asset.v1.TableFieldSchema result = new com.google.cloud.asset.v1.TableFieldSchema(this); - int from_bitField0_ = bitField0_; - result.field_ = field_; - result.type_ = type_; - result.mode_ = mode_; - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.TableFieldSchema) { - return mergeFrom((com.google.cloud.asset.v1.TableFieldSchema)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.TableFieldSchema other) { - if (other == com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()) return this; - if (!other.getField().isEmpty()) { - field_ = other.field_; - onChanged(); - } - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - if (!other.getMode().isEmpty()) { - mode_ = other.mode_; - onChanged(); - } - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFieldsFieldBuilder() : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.TableFieldSchema parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.TableFieldSchema) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object field_ = ""; - /** - *
-     * The field name. The name must contain only letters (a-z, A-Z),
-     * numbers (0-9), or underscores (_), and must start with a letter or
-     * underscore. The maximum length is 128 characters.
-     * 
- * - * string field = 1; - * @return The field. - */ - public java.lang.String getField() { - java.lang.Object ref = field_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - field_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The field name. The name must contain only letters (a-z, A-Z),
-     * numbers (0-9), or underscores (_), and must start with a letter or
-     * underscore. The maximum length is 128 characters.
-     * 
- * - * string field = 1; - * @return The bytes for field. - */ - public com.google.protobuf.ByteString - getFieldBytes() { - java.lang.Object ref = field_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - field_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The field name. The name must contain only letters (a-z, A-Z),
-     * numbers (0-9), or underscores (_), and must start with a letter or
-     * underscore. The maximum length is 128 characters.
-     * 
- * - * string field = 1; - * @param value The field to set. - * @return This builder for chaining. - */ - public Builder setField( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - field_ = value; - onChanged(); - return this; - } - /** - *
-     * The field name. The name must contain only letters (a-z, A-Z),
-     * numbers (0-9), or underscores (_), and must start with a letter or
-     * underscore. The maximum length is 128 characters.
-     * 
- * - * string field = 1; - * @return This builder for chaining. - */ - public Builder clearField() { - - field_ = getDefaultInstance().getField(); - onChanged(); - return this; - } - /** - *
-     * The field name. The name must contain only letters (a-z, A-Z),
-     * numbers (0-9), or underscores (_), and must start with a letter or
-     * underscore. The maximum length is 128 characters.
-     * 
- * - * string field = 1; - * @param value The bytes for field to set. - * @return This builder for chaining. - */ - public Builder setFieldBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - field_ = value; - onChanged(); - return this; - } - - private java.lang.Object type_ = ""; - /** - *
-     * The field data type. Possible values include
-     * * STRING
-     * * BYTES
-     * * INTEGER
-     * * FLOAT
-     * * BOOLEAN
-     * * TIMESTAMP
-     * * DATE
-     * * TIME
-     * * DATETIME
-     * * GEOGRAPHY,
-     * * NUMERIC,
-     * * BIGNUMERIC,
-     * * RECORD
-     * (where RECORD indicates that the field contains a nested schema).
-     * 
- * - * string type = 2; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The field data type. Possible values include
-     * * STRING
-     * * BYTES
-     * * INTEGER
-     * * FLOAT
-     * * BOOLEAN
-     * * TIMESTAMP
-     * * DATE
-     * * TIME
-     * * DATETIME
-     * * GEOGRAPHY,
-     * * NUMERIC,
-     * * BIGNUMERIC,
-     * * RECORD
-     * (where RECORD indicates that the field contains a nested schema).
-     * 
- * - * string type = 2; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The field data type. Possible values include
-     * * STRING
-     * * BYTES
-     * * INTEGER
-     * * FLOAT
-     * * BOOLEAN
-     * * TIMESTAMP
-     * * DATE
-     * * TIME
-     * * DATETIME
-     * * GEOGRAPHY,
-     * * NUMERIC,
-     * * BIGNUMERIC,
-     * * RECORD
-     * (where RECORD indicates that the field contains a nested schema).
-     * 
- * - * string type = 2; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The field data type. Possible values include
-     * * STRING
-     * * BYTES
-     * * INTEGER
-     * * FLOAT
-     * * BOOLEAN
-     * * TIMESTAMP
-     * * DATE
-     * * TIME
-     * * DATETIME
-     * * GEOGRAPHY,
-     * * NUMERIC,
-     * * BIGNUMERIC,
-     * * RECORD
-     * (where RECORD indicates that the field contains a nested schema).
-     * 
- * - * string type = 2; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - *
-     * The field data type. Possible values include
-     * * STRING
-     * * BYTES
-     * * INTEGER
-     * * FLOAT
-     * * BOOLEAN
-     * * TIMESTAMP
-     * * DATE
-     * * TIME
-     * * DATETIME
-     * * GEOGRAPHY,
-     * * NUMERIC,
-     * * BIGNUMERIC,
-     * * RECORD
-     * (where RECORD indicates that the field contains a nested schema).
-     * 
- * - * string type = 2; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private java.lang.Object mode_ = ""; - /** - *
-     * The field mode. Possible values include NULLABLE, REQUIRED and
-     * REPEATED. The default value is NULLABLE.
-     * 
- * - * string mode = 3; - * @return The mode. - */ - public java.lang.String getMode() { - java.lang.Object ref = mode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The field mode. Possible values include NULLABLE, REQUIRED and
-     * REPEATED. The default value is NULLABLE.
-     * 
- * - * string mode = 3; - * @return The bytes for mode. - */ - public com.google.protobuf.ByteString - getModeBytes() { - java.lang.Object ref = mode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The field mode. Possible values include NULLABLE, REQUIRED and
-     * REPEATED. The default value is NULLABLE.
-     * 
- * - * string mode = 3; - * @param value The mode to set. - * @return This builder for chaining. - */ - public Builder setMode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mode_ = value; - onChanged(); - return this; - } - /** - *
-     * The field mode. Possible values include NULLABLE, REQUIRED and
-     * REPEATED. The default value is NULLABLE.
-     * 
- * - * string mode = 3; - * @return This builder for chaining. - */ - public Builder clearMode() { - - mode_ = getDefaultInstance().getMode(); - onChanged(); - return this; - } - /** - *
-     * The field mode. Possible values include NULLABLE, REQUIRED and
-     * REPEATED. The default value is NULLABLE.
-     * 
- * - * string mode = 3; - * @param value The bytes for mode to set. - * @return This builder for chaining. - */ - public Builder setModeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mode_ = value; - onChanged(); - return this; - } - - private java.util.List fields_ = - java.util.Collections.emptyList(); - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(fields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> fieldsBuilder_; - - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public java.util.List getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder setFields( - int index, com.google.cloud.asset.v1.TableFieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder setFields( - int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder addFields(com.google.cloud.asset.v1.TableFieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - } else { - fieldsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder addFields( - int index, com.google.cloud.asset.v1.TableFieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder addFields( - com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder addFields( - int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder addAllFields( - java.lang.Iterable values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fields_); - onChanged(); - } else { - fieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldsBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); - } else { - fieldsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public com.google.cloud.asset.v1.TableFieldSchema.Builder getFieldsBuilder( - int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( - int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); } else { - return fieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public java.util.List - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fields_); - } - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder() { - return getFieldsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder( - int index) { - return getFieldsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); - } - /** - *
-     * Describes the nested schema fields if the type property is set
-     * to RECORD.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - public java.util.List - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder>( - fields_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fields_ = null; - } - return fieldsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TableFieldSchema) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TableFieldSchema) - private static final com.google.cloud.asset.v1.TableFieldSchema DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TableFieldSchema(); - } - - public static com.google.cloud.asset.v1.TableFieldSchema getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableFieldSchema parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TableFieldSchema(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchema getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java deleted file mode 100644 index a77eb8040bc5..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableFieldSchemaOrBuilder.java +++ /dev/null @@ -1,152 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface TableFieldSchemaOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TableFieldSchema) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The field name. The name must contain only letters (a-z, A-Z),
-   * numbers (0-9), or underscores (_), and must start with a letter or
-   * underscore. The maximum length is 128 characters.
-   * 
- * - * string field = 1; - * @return The field. - */ - java.lang.String getField(); - /** - *
-   * The field name. The name must contain only letters (a-z, A-Z),
-   * numbers (0-9), or underscores (_), and must start with a letter or
-   * underscore. The maximum length is 128 characters.
-   * 
- * - * string field = 1; - * @return The bytes for field. - */ - com.google.protobuf.ByteString - getFieldBytes(); - - /** - *
-   * The field data type. Possible values include
-   * * STRING
-   * * BYTES
-   * * INTEGER
-   * * FLOAT
-   * * BOOLEAN
-   * * TIMESTAMP
-   * * DATE
-   * * TIME
-   * * DATETIME
-   * * GEOGRAPHY,
-   * * NUMERIC,
-   * * BIGNUMERIC,
-   * * RECORD
-   * (where RECORD indicates that the field contains a nested schema).
-   * 
- * - * string type = 2; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * The field data type. Possible values include
-   * * STRING
-   * * BYTES
-   * * INTEGER
-   * * FLOAT
-   * * BOOLEAN
-   * * TIMESTAMP
-   * * DATE
-   * * TIME
-   * * DATETIME
-   * * GEOGRAPHY,
-   * * NUMERIC,
-   * * BIGNUMERIC,
-   * * RECORD
-   * (where RECORD indicates that the field contains a nested schema).
-   * 
- * - * string type = 2; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * The field mode. Possible values include NULLABLE, REQUIRED and
-   * REPEATED. The default value is NULLABLE.
-   * 
- * - * string mode = 3; - * @return The mode. - */ - java.lang.String getMode(); - /** - *
-   * The field mode. Possible values include NULLABLE, REQUIRED and
-   * REPEATED. The default value is NULLABLE.
-   * 
- * - * string mode = 3; - * @return The bytes for mode. - */ - com.google.protobuf.ByteString - getModeBytes(); - - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - java.util.List - getFieldsList(); - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - com.google.cloud.asset.v1.TableFieldSchema getFields(int index); - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - int getFieldsCount(); - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - java.util.List - getFieldsOrBuilderList(); - /** - *
-   * Describes the nested schema fields if the type property is set
-   * to RECORD.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 4; - */ - com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java deleted file mode 100644 index 4eb43d9df02d..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchema.java +++ /dev/null @@ -1,872 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * BigQuery Compatible table schema.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.TableSchema} - */ -public final class TableSchema extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TableSchema) - TableSchemaOrBuilder { -private static final long serialVersionUID = 0L; - // Use TableSchema.newBuilder() to construct. - private TableSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TableSchema() { - fields_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TableSchema(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TableSchema( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fields_.add( - input.readMessage(com.google.cloud.asset.v1.TableFieldSchema.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TableSchema.class, com.google.cloud.asset.v1.TableSchema.Builder.class); - } - - public static final int FIELDS_FIELD_NUMBER = 1; - private java.util.List fields_; - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - @java.lang.Override - public java.util.List getFieldsList() { - return fields_; - } - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - @java.lang.Override - public java.util.List - getFieldsOrBuilderList() { - return fields_; - } - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - @java.lang.Override - public int getFieldsCount() { - return fields_.size(); - } - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { - return fields_.get(index); - } - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( - int index) { - return fields_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < fields_.size(); i++) { - output.writeMessage(1, fields_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < fields_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fields_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.TableSchema)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.TableSchema other = (com.google.cloud.asset.v1.TableSchema) obj; - - if (!getFieldsList() - .equals(other.getFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFieldsCount() > 0) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + getFieldsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.TableSchema parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableSchema parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TableSchema parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TableSchema parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.TableSchema prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * BigQuery Compatible table schema.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.TableSchema} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TableSchema) - com.google.cloud.asset.v1.TableSchemaOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TableSchema.class, com.google.cloud.asset.v1.TableSchema.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.TableSchema.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFieldsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_TableSchema_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableSchema getDefaultInstanceForType() { - return com.google.cloud.asset.v1.TableSchema.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableSchema build() { - com.google.cloud.asset.v1.TableSchema result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableSchema buildPartial() { - com.google.cloud.asset.v1.TableSchema result = new com.google.cloud.asset.v1.TableSchema(this); - int from_bitField0_ = bitField0_; - if (fieldsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - fields_ = java.util.Collections.unmodifiableList(fields_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fields_ = fields_; - } else { - result.fields_ = fieldsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.TableSchema) { - return mergeFrom((com.google.cloud.asset.v1.TableSchema)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.TableSchema other) { - if (other == com.google.cloud.asset.v1.TableSchema.getDefaultInstance()) return this; - if (fieldsBuilder_ == null) { - if (!other.fields_.isEmpty()) { - if (fields_.isEmpty()) { - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldsIsMutable(); - fields_.addAll(other.fields_); - } - onChanged(); - } - } else { - if (!other.fields_.isEmpty()) { - if (fieldsBuilder_.isEmpty()) { - fieldsBuilder_.dispose(); - fieldsBuilder_ = null; - fields_ = other.fields_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFieldsFieldBuilder() : null; - } else { - fieldsBuilder_.addAllMessages(other.fields_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.TableSchema parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.TableSchema) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List fields_ = - java.util.Collections.emptyList(); - private void ensureFieldsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - fields_ = new java.util.ArrayList(fields_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> fieldsBuilder_; - - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public java.util.List getFieldsList() { - if (fieldsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fields_); - } else { - return fieldsBuilder_.getMessageList(); - } - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public int getFieldsCount() { - if (fieldsBuilder_ == null) { - return fields_.size(); - } else { - return fieldsBuilder_.getCount(); - } - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public com.google.cloud.asset.v1.TableFieldSchema getFields(int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); - } else { - return fieldsBuilder_.getMessage(index); - } - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder setFields( - int index, com.google.cloud.asset.v1.TableFieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.set(index, value); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder setFields( - int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder addFields(com.google.cloud.asset.v1.TableFieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(value); - onChanged(); - } else { - fieldsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder addFields( - int index, com.google.cloud.asset.v1.TableFieldSchema value) { - if (fieldsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldsIsMutable(); - fields_.add(index, value); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder addFields( - com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder addFields( - int index, com.google.cloud.asset.v1.TableFieldSchema.Builder builderForValue) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder addAllFields( - java.lang.Iterable values) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fields_); - onChanged(); - } else { - fieldsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder clearFields() { - if (fieldsBuilder_ == null) { - fields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldsBuilder_.clear(); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public Builder removeFields(int index) { - if (fieldsBuilder_ == null) { - ensureFieldsIsMutable(); - fields_.remove(index); - onChanged(); - } else { - fieldsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public com.google.cloud.asset.v1.TableFieldSchema.Builder getFieldsBuilder( - int index) { - return getFieldsFieldBuilder().getBuilder(index); - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( - int index) { - if (fieldsBuilder_ == null) { - return fields_.get(index); } else { - return fieldsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public java.util.List - getFieldsOrBuilderList() { - if (fieldsBuilder_ != null) { - return fieldsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fields_); - } - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder() { - return getFieldsFieldBuilder().addBuilder( - com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public com.google.cloud.asset.v1.TableFieldSchema.Builder addFieldsBuilder( - int index) { - return getFieldsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1.TableFieldSchema.getDefaultInstance()); - } - /** - *
-     * Describes the fields in a table.
-     * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - public java.util.List - getFieldsBuilderList() { - return getFieldsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder> - getFieldsFieldBuilder() { - if (fieldsBuilder_ == null) { - fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1.TableFieldSchema, com.google.cloud.asset.v1.TableFieldSchema.Builder, com.google.cloud.asset.v1.TableFieldSchemaOrBuilder>( - fields_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - fields_ = null; - } - return fieldsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TableSchema) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TableSchema) - private static final com.google.cloud.asset.v1.TableSchema DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TableSchema(); - } - - public static com.google.cloud.asset.v1.TableSchema getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableSchema parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TableSchema(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TableSchema getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java deleted file mode 100644 index 80451085b595..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TableSchemaOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface TableSchemaOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TableSchema) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - java.util.List - getFieldsList(); - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - com.google.cloud.asset.v1.TableFieldSchema getFields(int index); - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - int getFieldsCount(); - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - java.util.List - getFieldsOrBuilderList(); - /** - *
-   * Describes the fields in a table.
-   * 
- * - * repeated .google.cloud.asset.v1.TableFieldSchema fields = 1; - */ - com.google.cloud.asset.v1.TableFieldSchemaOrBuilder getFieldsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java deleted file mode 100644 index 0931ef8158b7..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java +++ /dev/null @@ -1,1535 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * An asset in Google Cloud and its temporal metadata, including the time window
- * when it was observed and its status during that window.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.TemporalAsset} - */ -public final class TemporalAsset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TemporalAsset) - TemporalAssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use TemporalAsset.newBuilder() to construct. - private TemporalAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TemporalAsset() { - priorAssetState_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TemporalAsset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TemporalAsset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.TimeWindow.Builder subBuilder = null; - if (window_ != null) { - subBuilder = window_.toBuilder(); - } - window_ = input.readMessage(com.google.cloud.asset.v1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(window_); - window_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - deleted_ = input.readBool(); - break; - } - case 26: { - com.google.cloud.asset.v1.Asset.Builder subBuilder = null; - if (asset_ != null) { - subBuilder = asset_.toBuilder(); - } - asset_ = input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(asset_); - asset_ = subBuilder.buildPartial(); - } - - break; - } - case 32: { - int rawValue = input.readEnum(); - - priorAssetState_ = rawValue; - break; - } - case 42: { - com.google.cloud.asset.v1.Asset.Builder subBuilder = null; - if (priorAsset_ != null) { - subBuilder = priorAsset_.toBuilder(); - } - priorAsset_ = input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priorAsset_); - priorAsset_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TemporalAsset.class, com.google.cloud.asset.v1.TemporalAsset.Builder.class); - } - - /** - *
-   * State of prior asset.
-   * 
- * - * Protobuf enum {@code google.cloud.asset.v1.TemporalAsset.PriorAssetState} - */ - public enum PriorAssetState - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * prior_asset is not applicable for the current asset.
-     * 
- * - * PRIOR_ASSET_STATE_UNSPECIFIED = 0; - */ - PRIOR_ASSET_STATE_UNSPECIFIED(0), - /** - *
-     * prior_asset is populated correctly.
-     * 
- * - * PRESENT = 1; - */ - PRESENT(1), - /** - *
-     * Failed to set prior_asset.
-     * 
- * - * INVALID = 2; - */ - INVALID(2), - /** - *
-     * Current asset is the first known state.
-     * 
- * - * DOES_NOT_EXIST = 3; - */ - DOES_NOT_EXIST(3), - /** - *
-     * prior_asset is a deletion.
-     * 
- * - * DELETED = 4; - */ - DELETED(4), - UNRECOGNIZED(-1), - ; - - /** - *
-     * prior_asset is not applicable for the current asset.
-     * 
- * - * PRIOR_ASSET_STATE_UNSPECIFIED = 0; - */ - public static final int PRIOR_ASSET_STATE_UNSPECIFIED_VALUE = 0; - /** - *
-     * prior_asset is populated correctly.
-     * 
- * - * PRESENT = 1; - */ - public static final int PRESENT_VALUE = 1; - /** - *
-     * Failed to set prior_asset.
-     * 
- * - * INVALID = 2; - */ - public static final int INVALID_VALUE = 2; - /** - *
-     * Current asset is the first known state.
-     * 
- * - * DOES_NOT_EXIST = 3; - */ - public static final int DOES_NOT_EXIST_VALUE = 3; - /** - *
-     * prior_asset is a deletion.
-     * 
- * - * DELETED = 4; - */ - public static final int DELETED_VALUE = 4; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PriorAssetState valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PriorAssetState forNumber(int value) { - switch (value) { - case 0: return PRIOR_ASSET_STATE_UNSPECIFIED; - case 1: return PRESENT; - case 2: return INVALID; - case 3: return DOES_NOT_EXIST; - case 4: return DELETED; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PriorAssetState> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PriorAssetState findValueByNumber(int number) { - return PriorAssetState.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1.TemporalAsset.getDescriptor().getEnumTypes().get(0); - } - - private static final PriorAssetState[] VALUES = values(); - - public static PriorAssetState valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PriorAssetState(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.TemporalAsset.PriorAssetState) - } - - public static final int WINDOW_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.TimeWindow window_; - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - * @return Whether the window field is set. - */ - @java.lang.Override - public boolean hasWindow() { - return window_ != null; - } - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - * @return The window. - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow getWindow() { - return window_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : window_; - } - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindowOrBuilder getWindowOrBuilder() { - return getWindow(); - } - - public static final int DELETED_FIELD_NUMBER = 2; - private boolean deleted_; - /** - *
-   * Whether the asset has been deleted or not.
-   * 
- * - * bool deleted = 2; - * @return The deleted. - */ - @java.lang.Override - public boolean getDeleted() { - return deleted_; - } - - public static final int ASSET_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1.Asset asset_; - /** - *
-   * An asset in Google Cloud.
-   * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - * @return Whether the asset field is set. - */ - @java.lang.Override - public boolean hasAsset() { - return asset_ != null; - } - /** - *
-   * An asset in Google Cloud.
-   * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - * @return The asset. - */ - @java.lang.Override - public com.google.cloud.asset.v1.Asset getAsset() { - return asset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : asset_; - } - /** - *
-   * An asset in Google Cloud.
-   * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AssetOrBuilder getAssetOrBuilder() { - return getAsset(); - } - - public static final int PRIOR_ASSET_STATE_FIELD_NUMBER = 4; - private int priorAssetState_; - /** - *
-   * State of prior_asset.
-   * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @return The enum numeric value on the wire for priorAssetState. - */ - @java.lang.Override public int getPriorAssetStateValue() { - return priorAssetState_; - } - /** - *
-   * State of prior_asset.
-   * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @return The priorAssetState. - */ - @java.lang.Override public com.google.cloud.asset.v1.TemporalAsset.PriorAssetState getPriorAssetState() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.TemporalAsset.PriorAssetState result = com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.valueOf(priorAssetState_); - return result == null ? com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.UNRECOGNIZED : result; - } - - public static final int PRIOR_ASSET_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1.Asset priorAsset_; - /** - *
-   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-   * Currently this is only set for responses in Real-Time Feed.
-   * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - * @return Whether the priorAsset field is set. - */ - @java.lang.Override - public boolean hasPriorAsset() { - return priorAsset_ != null; - } - /** - *
-   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-   * Currently this is only set for responses in Real-Time Feed.
-   * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - * @return The priorAsset. - */ - @java.lang.Override - public com.google.cloud.asset.v1.Asset getPriorAsset() { - return priorAsset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : priorAsset_; - } - /** - *
-   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-   * Currently this is only set for responses in Real-Time Feed.
-   * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - @java.lang.Override - public com.google.cloud.asset.v1.AssetOrBuilder getPriorAssetOrBuilder() { - return getPriorAsset(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (window_ != null) { - output.writeMessage(1, getWindow()); - } - if (deleted_ != false) { - output.writeBool(2, deleted_); - } - if (asset_ != null) { - output.writeMessage(3, getAsset()); - } - if (priorAssetState_ != com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.PRIOR_ASSET_STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, priorAssetState_); - } - if (priorAsset_ != null) { - output.writeMessage(5, getPriorAsset()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (window_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getWindow()); - } - if (deleted_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, deleted_); - } - if (asset_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAsset()); - } - if (priorAssetState_ != com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.PRIOR_ASSET_STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, priorAssetState_); - } - if (priorAsset_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getPriorAsset()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.TemporalAsset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.TemporalAsset other = (com.google.cloud.asset.v1.TemporalAsset) obj; - - if (hasWindow() != other.hasWindow()) return false; - if (hasWindow()) { - if (!getWindow() - .equals(other.getWindow())) return false; - } - if (getDeleted() - != other.getDeleted()) return false; - if (hasAsset() != other.hasAsset()) return false; - if (hasAsset()) { - if (!getAsset() - .equals(other.getAsset())) return false; - } - if (priorAssetState_ != other.priorAssetState_) return false; - if (hasPriorAsset() != other.hasPriorAsset()) return false; - if (hasPriorAsset()) { - if (!getPriorAsset() - .equals(other.getPriorAsset())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasWindow()) { - hash = (37 * hash) + WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getWindow().hashCode(); - } - hash = (37 * hash) + DELETED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDeleted()); - if (hasAsset()) { - hash = (37 * hash) + ASSET_FIELD_NUMBER; - hash = (53 * hash) + getAsset().hashCode(); - } - hash = (37 * hash) + PRIOR_ASSET_STATE_FIELD_NUMBER; - hash = (53 * hash) + priorAssetState_; - if (hasPriorAsset()) { - hash = (37 * hash) + PRIOR_ASSET_FIELD_NUMBER; - hash = (53 * hash) + getPriorAsset().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TemporalAsset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TemporalAsset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TemporalAsset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.TemporalAsset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An asset in Google Cloud and its temporal metadata, including the time window
-   * when it was observed and its status during that window.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.TemporalAsset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TemporalAsset) - com.google.cloud.asset.v1.TemporalAssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TemporalAsset.class, com.google.cloud.asset.v1.TemporalAsset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.TemporalAsset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (windowBuilder_ == null) { - window_ = null; - } else { - window_ = null; - windowBuilder_ = null; - } - deleted_ = false; - - if (assetBuilder_ == null) { - asset_ = null; - } else { - asset_ = null; - assetBuilder_ = null; - } - priorAssetState_ = 0; - - if (priorAssetBuilder_ == null) { - priorAsset_ = null; - } else { - priorAsset_ = null; - priorAssetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TemporalAsset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TemporalAsset getDefaultInstanceForType() { - return com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.TemporalAsset build() { - com.google.cloud.asset.v1.TemporalAsset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TemporalAsset buildPartial() { - com.google.cloud.asset.v1.TemporalAsset result = new com.google.cloud.asset.v1.TemporalAsset(this); - if (windowBuilder_ == null) { - result.window_ = window_; - } else { - result.window_ = windowBuilder_.build(); - } - result.deleted_ = deleted_; - if (assetBuilder_ == null) { - result.asset_ = asset_; - } else { - result.asset_ = assetBuilder_.build(); - } - result.priorAssetState_ = priorAssetState_; - if (priorAssetBuilder_ == null) { - result.priorAsset_ = priorAsset_; - } else { - result.priorAsset_ = priorAssetBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.TemporalAsset) { - return mergeFrom((com.google.cloud.asset.v1.TemporalAsset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.TemporalAsset other) { - if (other == com.google.cloud.asset.v1.TemporalAsset.getDefaultInstance()) return this; - if (other.hasWindow()) { - mergeWindow(other.getWindow()); - } - if (other.getDeleted() != false) { - setDeleted(other.getDeleted()); - } - if (other.hasAsset()) { - mergeAsset(other.getAsset()); - } - if (other.priorAssetState_ != 0) { - setPriorAssetStateValue(other.getPriorAssetStateValue()); - } - if (other.hasPriorAsset()) { - mergePriorAsset(other.getPriorAsset()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.TemporalAsset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.TemporalAsset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1.TimeWindow window_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> windowBuilder_; - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - * @return Whether the window field is set. - */ - public boolean hasWindow() { - return windowBuilder_ != null || window_ != null; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - * @return The window. - */ - public com.google.cloud.asset.v1.TimeWindow getWindow() { - if (windowBuilder_ == null) { - return window_ == null ? com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : window_; - } else { - return windowBuilder_.getMessage(); - } - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - public Builder setWindow(com.google.cloud.asset.v1.TimeWindow value) { - if (windowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - window_ = value; - onChanged(); - } else { - windowBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - public Builder setWindow( - com.google.cloud.asset.v1.TimeWindow.Builder builderForValue) { - if (windowBuilder_ == null) { - window_ = builderForValue.build(); - onChanged(); - } else { - windowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - public Builder mergeWindow(com.google.cloud.asset.v1.TimeWindow value) { - if (windowBuilder_ == null) { - if (window_ != null) { - window_ = - com.google.cloud.asset.v1.TimeWindow.newBuilder(window_).mergeFrom(value).buildPartial(); - } else { - window_ = value; - } - onChanged(); - } else { - windowBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - public Builder clearWindow() { - if (windowBuilder_ == null) { - window_ = null; - onChanged(); - } else { - window_ = null; - windowBuilder_ = null; - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - public com.google.cloud.asset.v1.TimeWindow.Builder getWindowBuilder() { - - onChanged(); - return getWindowFieldBuilder().getBuilder(); - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - public com.google.cloud.asset.v1.TimeWindowOrBuilder getWindowOrBuilder() { - if (windowBuilder_ != null) { - return windowBuilder_.getMessageOrBuilder(); - } else { - return window_ == null ? - com.google.cloud.asset.v1.TimeWindow.getDefaultInstance() : window_; - } - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder> - getWindowFieldBuilder() { - if (windowBuilder_ == null) { - windowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.TimeWindow, com.google.cloud.asset.v1.TimeWindow.Builder, com.google.cloud.asset.v1.TimeWindowOrBuilder>( - getWindow(), - getParentForChildren(), - isClean()); - window_ = null; - } - return windowBuilder_; - } - - private boolean deleted_ ; - /** - *
-     * Whether the asset has been deleted or not.
-     * 
- * - * bool deleted = 2; - * @return The deleted. - */ - @java.lang.Override - public boolean getDeleted() { - return deleted_; - } - /** - *
-     * Whether the asset has been deleted or not.
-     * 
- * - * bool deleted = 2; - * @param value The deleted to set. - * @return This builder for chaining. - */ - public Builder setDeleted(boolean value) { - - deleted_ = value; - onChanged(); - return this; - } - /** - *
-     * Whether the asset has been deleted or not.
-     * 
- * - * bool deleted = 2; - * @return This builder for chaining. - */ - public Builder clearDeleted() { - - deleted_ = false; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.Asset asset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> assetBuilder_; - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - * @return Whether the asset field is set. - */ - public boolean hasAsset() { - return assetBuilder_ != null || asset_ != null; - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - * @return The asset. - */ - public com.google.cloud.asset.v1.Asset getAsset() { - if (assetBuilder_ == null) { - return asset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : asset_; - } else { - return assetBuilder_.getMessage(); - } - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - public Builder setAsset(com.google.cloud.asset.v1.Asset value) { - if (assetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - asset_ = value; - onChanged(); - } else { - assetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - public Builder setAsset( - com.google.cloud.asset.v1.Asset.Builder builderForValue) { - if (assetBuilder_ == null) { - asset_ = builderForValue.build(); - onChanged(); - } else { - assetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - public Builder mergeAsset(com.google.cloud.asset.v1.Asset value) { - if (assetBuilder_ == null) { - if (asset_ != null) { - asset_ = - com.google.cloud.asset.v1.Asset.newBuilder(asset_).mergeFrom(value).buildPartial(); - } else { - asset_ = value; - } - onChanged(); - } else { - assetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - public Builder clearAsset() { - if (assetBuilder_ == null) { - asset_ = null; - onChanged(); - } else { - asset_ = null; - assetBuilder_ = null; - } - - return this; - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - public com.google.cloud.asset.v1.Asset.Builder getAssetBuilder() { - - onChanged(); - return getAssetFieldBuilder().getBuilder(); - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - public com.google.cloud.asset.v1.AssetOrBuilder getAssetOrBuilder() { - if (assetBuilder_ != null) { - return assetBuilder_.getMessageOrBuilder(); - } else { - return asset_ == null ? - com.google.cloud.asset.v1.Asset.getDefaultInstance() : asset_; - } - } - /** - *
-     * An asset in Google Cloud.
-     * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> - getAssetFieldBuilder() { - if (assetBuilder_ == null) { - assetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder>( - getAsset(), - getParentForChildren(), - isClean()); - asset_ = null; - } - return assetBuilder_; - } - - private int priorAssetState_ = 0; - /** - *
-     * State of prior_asset.
-     * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @return The enum numeric value on the wire for priorAssetState. - */ - @java.lang.Override public int getPriorAssetStateValue() { - return priorAssetState_; - } - /** - *
-     * State of prior_asset.
-     * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @param value The enum numeric value on the wire for priorAssetState to set. - * @return This builder for chaining. - */ - public Builder setPriorAssetStateValue(int value) { - - priorAssetState_ = value; - onChanged(); - return this; - } - /** - *
-     * State of prior_asset.
-     * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @return The priorAssetState. - */ - @java.lang.Override - public com.google.cloud.asset.v1.TemporalAsset.PriorAssetState getPriorAssetState() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1.TemporalAsset.PriorAssetState result = com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.valueOf(priorAssetState_); - return result == null ? com.google.cloud.asset.v1.TemporalAsset.PriorAssetState.UNRECOGNIZED : result; - } - /** - *
-     * State of prior_asset.
-     * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @param value The priorAssetState to set. - * @return This builder for chaining. - */ - public Builder setPriorAssetState(com.google.cloud.asset.v1.TemporalAsset.PriorAssetState value) { - if (value == null) { - throw new NullPointerException(); - } - - priorAssetState_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * State of prior_asset.
-     * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @return This builder for chaining. - */ - public Builder clearPriorAssetState() { - - priorAssetState_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1.Asset priorAsset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> priorAssetBuilder_; - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - * @return Whether the priorAsset field is set. - */ - public boolean hasPriorAsset() { - return priorAssetBuilder_ != null || priorAsset_ != null; - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - * @return The priorAsset. - */ - public com.google.cloud.asset.v1.Asset getPriorAsset() { - if (priorAssetBuilder_ == null) { - return priorAsset_ == null ? com.google.cloud.asset.v1.Asset.getDefaultInstance() : priorAsset_; - } else { - return priorAssetBuilder_.getMessage(); - } - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - public Builder setPriorAsset(com.google.cloud.asset.v1.Asset value) { - if (priorAssetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - priorAsset_ = value; - onChanged(); - } else { - priorAssetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - public Builder setPriorAsset( - com.google.cloud.asset.v1.Asset.Builder builderForValue) { - if (priorAssetBuilder_ == null) { - priorAsset_ = builderForValue.build(); - onChanged(); - } else { - priorAssetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - public Builder mergePriorAsset(com.google.cloud.asset.v1.Asset value) { - if (priorAssetBuilder_ == null) { - if (priorAsset_ != null) { - priorAsset_ = - com.google.cloud.asset.v1.Asset.newBuilder(priorAsset_).mergeFrom(value).buildPartial(); - } else { - priorAsset_ = value; - } - onChanged(); - } else { - priorAssetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - public Builder clearPriorAsset() { - if (priorAssetBuilder_ == null) { - priorAsset_ = null; - onChanged(); - } else { - priorAsset_ = null; - priorAssetBuilder_ = null; - } - - return this; - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - public com.google.cloud.asset.v1.Asset.Builder getPriorAssetBuilder() { - - onChanged(); - return getPriorAssetFieldBuilder().getBuilder(); - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - public com.google.cloud.asset.v1.AssetOrBuilder getPriorAssetOrBuilder() { - if (priorAssetBuilder_ != null) { - return priorAssetBuilder_.getMessageOrBuilder(); - } else { - return priorAsset_ == null ? - com.google.cloud.asset.v1.Asset.getDefaultInstance() : priorAsset_; - } - } - /** - *
-     * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-     * Currently this is only set for responses in Real-Time Feed.
-     * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder> - getPriorAssetFieldBuilder() { - if (priorAssetBuilder_ == null) { - priorAssetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Asset, com.google.cloud.asset.v1.Asset.Builder, com.google.cloud.asset.v1.AssetOrBuilder>( - getPriorAsset(), - getParentForChildren(), - isClean()); - priorAsset_ = null; - } - return priorAssetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TemporalAsset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TemporalAsset) - private static final com.google.cloud.asset.v1.TemporalAsset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TemporalAsset(); - } - - public static com.google.cloud.asset.v1.TemporalAsset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TemporalAsset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TemporalAsset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TemporalAsset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java deleted file mode 100644 index 40ba4db442af..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java +++ /dev/null @@ -1,122 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface TemporalAssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TemporalAsset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - * @return Whether the window field is set. - */ - boolean hasWindow(); - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - * @return The window. - */ - com.google.cloud.asset.v1.TimeWindow getWindow(); - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1.TimeWindow window = 1; - */ - com.google.cloud.asset.v1.TimeWindowOrBuilder getWindowOrBuilder(); - - /** - *
-   * Whether the asset has been deleted or not.
-   * 
- * - * bool deleted = 2; - * @return The deleted. - */ - boolean getDeleted(); - - /** - *
-   * An asset in Google Cloud.
-   * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - * @return Whether the asset field is set. - */ - boolean hasAsset(); - /** - *
-   * An asset in Google Cloud.
-   * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - * @return The asset. - */ - com.google.cloud.asset.v1.Asset getAsset(); - /** - *
-   * An asset in Google Cloud.
-   * 
- * - * .google.cloud.asset.v1.Asset asset = 3; - */ - com.google.cloud.asset.v1.AssetOrBuilder getAssetOrBuilder(); - - /** - *
-   * State of prior_asset.
-   * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @return The enum numeric value on the wire for priorAssetState. - */ - int getPriorAssetStateValue(); - /** - *
-   * State of prior_asset.
-   * 
- * - * .google.cloud.asset.v1.TemporalAsset.PriorAssetState prior_asset_state = 4; - * @return The priorAssetState. - */ - com.google.cloud.asset.v1.TemporalAsset.PriorAssetState getPriorAssetState(); - - /** - *
-   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-   * Currently this is only set for responses in Real-Time Feed.
-   * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - * @return Whether the priorAsset field is set. - */ - boolean hasPriorAsset(); - /** - *
-   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-   * Currently this is only set for responses in Real-Time Feed.
-   * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - * @return The priorAsset. - */ - com.google.cloud.asset.v1.Asset getPriorAsset(); - /** - *
-   * Prior copy of the asset. Populated if prior_asset_state is PRESENT.
-   * Currently this is only set for responses in Real-Time Feed.
-   * 
- * - * .google.cloud.asset.v1.Asset prior_asset = 5; - */ - com.google.cloud.asset.v1.AssetOrBuilder getPriorAssetOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java deleted file mode 100644 index b266998f22a8..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java +++ /dev/null @@ -1,913 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * A time window specified by its `start_time` and `end_time`.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.TimeWindow} - */ -public final class TimeWindow extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.TimeWindow) - TimeWindowOrBuilder { -private static final long serialVersionUID = 0L; - // Use TimeWindow.newBuilder() to construct. - private TimeWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TimeWindow() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TimeWindow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TimeWindow( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TimeWindow.class, com.google.cloud.asset.v1.TimeWindow.Builder.class); - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * End time of the time window (inclusive). If not specified, the current
-   * timestamp is used instead.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * End time of the time window (inclusive). If not specified, the current
-   * timestamp is used instead.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * End time of the time window (inclusive). If not specified, the current
-   * timestamp is used instead.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getEndTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.TimeWindow)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.TimeWindow other = (com.google.cloud.asset.v1.TimeWindow) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime() - .equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TimeWindow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TimeWindow parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.TimeWindow parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.TimeWindow prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A time window specified by its `start_time` and `end_time`.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.TimeWindow} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.TimeWindow) - com.google.cloud.asset.v1.TimeWindowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.TimeWindow.class, com.google.cloud.asset.v1.TimeWindow.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.TimeWindow.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_TimeWindow_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow getDefaultInstanceForType() { - return com.google.cloud.asset.v1.TimeWindow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow build() { - com.google.cloud.asset.v1.TimeWindow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow buildPartial() { - com.google.cloud.asset.v1.TimeWindow result = new com.google.cloud.asset.v1.TimeWindow(this); - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.TimeWindow) { - return mergeFrom((com.google.cloud.asset.v1.TimeWindow)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.TimeWindow other) { - if (other == com.google.cloud.asset.v1.TimeWindow.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.TimeWindow parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.TimeWindow) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getStartTime(), - getParentForChildren(), - isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * End time of the time window (inclusive). If not specified, the current
-     * timestamp is used instead.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.TimeWindow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.TimeWindow) - private static final com.google.cloud.asset.v1.TimeWindow DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.TimeWindow(); - } - - public static com.google.cloud.asset.v1.TimeWindow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimeWindow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeWindow(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.TimeWindow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java deleted file mode 100644 index 81646f3d1e72..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindowOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface TimeWindowOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.TimeWindow) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - *
-   * End time of the time window (inclusive). If not specified, the current
-   * timestamp is used instead.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * End time of the time window (inclusive). If not specified, the current
-   * timestamp is used instead.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * End time of the time window (inclusive). If not specified, the current
-   * timestamp is used instead.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java deleted file mode 100644 index e6a118b47f51..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequest.java +++ /dev/null @@ -1,973 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Update asset feed request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.UpdateFeedRequest} - */ -public final class UpdateFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.UpdateFeedRequest) - UpdateFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateFeedRequest.newBuilder() to construct. - private UpdateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateFeedRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = input.readMessage(com.google.cloud.asset.v1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.UpdateFeedRequest.class, com.google.cloud.asset.v1.UpdateFeedRequest.Builder.class); - } - - public static final int FEED_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.Feed feed_; - /** - *
-   * Required. The new values of feed details. It must match an existing feed
-   * and the field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - @java.lang.Override - public boolean hasFeed() { - return feed_ != null; - } - /** - *
-   * Required. The new values of feed details. It must match an existing feed
-   * and the field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - @java.lang.Override - public com.google.cloud.asset.v1.Feed getFeed() { - return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; - } - /** - *
-   * Required. The new values of feed details. It must match an existing feed
-   * and the field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { - return getFeed(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (feed_ != null) { - output.writeMessage(1, getFeed()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (feed_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getFeed()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.UpdateFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.UpdateFeedRequest other = (com.google.cloud.asset.v1.UpdateFeedRequest) obj; - - if (hasFeed() != other.hasFeed()) return false; - if (hasFeed()) { - if (!getFeed() - .equals(other.getFeed())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFeed()) { - hash = (37 * hash) + FEED_FIELD_NUMBER; - hash = (53 * hash) + getFeed().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.UpdateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.UpdateFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Update asset feed request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.UpdateFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.UpdateFeedRequest) - com.google.cloud.asset.v1.UpdateFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.UpdateFeedRequest.class, com.google.cloud.asset.v1.UpdateFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.UpdateFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (feedBuilder_ == null) { - feed_ = null; - } else { - feed_ = null; - feedBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.UpdateFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateFeedRequest build() { - com.google.cloud.asset.v1.UpdateFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateFeedRequest buildPartial() { - com.google.cloud.asset.v1.UpdateFeedRequest result = new com.google.cloud.asset.v1.UpdateFeedRequest(this); - if (feedBuilder_ == null) { - result.feed_ = feed_; - } else { - result.feed_ = feedBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.UpdateFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1.UpdateFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.UpdateFeedRequest other) { - if (other == com.google.cloud.asset.v1.UpdateFeedRequest.getDefaultInstance()) return this; - if (other.hasFeed()) { - mergeFeed(other.getFeed()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.UpdateFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.UpdateFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1.Feed feed_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> feedBuilder_; - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - public boolean hasFeed() { - return feedBuilder_ != null || feed_ != null; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - public com.google.cloud.asset.v1.Feed getFeed() { - if (feedBuilder_ == null) { - return feed_ == null ? com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; - } else { - return feedBuilder_.getMessage(); - } - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed(com.google.cloud.asset.v1.Feed value) { - if (feedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - feed_ = value; - onChanged(); - } else { - feedBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed( - com.google.cloud.asset.v1.Feed.Builder builderForValue) { - if (feedBuilder_ == null) { - feed_ = builderForValue.build(); - onChanged(); - } else { - feedBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeFeed(com.google.cloud.asset.v1.Feed value) { - if (feedBuilder_ == null) { - if (feed_ != null) { - feed_ = - com.google.cloud.asset.v1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); - } else { - feed_ = value; - } - onChanged(); - } else { - feedBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFeed() { - if (feedBuilder_ == null) { - feed_ = null; - onChanged(); - } else { - feed_ = null; - feedBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.Feed.Builder getFeedBuilder() { - - onChanged(); - return getFeedFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder() { - if (feedBuilder_ != null) { - return feedBuilder_.getMessageOrBuilder(); - } else { - return feed_ == null ? - com.google.cloud.asset.v1.Feed.getDefaultInstance() : feed_; - } - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed
-     * and the field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder> - getFeedFieldBuilder() { - if (feedBuilder_ == null) { - feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.Feed, com.google.cloud.asset.v1.Feed.Builder, com.google.cloud.asset.v1.FeedOrBuilder>( - getFeed(), - getParentForChildren(), - isClean()); - feed_ = null; - } - return feedBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.UpdateFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.UpdateFeedRequest) - private static final com.google.cloud.asset.v1.UpdateFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.UpdateFeedRequest(); - } - - public static com.google.cloud.asset.v1.UpdateFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java deleted file mode 100644 index 37dafabef416..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateFeedRequestOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface UpdateFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.UpdateFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The new values of feed details. It must match an existing feed
-   * and the field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - boolean hasFeed(); - /** - *
-   * Required. The new values of feed details. It must match an existing feed
-   * and the field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - com.google.cloud.asset.v1.Feed getFeed(); - /** - *
-   * Required. The new values of feed details. It must match an existing feed
-   * and the field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.FeedOrBuilder getFeedOrBuilder(); - - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java deleted file mode 100644 index f42dae545fa0..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequest.java +++ /dev/null @@ -1,961 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Request to update a saved query.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.UpdateSavedQueryRequest} - */ -public final class UpdateSavedQueryRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.UpdateSavedQueryRequest) - UpdateSavedQueryRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateSavedQueryRequest.newBuilder() to construct. - private UpdateSavedQueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateSavedQueryRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateSavedQueryRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateSavedQueryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1.SavedQuery.Builder subBuilder = null; - if (savedQuery_ != null) { - subBuilder = savedQuery_.toBuilder(); - } - savedQuery_ = input.readMessage(com.google.cloud.asset.v1.SavedQuery.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(savedQuery_); - savedQuery_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.UpdateSavedQueryRequest.class, com.google.cloud.asset.v1.UpdateSavedQueryRequest.Builder.class); - } - - public static final int SAVED_QUERY_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1.SavedQuery savedQuery_; - /** - *
-   * Required. The saved query to update.
-   * The saved query's `name` field is used to identify the one to update,
-   * which has format as below:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the savedQuery field is set. - */ - @java.lang.Override - public boolean hasSavedQuery() { - return savedQuery_ != null; - } - /** - *
-   * Required. The saved query to update.
-   * The saved query's `name` field is used to identify the one to update,
-   * which has format as below:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQuery. - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { - return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; - } - /** - *
-   * Required. The saved query to update.
-   * The saved query's `name` field is used to identify the one to update,
-   * which has format as below:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { - return getSavedQuery(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (savedQuery_ != null) { - output.writeMessage(1, getSavedQuery()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (savedQuery_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSavedQuery()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.UpdateSavedQueryRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.UpdateSavedQueryRequest other = (com.google.cloud.asset.v1.UpdateSavedQueryRequest) obj; - - if (hasSavedQuery() != other.hasSavedQuery()) return false; - if (hasSavedQuery()) { - if (!getSavedQuery() - .equals(other.getSavedQuery())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSavedQuery()) { - hash = (37 * hash) + SAVED_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getSavedQuery().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.UpdateSavedQueryRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Request to update a saved query.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.UpdateSavedQueryRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.UpdateSavedQueryRequest) - com.google.cloud.asset.v1.UpdateSavedQueryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.UpdateSavedQueryRequest.class, com.google.cloud.asset.v1.UpdateSavedQueryRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.UpdateSavedQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (savedQueryBuilder_ == null) { - savedQuery_ = null; - } else { - savedQuery_ = null; - savedQueryBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetServiceProto.internal_static_google_cloud_asset_v1_UpdateSavedQueryRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateSavedQueryRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1.UpdateSavedQueryRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateSavedQueryRequest build() { - com.google.cloud.asset.v1.UpdateSavedQueryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateSavedQueryRequest buildPartial() { - com.google.cloud.asset.v1.UpdateSavedQueryRequest result = new com.google.cloud.asset.v1.UpdateSavedQueryRequest(this); - if (savedQueryBuilder_ == null) { - result.savedQuery_ = savedQuery_; - } else { - result.savedQuery_ = savedQueryBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.UpdateSavedQueryRequest) { - return mergeFrom((com.google.cloud.asset.v1.UpdateSavedQueryRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.UpdateSavedQueryRequest other) { - if (other == com.google.cloud.asset.v1.UpdateSavedQueryRequest.getDefaultInstance()) return this; - if (other.hasSavedQuery()) { - mergeSavedQuery(other.getSavedQuery()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.UpdateSavedQueryRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.UpdateSavedQueryRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1.SavedQuery savedQuery_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> savedQueryBuilder_; - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the savedQuery field is set. - */ - public boolean hasSavedQuery() { - return savedQueryBuilder_ != null || savedQuery_ != null; - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQuery. - */ - public com.google.cloud.asset.v1.SavedQuery getSavedQuery() { - if (savedQueryBuilder_ == null) { - return savedQuery_ == null ? com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; - } else { - return savedQueryBuilder_.getMessage(); - } - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { - if (savedQueryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - savedQuery_ = value; - onChanged(); - } else { - savedQueryBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setSavedQuery( - com.google.cloud.asset.v1.SavedQuery.Builder builderForValue) { - if (savedQueryBuilder_ == null) { - savedQuery_ = builderForValue.build(); - onChanged(); - } else { - savedQueryBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeSavedQuery(com.google.cloud.asset.v1.SavedQuery value) { - if (savedQueryBuilder_ == null) { - if (savedQuery_ != null) { - savedQuery_ = - com.google.cloud.asset.v1.SavedQuery.newBuilder(savedQuery_).mergeFrom(value).buildPartial(); - } else { - savedQuery_ = value; - } - onChanged(); - } else { - savedQueryBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearSavedQuery() { - if (savedQueryBuilder_ == null) { - savedQuery_ = null; - onChanged(); - } else { - savedQuery_ = null; - savedQueryBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.SavedQuery.Builder getSavedQueryBuilder() { - - onChanged(); - return getSavedQueryFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder() { - if (savedQueryBuilder_ != null) { - return savedQueryBuilder_.getMessageOrBuilder(); - } else { - return savedQuery_ == null ? - com.google.cloud.asset.v1.SavedQuery.getDefaultInstance() : savedQuery_; - } - } - /** - *
-     * Required. The saved query to update.
-     * The saved query's `name` field is used to identify the one to update,
-     * which has format as below:
-     * * projects/project_number/savedQueries/saved_query_id
-     * * folders/folder_number/savedQueries/saved_query_id
-     * * organizations/organization_number/savedQueries/saved_query_id
-     * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder> - getSavedQueryFieldBuilder() { - if (savedQueryBuilder_ == null) { - savedQueryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1.SavedQuery, com.google.cloud.asset.v1.SavedQuery.Builder, com.google.cloud.asset.v1.SavedQueryOrBuilder>( - getSavedQuery(), - getParentForChildren(), - isClean()); - savedQuery_ = null; - } - return savedQueryBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Required. The list of fields to update.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.UpdateSavedQueryRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.UpdateSavedQueryRequest) - private static final com.google.cloud.asset.v1.UpdateSavedQueryRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.UpdateSavedQueryRequest(); - } - - public static com.google.cloud.asset.v1.UpdateSavedQueryRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateSavedQueryRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateSavedQueryRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.UpdateSavedQueryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java deleted file mode 100644 index 307da869bba4..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/UpdateSavedQueryRequestOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/asset_service.proto - -package com.google.cloud.asset.v1; - -public interface UpdateSavedQueryRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.UpdateSavedQueryRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The saved query to update.
-   * The saved query's `name` field is used to identify the one to update,
-   * which has format as below:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the savedQuery field is set. - */ - boolean hasSavedQuery(); - /** - *
-   * Required. The saved query to update.
-   * The saved query's `name` field is used to identify the one to update,
-   * which has format as below:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The savedQuery. - */ - com.google.cloud.asset.v1.SavedQuery getSavedQuery(); - /** - *
-   * Required. The saved query to update.
-   * The saved query's `name` field is used to identify the one to update,
-   * which has format as below:
-   * * projects/project_number/savedQueries/saved_query_id
-   * * folders/folder_number/savedQueries/saved_query_id
-   * * organizations/organization_number/savedQueries/saved_query_id
-   * 
- * - * .google.cloud.asset.v1.SavedQuery saved_query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1.SavedQueryOrBuilder getSavedQueryOrBuilder(); - - /** - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Required. The list of fields to update.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java deleted file mode 100644 index a6dcee4cc3b1..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResource.java +++ /dev/null @@ -1,969 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -/** - *
- * Resource representation as defined by the corresponding service providing the
- * resource for a given API version.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1.VersionedResource} - */ -public final class VersionedResource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.VersionedResource) - VersionedResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use VersionedResource.newBuilder() to construct. - private VersionedResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VersionedResource() { - version_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VersionedResource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private VersionedResource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: { - com.google.protobuf.Struct.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.VersionedResource.class, com.google.cloud.asset.v1.VersionedResource.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - *
-   * API version of the resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine v1 API as defined
-   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-   * version will be "v1".
-   * 
- * - * string version = 1; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * API version of the resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine v1 API as defined
-   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-   * version will be "v1".
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FIELD_NUMBER = 2; - private com.google.protobuf.Struct resource_; - /** - *
-   * JSON representation of the resource as defined by the corresponding
-   * service providing this resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine, this field will
-   * contain the JSON representation of the instance as defined by Compute
-   * Engine:
-   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-   * You can find the resource definition for each supported resource type in
-   * this table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * .google.protobuf.Struct resource = 2; - * @return Whether the resource field is set. - */ - @java.lang.Override - public boolean hasResource() { - return resource_ != null; - } - /** - *
-   * JSON representation of the resource as defined by the corresponding
-   * service providing this resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine, this field will
-   * contain the JSON representation of the instance as defined by Compute
-   * Engine:
-   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-   * You can find the resource definition for each supported resource type in
-   * this table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * .google.protobuf.Struct resource = 2; - * @return The resource. - */ - @java.lang.Override - public com.google.protobuf.Struct getResource() { - return resource_ == null ? com.google.protobuf.Struct.getDefaultInstance() : resource_; - } - /** - *
-   * JSON representation of the resource as defined by the corresponding
-   * service providing this resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine, this field will
-   * contain the JSON representation of the instance as defined by Compute
-   * Engine:
-   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-   * You can find the resource definition for each supported resource type in
-   * this table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * .google.protobuf.Struct resource = 2; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getResourceOrBuilder() { - return getResource(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (resource_ != null) { - output.writeMessage(2, getResource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (resource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getResource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1.VersionedResource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1.VersionedResource other = (com.google.cloud.asset.v1.VersionedResource) obj; - - if (!getVersion() - .equals(other.getVersion())) return false; - if (hasResource() != other.hasResource()) return false; - if (hasResource()) { - if (!getResource() - .equals(other.getResource())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - if (hasResource()) { - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.VersionedResource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.VersionedResource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1.VersionedResource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1.VersionedResource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Resource representation as defined by the corresponding service providing the
-   * resource for a given API version.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1.VersionedResource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.VersionedResource) - com.google.cloud.asset.v1.VersionedResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1.VersionedResource.class, com.google.cloud.asset.v1.VersionedResource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1.VersionedResource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - if (resourceBuilder_ == null) { - resource_ = null; - } else { - resource_ = null; - resourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1.AssetProto.internal_static_google_cloud_asset_v1_VersionedResource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResource getDefaultInstanceForType() { - return com.google.cloud.asset.v1.VersionedResource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResource build() { - com.google.cloud.asset.v1.VersionedResource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResource buildPartial() { - com.google.cloud.asset.v1.VersionedResource result = new com.google.cloud.asset.v1.VersionedResource(this); - result.version_ = version_; - if (resourceBuilder_ == null) { - result.resource_ = resource_; - } else { - result.resource_ = resourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1.VersionedResource) { - return mergeFrom((com.google.cloud.asset.v1.VersionedResource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1.VersionedResource other) { - if (other == com.google.cloud.asset.v1.VersionedResource.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (other.hasResource()) { - mergeResource(other.getResource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1.VersionedResource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1.VersionedResource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * API version of the resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine v1 API as defined
-     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-     * version will be "v1".
-     * 
- * - * string version = 1; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * API version of the resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine v1 API as defined
-     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-     * version will be "v1".
-     * 
- * - * string version = 1; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * API version of the resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine v1 API as defined
-     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-     * version will be "v1".
-     * 
- * - * string version = 1; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * API version of the resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine v1 API as defined
-     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-     * version will be "v1".
-     * 
- * - * string version = 1; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * API version of the resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine v1 API as defined
-     * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-     * version will be "v1".
-     * 
- * - * string version = 1; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Struct resource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> resourceBuilder_; - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - * @return Whether the resource field is set. - */ - public boolean hasResource() { - return resourceBuilder_ != null || resource_ != null; - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - * @return The resource. - */ - public com.google.protobuf.Struct getResource() { - if (resourceBuilder_ == null) { - return resource_ == null ? com.google.protobuf.Struct.getDefaultInstance() : resource_; - } else { - return resourceBuilder_.getMessage(); - } - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - */ - public Builder setResource(com.google.protobuf.Struct value) { - if (resourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - onChanged(); - } else { - resourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - */ - public Builder setResource( - com.google.protobuf.Struct.Builder builderForValue) { - if (resourceBuilder_ == null) { - resource_ = builderForValue.build(); - onChanged(); - } else { - resourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - */ - public Builder mergeResource(com.google.protobuf.Struct value) { - if (resourceBuilder_ == null) { - if (resource_ != null) { - resource_ = - com.google.protobuf.Struct.newBuilder(resource_).mergeFrom(value).buildPartial(); - } else { - resource_ = value; - } - onChanged(); - } else { - resourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - */ - public Builder clearResource() { - if (resourceBuilder_ == null) { - resource_ = null; - onChanged(); - } else { - resource_ = null; - resourceBuilder_ = null; - } - - return this; - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - */ - public com.google.protobuf.Struct.Builder getResourceBuilder() { - - onChanged(); - return getResourceFieldBuilder().getBuilder(); - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - */ - public com.google.protobuf.StructOrBuilder getResourceOrBuilder() { - if (resourceBuilder_ != null) { - return resourceBuilder_.getMessageOrBuilder(); - } else { - return resource_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : resource_; - } - } - /** - *
-     * JSON representation of the resource as defined by the corresponding
-     * service providing this resource.
-     * Example:
-     * If the resource is an instance provided by Compute Engine, this field will
-     * contain the JSON representation of the instance as defined by Compute
-     * Engine:
-     * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-     * You can find the resource definition for each supported resource type in
-     * this table:
-     * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-     * 
- * - * .google.protobuf.Struct resource = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getResourceFieldBuilder() { - if (resourceBuilder_ == null) { - resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getResource(), - getParentForChildren(), - isClean()); - resource_ = null; - } - return resourceBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.VersionedResource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.VersionedResource) - private static final com.google.cloud.asset.v1.VersionedResource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1.VersionedResource(); - } - - public static com.google.cloud.asset.v1.VersionedResource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VersionedResource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VersionedResource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1.VersionedResource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java deleted file mode 100644 index 9f9efa604b04..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/VersionedResourceOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1/assets.proto - -package com.google.cloud.asset.v1; - -public interface VersionedResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.VersionedResource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * API version of the resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine v1 API as defined
-   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-   * version will be "v1".
-   * 
- * - * string version = 1; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * API version of the resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine v1 API as defined
-   * in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
-   * version will be "v1".
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - *
-   * JSON representation of the resource as defined by the corresponding
-   * service providing this resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine, this field will
-   * contain the JSON representation of the instance as defined by Compute
-   * Engine:
-   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-   * You can find the resource definition for each supported resource type in
-   * this table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * .google.protobuf.Struct resource = 2; - * @return Whether the resource field is set. - */ - boolean hasResource(); - /** - *
-   * JSON representation of the resource as defined by the corresponding
-   * service providing this resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine, this field will
-   * contain the JSON representation of the instance as defined by Compute
-   * Engine:
-   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-   * You can find the resource definition for each supported resource type in
-   * this table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * .google.protobuf.Struct resource = 2; - * @return The resource. - */ - com.google.protobuf.Struct getResource(); - /** - *
-   * JSON representation of the resource as defined by the corresponding
-   * service providing this resource.
-   * Example:
-   * If the resource is an instance provided by Compute Engine, this field will
-   * contain the JSON representation of the instance as defined by Compute
-   * Engine:
-   * `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
-   * You can find the resource definition for each supported resource type in
-   * this table:
-   * `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
-   * 
- * - * .google.protobuf.Struct resource = 2; - */ - com.google.protobuf.StructOrBuilder getResourceOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto deleted file mode 100644 index 1c34327291db..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto +++ /dev/null @@ -1,2072 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/asset/v1/assets.proto"; -import "google/iam/v1/policy.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/type/expr.proto"; - -option csharp_namespace = "Google.Cloud.Asset.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetServiceProto"; -option java_package = "com.google.cloud.asset.v1"; -option php_namespace = "Google\\Cloud\\Asset\\V1"; - -// Asset service definition. -service AssetService { - option (google.api.default_host) = "cloudasset.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // 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. - rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=*/*}:exportAssets" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.asset.v1.ExportAssetsResponse" - metadata_type: "google.cloud.asset.v1.ExportAssetsRequest" - }; - } - - // Lists assets with time and resource types and returns paged results in - // response. - rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { - option (google.api.http) = { - get: "/v1/{parent=*/*}/assets" - }; - option (google.api.method_signature) = "parent"; - } - - // 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. - rpc BatchGetAssetsHistory(BatchGetAssetsHistoryRequest) - returns (BatchGetAssetsHistoryResponse) { - option (google.api.http) = { - get: "/v1/{parent=*/*}:batchGetAssetsHistory" - }; - } - - // Creates a feed in a parent project/folder/organization to listen to its - // asset updates. - rpc CreateFeed(CreateFeedRequest) returns (Feed) { - option (google.api.http) = { - post: "/v1/{parent=*/*}/feeds" - body: "*" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about an asset feed. - rpc GetFeed(GetFeedRequest) returns (Feed) { - option (google.api.http) = { - get: "/v1/{name=*/*/feeds/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all asset feeds in a parent project/folder/organization. - rpc ListFeeds(ListFeedsRequest) returns (ListFeedsResponse) { - option (google.api.http) = { - get: "/v1/{parent=*/*}/feeds" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates an asset feed configuration. - rpc UpdateFeed(UpdateFeedRequest) returns (Feed) { - option (google.api.http) = { - patch: "/v1/{feed.name=*/*/feeds/*}" - body: "*" - }; - option (google.api.method_signature) = "feed"; - } - - // Deletes an asset feed. - rpc DeleteFeed(DeleteFeedRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=*/*/feeds/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Searches all 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. - rpc SearchAllResources(SearchAllResourcesRequest) - returns (SearchAllResourcesResponse) { - option (google.api.http) = { - get: "/v1/{scope=*/*}:searchAllResources" - }; - option (google.api.method_signature) = "scope,query,asset_types"; - } - - // 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. - rpc SearchAllIamPolicies(SearchAllIamPoliciesRequest) - returns (SearchAllIamPoliciesResponse) { - option (google.api.http) = { - get: "/v1/{scope=*/*}:searchAllIamPolicies" - }; - option (google.api.method_signature) = "scope,query"; - } - - // Analyzes IAM policies to answer which identities have what accesses on - // which resources. - rpc AnalyzeIamPolicy(AnalyzeIamPolicyRequest) - returns (AnalyzeIamPolicyResponse) { - option (google.api.http) = { - get: "/v1/{analysis_query.scope=*/*}:analyzeIamPolicy" - }; - } - - // 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. - rpc AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{analysis_query.scope=*/*}:analyzeIamPolicyLongrunning" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse" - metadata_type: "google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata" - }; - } - - // 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. - rpc AnalyzeMove(AnalyzeMoveRequest) returns (AnalyzeMoveResponse) { - option (google.api.http) = { - get: "/v1/{resource=*/*}:analyzeMove" - }; - } - - // Issue a job that queries assets using a SQL statement compatible with - // [BigQuery Standard - // SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-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. - rpc QueryAssets(QueryAssetsRequest) returns (QueryAssetsResponse) { - option (google.api.http) = { - post: "/v1/{parent=*/*}:queryAssets" - body: "*" - }; - } - - // Creates a saved query in a parent project/folder/organization. - rpc CreateSavedQuery(CreateSavedQueryRequest) returns (SavedQuery) { - option (google.api.http) = { - post: "/v1/{parent=*/*}/savedQueries" - body: "saved_query" - }; - option (google.api.method_signature) = "parent,saved_query,saved_query_id"; - } - - // Gets details about a saved query. - rpc GetSavedQuery(GetSavedQueryRequest) returns (SavedQuery) { - option (google.api.http) = { - get: "/v1/{name=*/*/savedQueries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all saved queries in a parent project/folder/organization. - rpc ListSavedQueries(ListSavedQueriesRequest) - returns (ListSavedQueriesResponse) { - option (google.api.http) = { - get: "/v1/{parent=*/*}/savedQueries" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a saved query. - rpc UpdateSavedQuery(UpdateSavedQueryRequest) returns (SavedQuery) { - option (google.api.http) = { - patch: "/v1/{saved_query.name=*/*/savedQueries/*}" - body: "saved_query" - }; - option (google.api.method_signature) = "saved_query,update_mask"; - } - - // Deletes a saved query. - rpc DeleteSavedQuery(DeleteSavedQueryRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=*/*/savedQueries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets effective IAM policies for a batch of resources. - rpc BatchGetEffectiveIamPolicies(BatchGetEffectiveIamPoliciesRequest) - returns (BatchGetEffectiveIamPoliciesResponse) { - option (google.api.http) = { - get: "/v1/{scope=*/*}/effectiveIamPolicies:batchGet" - }; - } -} - -// Represents the metadata of the longrunning operation for the -// AnalyzeIamPolicyLongrunning rpc. -message AnalyzeIamPolicyLongrunningMetadata { - // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Export asset request. -message ExportAssetsRequest { - // Required. The relative name of the root asset. This can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"), - // or a folder number (such as "folders/123"). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/Asset" - } - ]; - - // Timestamp to take an asset snapshot. This can only be set to a timestamp - // between the current time and the current time minus 35 days (inclusive). - // If not specified, the current time will be used. Due to delays in resource - // data collection and indexing, there is a volatile window during which - // running the same query may get different results. - google.protobuf.Timestamp read_time = 2; - - // A list of asset types to take a snapshot for. For example: - // "compute.googleapis.com/Disk". - // - // Regular expressions are also supported. For example: - // - // * "compute.googleapis.com.*" snapshots resources whose asset type starts - // with "compute.googleapis.com". - // * ".*Instance" snapshots resources whose asset type ends with "Instance". - // * ".*Instance.*" snapshots resources whose asset type contains "Instance". - // - // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - // regular expression syntax. If the regular expression does not match any - // supported asset type, an INVALID_ARGUMENT error will be returned. - // - // If specified, only matching assets will be returned, otherwise, it will - // snapshot all asset types. See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) - // for all supported asset types. - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name will be - // returned. - ContentType content_type = 4; - - // Required. Output configuration indicating where the results will be output - // to. - OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; - - // A list of relationship types to export, for example: - // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - // content_type=RELATIONSHIP. - // * If specified: - // it snapshots specified relationships. It returns an error if - // any of the [relationship_types] doesn't belong to the supported - // relationship types of the [asset_types] or if any of the [asset_types] - // doesn't belong to the source types of the [relationship_types]. - // * Otherwise: - // it snapshots the supported relationships for all [asset_types] or returns - // an error if any of the [asset_types] has no relationship support. - // An unspecified asset types field means all supported asset_types. - // See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - // supported asset types and relationship types. - repeated string relationship_types = 6; -} - -// The export asset response. This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] -// method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] -// field. -message ExportAssetsResponse { - // Time the snapshot was taken. - google.protobuf.Timestamp read_time = 1; - - // Output configuration indicating where the results were output to. - OutputConfig output_config = 2; - - // Output result indicating where the assets were exported to. For example, a - // set of actual Google Cloud Storage object uris where the assets are - // exported to. The uris can be different from what [output_config] has - // specified, as the service will split the output object into multiple ones - // once it exceeds a single Google Cloud Storage object limit. - OutputResult output_result = 3; -} - -// ListAssets request. -message ListAssetsRequest { - // Required. Name of the organization, folder, or project the assets belong - // to. Format: "organizations/[organization-number]" (such as - // "organizations/123"), "projects/[project-id]" (such as - // "projects/my-project-id"), "projects/[project-number]" (such as - // "projects/12345"), or "folders/[folder-number]" (such as "folders/12345"). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/Asset" - } - ]; - - // Timestamp to take an asset snapshot. This can only be set to a timestamp - // between the current time and the current time minus 35 days (inclusive). - // If not specified, the current time will be used. Due to delays in resource - // data collection and indexing, there is a volatile window during which - // running the same query may get different results. - google.protobuf.Timestamp read_time = 2; - - // A list of asset types to take a snapshot for. For example: - // "compute.googleapis.com/Disk". - // - // Regular expression is also supported. For example: - // - // * "compute.googleapis.com.*" snapshots resources whose asset type starts - // with "compute.googleapis.com". - // * ".*Instance" snapshots resources whose asset type ends with "Instance". - // * ".*Instance.*" snapshots resources whose asset type contains "Instance". - // - // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - // regular expression syntax. If the regular expression does not match any - // supported asset type, an INVALID_ARGUMENT error will be returned. - // - // If specified, only matching assets will be returned, otherwise, it will - // snapshot all asset types. See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) - // for all supported asset types. - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name will - // be returned. - ContentType content_type = 4; - - // The maximum number of assets to be returned in a single response. Default - // is 100, minimum is 1, and maximum is 1000. - int32 page_size = 5; - - // The `next_page_token` returned from the previous `ListAssetsResponse`, or - // unspecified for the first `ListAssetsRequest`. It is a continuation of a - // prior `ListAssets` call, and the API should return the next page of assets. - string page_token = 6; - - // A list of relationship types to output, for example: - // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - // content_type=RELATIONSHIP. - // * If specified: - // it snapshots specified relationships. It returns an error if - // any of the [relationship_types] doesn't belong to the supported - // relationship types of the [asset_types] or if any of the [asset_types] - // doesn't belong to the source types of the [relationship_types]. - // * Otherwise: - // it snapshots the supported relationships for all [asset_types] or returns - // an error if any of the [asset_types] has no relationship support. - // An unspecified asset types field means all supported asset_types. - // See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) - // for all supported asset types and relationship types. - repeated string relationship_types = 7; -} - -// ListAssets response. -message ListAssetsResponse { - // Time the snapshot was taken. - google.protobuf.Timestamp read_time = 1; - - // Assets. - repeated Asset assets = 2; - - // Token to retrieve the next page of results. It expires 72 hours after the - // page token for the first page is generated. Set to empty if there are no - // remaining results. - string next_page_token = 3; -} - -// Batch get assets history request. -message BatchGetAssetsHistoryRequest { - // Required. The relative name of the root asset. It can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id")", or a project number (such as "projects/12345"). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/Asset" - } - ]; - - // A list of the full names of the assets. - // See: https://cloud.google.com/asset-inventory/docs/resource-name-format - // Example: - // - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // - // The request becomes a no-op if the asset name list is empty, and the max - // size of the asset name list is 100 in one request. - repeated string asset_names = 2; - - // Optional. The content type. - ContentType content_type = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The time window for the asset history. Both start_time and - // end_time are optional and if set, it must be after the current time minus - // 35 days. If end_time is not set, it is default to current timestamp. - // If start_time is not set, the snapshot of the assets at end_time will be - // returned. The returned results contain all temporal assets whose time - // window overlap with read_time_window. - TimeWindow read_time_window = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of relationship types to output, for example: - // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - // content_type=RELATIONSHIP. - // * If specified: - // it outputs specified relationships' history on the [asset_names]. It - // returns an error if any of the [relationship_types] doesn't belong to the - // supported relationship types of the [asset_names] or if any of the - // [asset_names]'s types doesn't belong to the source types of the - // [relationship_types]. - // * Otherwise: - // it outputs the supported relationships' history on the [asset_names] or - // returns an error if any of the [asset_names]'s types has no relationship - // support. - // See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - // supported asset types and relationship types. - repeated string relationship_types = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Batch get assets history response. -message BatchGetAssetsHistoryResponse { - // A list of assets with valid time windows. - repeated TemporalAsset assets = 1; -} - -// Create asset feed request. -message CreateFeedRequest { - // Required. The name of the project/folder/organization where this feed - // should be created in. It can only be an organization number (such as - // "organizations/123"), a folder number (such as "folders/123"), a project ID - // (such as "projects/my-project-id")", or a project number (such as - // "projects/12345"). - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. This is the client-assigned asset feed identifier and it needs to - // be unique under a specific parent project/folder/organization. - string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The feed details. The field `name` must be empty and it will be - // generated in the format of: projects/project_number/feeds/feed_id - // folders/folder_number/feeds/feed_id - // organizations/organization_number/feeds/feed_id - Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Get asset feed request. -message GetFeedRequest { - // Required. The name of the Feed and it must be in the format of: - // projects/project_number/feeds/feed_id - // folders/folder_number/feeds/feed_id - // organizations/organization_number/feeds/feed_id - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "cloudasset.googleapis.com/Feed" } - ]; -} - -// List asset feeds request. -message ListFeedsRequest { - // Required. The parent project/folder/organization whose feeds are to be - // listed. It can only be using project/folder/organization number (such as - // "folders/12345")", or a project ID (such as "projects/my-project-id"). - string parent = 1 [(google.api.field_behavior) = REQUIRED]; -} - -message ListFeedsResponse { - // A list of feeds. - repeated Feed feeds = 1; -} - -// Update asset feed request. -message UpdateFeedRequest { - // Required. The new values of feed details. It must match an existing feed - // and the field `name` must be in the format of: - // projects/project_number/feeds/feed_id or - // folders/folder_number/feeds/feed_id or - // organizations/organization_number/feeds/feed_id. - Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Only updates the `feed` fields indicated by this mask. - // The field mask must not be empty, and it must not contain fields that - // are immutable or only set by the server. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -message DeleteFeedRequest { - // Required. The name of the feed and it must be in the format of: - // projects/project_number/feeds/feed_id - // folders/folder_number/feeds/feed_id - // organizations/organization_number/feeds/feed_id - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "cloudasset.googleapis.com/Feed" } - ]; -} - -// Output configuration for export assets destination. -message OutputConfig { - // Asset export destination. - oneof destination { - // Destination on Cloud Storage. - GcsDestination gcs_destination = 1; - - // Destination on BigQuery. The output table stores the fields in asset - // Protobuf as columns in BigQuery. - BigQueryDestination bigquery_destination = 2; - } -} - -// Output result of export assets. -message OutputResult { - // Asset export result. - oneof result { - // Export result on Cloud Storage. - GcsOutputResult gcs_result = 1; - } -} - -// A Cloud Storage output result. -message GcsOutputResult { - // List of uris of the Cloud Storage objects. Example: - // "gs://bucket_name/object_name". - repeated string uris = 1; -} - -// A Cloud Storage location. -message GcsDestination { - // Required. - oneof object_uri { - // The uri of the Cloud Storage object. It's the same uri that is used by - // gsutil. Example: "gs://bucket_name/object_name". See [Viewing and - // Editing Object - // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - // for more information. - // - // If the specified Cloud Storage object already exists and there is no - // [hold](https://cloud.google.com/storage/docs/object-holds), it will be - // overwritten with the exported result. - string uri = 1; - - // The uri prefix of all generated Cloud Storage objects. Example: - // "gs://bucket_name/object_name_prefix". Each object uri is in format: - // "gs://bucket_name/object_name_prefix// and only - // contains assets for that type. starts from 0. Example: - // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is - // the first shard of output objects containing all - // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be - // returned if file with the same name "gs://bucket_name/object_name_prefix" - // already exists. - string uri_prefix = 2; - } -} - -// A BigQuery destination for exporting assets to. -message BigQueryDestination { - // Required. The BigQuery dataset in format - // "projects/projectId/datasets/datasetId", to which the snapshot result - // should be exported. If this dataset does not exist, the export call returns - // an INVALID_ARGUMENT error. Setting the `contentType` for `exportAssets` - // determines the - // [schema](/asset-inventory/docs/exporting-to-bigquery#bigquery-schema) - // of the BigQuery table. Setting `separateTablesPerAssetType` to `TRUE` also - // influences the schema. - string dataset = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The BigQuery table to which the snapshot result should be - // written. If this table does not exist, a new table with the given name - // will be created. - string table = 2 [(google.api.field_behavior) = REQUIRED]; - - // If the destination table already exists and this flag is `TRUE`, the - // table will be overwritten by the contents of assets snapshot. If the flag - // is `FALSE` or unset and the destination table already exists, the export - // call returns an INVALID_ARGUMEMT error. - bool force = 3; - - // [partition_spec] determines whether to export to partitioned table(s) and - // how to partition the data. - // - // If [partition_spec] is unset or [partition_spec.partition_key] is unset or - // `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to - // non-partitioned table(s). [force] will decide whether to overwrite existing - // table(s). - // - // If [partition_spec] is specified. First, the snapshot results will be - // written to partitioned table(s) with two additional timestamp columns, - // readTime and requestTime, one of which will be the partition key. Secondly, - // in the case when any destination table already exists, it will first try to - // update existing table's schema as necessary by appending additional - // columns. Then, if [force] is `TRUE`, the corresponding partition will be - // overwritten by the snapshot results (data in different partitions will - // remain intact); if [force] is unset or `FALSE`, it will append the data. An - // error will be returned if the schema update or data appension fails. - PartitionSpec partition_spec = 4; - - // If this flag is `TRUE`, the snapshot results will be written to one or - // multiple tables, each of which contains results of one asset type. The - // [force] and [partition_spec] fields will apply to each of them. - // - // Field [table] will be concatenated with "_" and the asset type names (see - // https://cloud.google.com/asset-inventory/docs/supported-asset-types for - // supported asset types) to construct per-asset-type table names, in which - // all non-alphanumeric characters like "." and "/" will be substituted by - // "_". Example: if field [table] is "mytable" and snapshot results - // contain "storage.googleapis.com/Bucket" assets, the corresponding table - // name will be "mytable_storage_googleapis_com_Bucket". If any of these - // tables does not exist, a new table with the concatenated name will be - // created. - // - // When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of - // each table will include RECORD-type columns mapped to the nested fields in - // the Asset.resource.data field of that asset type (up to the 15 nested level - // BigQuery supports - // (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The - // fields in >15 nested levels will be stored in JSON format string as a child - // column of its parent RECORD column. - // - // If error occurs when exporting to any table, the whole export call will - // return an error but the export results that already succeed will persist. - // Example: if exporting to table_type_A succeeds when exporting to - // table_type_B fails during one export call, the results in table_type_A will - // persist and there will not be partial results persisting in a table. - bool separate_tables_per_asset_type = 5; -} - -// Specifications of BigQuery partitioned table as export destination. -message PartitionSpec { - // This enum is used to determine the partition key column when exporting - // assets to BigQuery partitioned table(s). Note that, if the partition key is - // a timestamp column, the actual partition is based on its date value - // (expressed in UTC. see details in - // https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables). - enum PartitionKey { - // Unspecified partition key. If used, it means using non-partitioned table. - PARTITION_KEY_UNSPECIFIED = 0; - - // The time when the snapshot is taken. If specified as partition key, the - // result table(s) is partitoned by the additional timestamp column, - // readTime. If [read_time] in ExportAssetsRequest is specified, the - // readTime column's value will be the same as it. Otherwise, its value will - // be the current time that is used to take the snapshot. - READ_TIME = 1; - - // The time when the request is received and started to be processed. If - // specified as partition key, the result table(s) is partitoned by the - // requestTime column, an additional timestamp column representing when the - // request was received. - REQUEST_TIME = 2; - } - - // The partition key for BigQuery partitioned table. - PartitionKey partition_key = 1; -} - -// A Pub/Sub destination. -message PubsubDestination { - // The name of the Pub/Sub topic to publish to. - // Example: `projects/PROJECT_ID/topics/TOPIC_ID`. - string topic = 1; -} - -// Output configuration for asset feed destination. -message FeedOutputConfig { - // Asset feed destination. - oneof destination { - // Destination on Pub/Sub. - PubsubDestination pubsub_destination = 1; - } -} - -// An asset feed used to export asset updates to a destinations. -// An asset feed filter controls what updates are exported. -// The asset feed must be created within a project, organization, or -// folder. Supported destinations are: -// Pub/Sub topics. -message Feed { - option (google.api.resource) = { - type: "cloudasset.googleapis.com/Feed" - pattern: "projects/{project}/feeds/{feed}" - pattern: "folders/{folder}/feeds/{feed}" - pattern: "organizations/{organization}/feeds/{feed}" - history: ORIGINALLY_SINGLE_PATTERN - }; - - // Required. The format will be - // projects/{project_number}/feeds/{client-assigned_feed_identifier} or - // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or - // organizations/{organization_number}/feeds/{client-assigned_feed_identifier} - // - // The client-assigned feed identifier must be unique within the parent - // project/folder/organization. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // A list of the full names of the assets to receive updates. You must specify - // either or both of asset_names and asset_types. Only asset updates matching - // specified asset_names or asset_types are exported to the feed. - // Example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // For a list of the full names for supported asset types, see [Resource - // name format](/asset-inventory/docs/resource-name-format). - repeated string asset_names = 2; - - // A list of types of the assets to receive updates. You must specify either - // or both of asset_names and asset_types. Only asset updates matching - // specified asset_names or asset_types are exported to the feed. - // Example: `"compute.googleapis.com/Disk"` - // - // For a list of all supported asset types, see - // [Supported asset types](/asset-inventory/docs/supported-asset-types). - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name and - // type will be returned. - ContentType content_type = 4; - - // Required. Feed output configuration defining where the asset updates are - // published to. - FeedOutputConfig feed_output_config = 5 - [(google.api.field_behavior) = REQUIRED]; - - // A condition which determines whether an asset update should be published. - // If specified, an asset will be returned only when the expression evaluates - // to true. - // When set, `expression` field in the `Expr` must be a valid [CEL expression] - // (https://github.com/google/cel-spec) on a TemporalAsset with name - // `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted - // == true") will only publish Asset deletions. Other fields of `Expr` are - // optional. - // - // See our [user - // guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition) - // for detailed instructions. - google.type.Expr condition = 6; - - // A list of relationship types to output, for example: - // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - // content_type=RELATIONSHIP. - // * If specified: - // it outputs specified relationship updates on the [asset_names] or the - // [asset_types]. It returns an error if any of the [relationship_types] - // doesn't belong to the supported relationship types of the [asset_names] or - // [asset_types], or any of the [asset_names] or the [asset_types] doesn't - // belong to the source types of the [relationship_types]. - // * Otherwise: - // it outputs the supported relationships of the types of [asset_names] and - // [asset_types] or returns an error if any of the [asset_names] or the - // [asset_types] has no replationship support. - // See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) - // for all supported asset types and relationship types. - repeated string relationship_types = 7; -} - -// Search all resources request. -message SearchAllResourcesRequest { - // Required. A scope can be a project, a folder, or an organization. The - // search is limited to the resources within the `scope`. The caller must be - // granted the - // [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - // permission on the desired scope. - // - // The allowed values are: - // - // * projects/{PROJECT_ID} (e.g., "projects/foo-bar") - // * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - // * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - // * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - string scope = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The query statement. See [how to construct a - // query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) - // for more information. If not specified or empty, it will search all the - // resources within the specified `scope`. - // - // Examples: - // - // * `name:Important` to find Cloud resources whose name contains - // "Important" as a word. - // * `name=Important` to find the Cloud resource whose name is exactly - // "Important". - // * `displayName:Impor*` to find Cloud resources whose display name - // contains "Impor" as a prefix of any word in the field. - // * `location:us-west*` to find Cloud resources whose location contains both - // "us" and "west" as prefixes. - // * `labels:prod` to find Cloud resources whose labels contain "prod" as - // a key or value. - // * `labels.env:prod` to find Cloud resources that have a label "env" - // and its value is "prod". - // * `labels.env:*` to find Cloud resources that have a label "env". - // * `kmsKey:key` to find Cloud resources encrypted with a customer-managed - // encryption key whose name contains the word "key". - // * `relationships:instance-group-1` to find Cloud resources that have - // relationships with "instance-group-1" in the related resource name. - // * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that - // have relationships of type "INSTANCE_TO_INSTANCEGROUP". - // * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find - // compute instances that have relationships with "instance-group-1" in the - // compute instance group resource name, for relationship type - // "INSTANCE_TO_INSTANCEGROUP". - // * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a - // word. - // * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain - // "ACTIVE" as a word. - // * `createTime<1609459200` to find Cloud resources that were created before - // "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of - // "2021-01-01 00:00:00 UTC" in seconds. - // * `updateTime>1609459200` to find Cloud resources that were updated after - // "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of - // "2021-01-01 00:00:00 UTC" in seconds. - // * `Important` to find Cloud resources that contain "Important" as a word - // in any of the searchable fields. - // * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any - // word in any of the searchable fields. - // * `Important location:(us-west1 OR global)` to find Cloud - // resources that contain "Important" as a word in any of the searchable - // fields and are also located in the "us-west1" region or the "global" - // location. - string query = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of asset types that this request searches for. If empty, - // it will search all the [searchable asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). - // - // Regular expressions are also supported. For example: - // - // * "compute.googleapis.com.*" snapshots resources whose asset type starts - // with "compute.googleapis.com". - // * ".*Instance" snapshots resources whose asset type ends with "Instance". - // * ".*Instance.*" snapshots resources whose asset type contains "Instance". - // - // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - // regular expression syntax. If the regular expression does not match any - // supported asset type, an INVALID_ARGUMENT error will be returned. - repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page size for search result pagination. Page size is capped - // at 500 even if a larger value is given. If set to zero, server will pick an - // appropriate default. Returned results may be fewer than requested. When - // this happens, there could be more results as long as `next_page_token` is - // returned. - int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If present, then retrieve the next batch of results from the - // preceding call to this method. `page_token` must be the value of - // `next_page_token` from the previous response. The values of all other - // method parameters, must be identical to those in the previous call. - string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A comma-separated list of fields specifying the sorting order of - // the results. The default order is ascending. Add " DESC" after the field - // name to indicate descending order. Redundant space characters are ignored. - // Example: "location DESC, name". - // Only singular primitive fields in the response are sortable: - // - // * name - // * assetType - // * project - // * displayName - // * description - // * location - // * kmsKey - // * createTime - // * updateTime - // * state - // * parentFullResourceName - // * parentAssetType - // - // All the other fields such as repeated fields (e.g., `networkTags`), map - // fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`) - // are not supported. - string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A comma-separated list of fields specifying which fields to be - // returned in ResourceSearchResult. Only '*' or combination of top level - // fields can be specified. Field names of both snake_case and camelCase are - // supported. Examples: `"*"`, `"name,location"`, `"name,versionedResources"`. - // - // The read_mask paths must be valid field paths listed but not limited to - // (both snake_case and camelCase are supported): - // - // * name - // * assetType - // * project - // * displayName - // * description - // * location - // * tagKeys - // * tagValues - // * tagValueIds - // * labels - // * networkTags - // * kmsKey - // * createTime - // * updateTime - // * state - // * additionalAttributes - // * versionedResources - // - // If read_mask is not specified, all fields except versionedResources will - // be returned. - // If only '*' is specified, all fields including versionedResources will be - // returned. - // Any invalid field path will trigger INVALID_ARGUMENT error. - google.protobuf.FieldMask read_mask = 8 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Search all resources response. -message SearchAllResourcesResponse { - // A list of Resources that match the search query. It contains the resource - // standard metadata information. - repeated ResourceSearchResult results = 1; - - // If there are more results than those appearing in this response, then - // `next_page_token` is included. To get the next set of results, call this - // method again using the value of `next_page_token` as `page_token`. - string next_page_token = 2; -} - -// Search all IAM policies request. -message SearchAllIamPoliciesRequest { - // Required. A scope can be a project, a folder, or an organization. The - // search is limited to the IAM policies within the `scope`. The caller must - // be granted the - // [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) - // permission on the desired scope. - // - // The allowed values are: - // - // * projects/{PROJECT_ID} (e.g., "projects/foo-bar") - // * projects/{PROJECT_NUMBER} (e.g., "projects/12345678") - // * folders/{FOLDER_NUMBER} (e.g., "folders/1234567") - // * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456") - string scope = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The query statement. See [how to construct a - // query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) - // for more information. If not specified or empty, it will search all the - // IAM policies within the specified `scope`. Note that the query string is - // compared against each Cloud IAM policy binding, including its principals, - // roles, and Cloud IAM conditions. The returned Cloud IAM policies will only - // contain the bindings that match your query. To learn more about the IAM - // policy structure, see the [IAM policy - // documentation](https://cloud.google.com/iam/help/allow-policies/structure). - // - // Examples: - // - // * `policy:amy@gmail.com` to find IAM policy bindings that specify user - // "amy@gmail.com". - // * `policy:roles/compute.admin` to find IAM policy bindings that specify - // the Compute Admin role. - // * `policy:comp*` to find IAM policy bindings that contain "comp" as a - // prefix of any word in the binding. - // * `policy.role.permissions:storage.buckets.update` to find IAM policy - // bindings that specify a role containing "storage.buckets.update" - // permission. Note that if callers don't have `iam.roles.get` access to a - // role's included permissions, policy bindings that specify this role will - // be dropped from the search results. - // * `policy.role.permissions:upd*` to find IAM policy bindings that specify a - // role containing "upd" as a prefix of any word in the role permission. - // Note that if callers don't have `iam.roles.get` access to a role's - // included permissions, policy bindings that specify this role will be - // dropped from the search results. - // * `resource:organizations/123456` to find IAM policy bindings - // that are set on "organizations/123456". - // * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to - // find IAM policy bindings that are set on the project named "myproject". - // * `Important` to find IAM policy bindings that contain "Important" as a - // word in any of the searchable fields (except for the included - // permissions). - // * `resource:(instance1 OR instance2) policy:amy` to find - // IAM policy bindings that are set on resources "instance1" or - // "instance2" and also specify user "amy". - // * `roles:roles/compute.admin` to find IAM policy bindings that specify the - // Compute Admin role. - // * `memberTypes:user` to find IAM policy bindings that contain the - // principal type "user". - string query = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page size for search result pagination. Page size is capped - // at 500 even if a larger value is given. If set to zero, server will pick an - // appropriate default. Returned results may be fewer than requested. When - // this happens, there could be more results as long as `next_page_token` is - // returned. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If present, retrieve the next batch of results from the preceding - // call to this method. `page_token` must be the value of `next_page_token` - // from the previous response. The values of all other method parameters must - // be identical to those in the previous call. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of asset types that the IAM policies are attached to. If - // empty, it will search the IAM policies that are attached to all the - // [searchable asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). - // - // Regular expressions are also supported. For example: - // - // * "compute.googleapis.com.*" snapshots IAM policies attached to asset type - // starts with "compute.googleapis.com". - // * ".*Instance" snapshots IAM policies attached to asset type ends with - // "Instance". - // * ".*Instance.*" snapshots IAM policies attached to asset type contains - // "Instance". - // - // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - // regular expression syntax. If the regular expression does not match any - // supported asset type, an INVALID_ARGUMENT error will be returned. - repeated string asset_types = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A comma-separated list of fields specifying the sorting order of - // the results. The default order is ascending. Add " DESC" after the field - // name to indicate descending order. Redundant space characters are ignored. - // Example: "assetType DESC, resource". - // Only singular primitive fields in the response are sortable: - // * resource - // * assetType - // * project - // All the other fields such as repeated fields (e.g., `folders`) and - // non-primitive fields (e.g., `policy`) are not supported. - string order_by = 7 [(google.api.field_behavior) = OPTIONAL]; -} - -// Search all IAM policies response. -message SearchAllIamPoliciesResponse { - // A list of IamPolicy that match the search query. Related information such - // as the associated resource is returned along with the policy. - repeated IamPolicySearchResult results = 1; - - // Set if there are more results than those appearing in this response; to get - // the next set of results, call this method again, using this value as the - // `page_token`. - string next_page_token = 2; -} - -// IAM policy analysis query message. -message IamPolicyAnalysisQuery { - // Specifies the resource to analyze for access policies, which may be set - // directly on the resource, or on ancestors such as organizations, folders or - // projects. - message ResourceSelector { - // Required. The [full resource name] - // (https://cloud.google.com/asset-inventory/docs/resource-name-format) - // of a resource of [supported resource - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). - string full_resource_name = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Specifies an identity for which to determine resource access, based on - // roles assigned either directly to them or to the groups they belong to, - // directly or indirectly. - message IdentitySelector { - // Required. The identity appear in the form of principals in - // [IAM policy - // binding](https://cloud.google.com/iam/reference/rest/v1/Binding). - // - // The examples of supported forms are: - // "user:mike@example.com", - // "group:admins@example.com", - // "domain:google.com", - // "serviceAccount:my-project-id@appspot.gserviceaccount.com". - // - // Notice that wildcard characters (such as * and ?) are not supported. - // You must give a specific identity. - string identity = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Specifies roles and/or permissions to analyze, to determine both the - // identities possessing them and the resources they control. If multiple - // values are specified, results will include roles or permissions matching - // any of them. The total number of roles and permissions should be equal or - // less than 10. - message AccessSelector { - // Optional. The roles to appear in result. - repeated string roles = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The permissions to appear in result. - repeated string permissions = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Contains query options. - message Options { - // Optional. If true, the identities section of the result will expand any - // Google groups appearing in an IAM policy binding. - // - // If - // [IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] - // is specified, the identity in the result will be determined by the - // selector, and this flag is not allowed to set. - // - // If true, the default max expansion per group is 1000 for - // AssetService.AnalyzeIamPolicy][]. - // - // Default is false. - bool expand_groups = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true, the access section of result will expand any roles - // appearing in IAM policy bindings to include their permissions. - // - // If - // [IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] - // is specified, the access section of the result will be determined by the - // selector, and this flag is not allowed to set. - // - // Default is false. - bool expand_roles = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true and - // [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] - // is not specified, the resource section of the result will expand any - // resource attached to an IAM policy to include resources lower in the - // resource hierarchy. - // - // For example, if the request analyzes for which resources user A has - // permission P, and the results include an IAM policy with P on a GCP - // folder, the results will also include resources in that folder with - // permission P. - // - // If true and - // [IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] - // is specified, the resource section of the result will expand the - // specified resource to include resources lower in the resource hierarchy. - // Only project or lower resources are supported. Folder and organization - // resource cannot be used together with this option. - // - // For example, if the request analyzes for which users have permission P on - // a GCP project with this option enabled, the results will include all - // users who have permission P on that project or any lower resource. - // - // If true, the default max expansion per resource is 1000 for - // AssetService.AnalyzeIamPolicy][] and 100000 for - // AssetService.AnalyzeIamPolicyLongrunning][]. - // - // Default is false. - bool expand_resources = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true, the result will output the relevant parent/child - // relationships between resources. Default is false. - bool output_resource_edges = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true, the result will output the relevant membership - // relationships between groups and other groups, and between groups and - // principals. Default is false. - bool output_group_edges = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true, the response will include access analysis from - // identities to resources via service account impersonation. This is a very - // expensive operation, because many derived queries will be executed. We - // highly recommend you use - // [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] - // rpc instead. - // - // For example, if the request analyzes for which resources user A has - // permission P, and there's an IAM policy states user A has - // iam.serviceAccounts.getAccessToken permission to a service account SA, - // and there's another IAM policy states service account SA has permission P - // to a GCP folder F, then user A potentially has access to the GCP folder - // F. And those advanced analysis results will be included in - // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. - // - // Another example, if the request analyzes for who has - // permission P to a GCP folder F, and there's an IAM policy states user A - // has iam.serviceAccounts.actAs permission to a service account SA, and - // there's another IAM policy states service account SA has permission P to - // the GCP folder F, then user A potentially has access to the GCP folder - // F. And those advanced analysis results will be included in - // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. - // - // Only the following permissions are considered in this analysis: - // - // * `iam.serviceAccounts.actAs` - // * `iam.serviceAccounts.signBlob` - // * `iam.serviceAccounts.signJwt` - // * `iam.serviceAccounts.getAccessToken` - // * `iam.serviceAccounts.getOpenIdToken` - // * `iam.serviceAccounts.implicitDelegation` - // - // Default is false. - bool analyze_service_account_impersonation = 6 - [(google.api.field_behavior) = OPTIONAL]; - } - - // The IAM conditions context. - message ConditionContext { - // The IAM conditions time context. - oneof TimeContext { - // The hypothetical access timestamp to evaluate IAM conditions. Note that - // this value must not be earlier than the current time; otherwise, an - // INVALID_ARGUMENT error will be returned. - google.protobuf.Timestamp access_time = 1; - } - } - - // Required. The relative name of the root asset. Only resources and IAM - // policies within the scope will be analyzed. - // - // This can only be an organization number (such as "organizations/123"), a - // folder number (such as "folders/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"). - // - // To know how to get organization id, visit [here - // ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - // - // To know how to get folder or project id, visit [here - // ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). - string scope = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Specifies a resource for analysis. - ResourceSelector resource_selector = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies an identity for analysis. - IdentitySelector identity_selector = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies roles or permissions for analysis. This is optional. - AccessSelector access_selector = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The query options. - Options options = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The hypothetical context for IAM conditions evaluation. - ConditionContext condition_context = 6 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A request message for -// [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. -message AnalyzeIamPolicyRequest { - // Required. The request query. - IamPolicyAnalysisQuery analysis_query = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The name of a saved query, which must be in the format of: - // - // * projects/project_number/savedQueries/saved_query_id - // * folders/folder_number/savedQueries/saved_query_id - // * organizations/organization_number/savedQueries/saved_query_id - // - // If both `analysis_query` and `saved_analysis_query` are provided, they - // will be merged together with the `saved_analysis_query` as base and - // the `analysis_query` as overrides. For more details of the merge behavior, - // please refer to the - // [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - // page. - // - // Note that you cannot override primitive fields with default value, such as - // 0 or empty string, etc., because we use proto3, which doesn't support field - // presence yet. - string saved_analysis_query = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Amount of time executable has to complete. See JSON - // representation of - // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). - // - // If this field is set with a value less than the RPC deadline, and the - // execution of your query hasn't finished in the specified - // execution timeout, you will get a response with partial result. - // Otherwise, your query's execution will continue until the RPC deadline. - // If it's not finished until then, you will get a DEADLINE_EXCEEDED error. - // - // Default is empty. - google.protobuf.Duration execution_timeout = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A response message for -// [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. -message AnalyzeIamPolicyResponse { - // An analysis message to group the query and results. - message IamPolicyAnalysis { - // The analysis query. - IamPolicyAnalysisQuery analysis_query = 1; - - // A list of - // [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult] - // that matches the analysis query, or empty if no result is found. - repeated IamPolicyAnalysisResult analysis_results = 2; - - // Represents whether all entries in the - // [analysis_results][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] - // have been fully explored to answer the query. - bool fully_explored = 3; - - // A list of non-critical errors happened during the query handling. - repeated IamPolicyAnalysisState non_critical_errors = 5; - } - - // The main analysis that matches the original request. - IamPolicyAnalysis main_analysis = 1; - - // The service account impersonation analysis if - // [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is - // enabled. - repeated IamPolicyAnalysis service_account_impersonation_analysis = 2; - - // Represents whether all entries in the - // [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] - // and - // [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] - // have been fully explored to answer the query in the request. - bool fully_explored = 3; -} - -// Output configuration for export IAM policy analysis destination. -message IamPolicyAnalysisOutputConfig { - // A Cloud Storage location. - message GcsDestination { - // Required. The uri of the Cloud Storage object. It's the same uri that is - // used by gsutil. Example: "gs://bucket_name/object_name". See [Viewing and - // Editing Object - // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - // for more information. - // - // If the specified Cloud Storage object already exists and there is no - // [hold](https://cloud.google.com/storage/docs/object-holds), it will be - // overwritten with the analysis result. - string uri = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // A BigQuery destination. - message BigQueryDestination { - // This enum determines the partition key column for the bigquery tables. - // Partitioning can improve query performance and reduce query cost by - // filtering partitions. Refer to - // https://cloud.google.com/bigquery/docs/partitioned-tables for details. - enum PartitionKey { - // Unspecified partition key. Tables won't be partitioned using this - // option. - PARTITION_KEY_UNSPECIFIED = 0; - - // The time when the request is received. If specified as partition key, - // the result table(s) is partitoned by the RequestTime column, an - // additional timestamp column representing when the request was received. - REQUEST_TIME = 1; - } - - // Required. The BigQuery dataset in format - // "projects/projectId/datasets/datasetId", to which the analysis results - // should be exported. If this dataset does not exist, the export call will - // return an INVALID_ARGUMENT error. - string dataset = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The prefix of the BigQuery tables to which the analysis results - // will be written. Tables will be created based on this table_prefix if not - // exist: - // * _analysis table will contain export operation's metadata. - // * _analysis_result will contain all the - // [IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]. - // When [partition_key] is specified, both tables will be partitioned based - // on the [partition_key]. - string table_prefix = 2 [(google.api.field_behavior) = REQUIRED]; - - // The partition key for BigQuery partitioned table. - PartitionKey partition_key = 3; - - // Optional. Specifies the action that occurs if the destination table or - // partition already exists. The following values are supported: - // - // * WRITE_TRUNCATE: If the table or partition already exists, BigQuery - // overwrites the entire table or all the partitions data. - // * WRITE_APPEND: If the table or partition already exists, BigQuery - // appends the data to the table or the latest partition. - // * WRITE_EMPTY: If the table already exists and contains data, an error is - // returned. - // - // The default value is WRITE_APPEND. Each action is atomic and only occurs - // if BigQuery is able to complete the job successfully. Details are at - // https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file. - string write_disposition = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // IAM policy analysis export destination. - oneof destination { - // Destination on Cloud Storage. - GcsDestination gcs_destination = 1; - - // Destination on BigQuery. - BigQueryDestination bigquery_destination = 2; - } -} - -// A request message for -// [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. -message AnalyzeIamPolicyLongrunningRequest { - // Required. The request query. - IamPolicyAnalysisQuery analysis_query = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The name of a saved query, which must be in the format of: - // - // * projects/project_number/savedQueries/saved_query_id - // * folders/folder_number/savedQueries/saved_query_id - // * organizations/organization_number/savedQueries/saved_query_id - // - // If both `analysis_query` and `saved_analysis_query` are provided, they - // will be merged together with the `saved_analysis_query` as base and - // the `analysis_query` as overrides. For more details of the merge behavior, - // please refer to the - // [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) - // doc. - // - // Note that you cannot override primitive fields with default value, such as - // 0 or empty string, etc., because we use proto3, which doesn't support field - // presence yet. - string saved_analysis_query = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Output configuration indicating where the results will be output - // to. - IamPolicyAnalysisOutputConfig output_config = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// A response message for -// [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. -message AnalyzeIamPolicyLongrunningResponse {} - -// A saved query which can be shared with others or used later. -message SavedQuery { - option (google.api.resource) = { - type: "cloudasset.googleapis.com/SavedQuery" - pattern: "projects/{project}/savedQueries/{saved_query}" - pattern: "folders/{folder}/savedQueries/{saved_query}" - pattern: "organizations/{organization}/savedQueries/{saved_query}" - }; - - // The query content. - message QueryContent { - oneof query_content { - // An IAM Policy Analysis query, which could be used in - // the - // [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy] - // rpc or the - // [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] - // rpc. - IamPolicyAnalysisQuery iam_policy_analysis_query = 1; - } - } - - // The resource name of the saved query. The format must be: - // - // * projects/project_number/savedQueries/saved_query_id - // * folders/folder_number/savedQueries/saved_query_id - // * organizations/organization_number/savedQueries/saved_query_id - string name = 1; - - // The description of this saved query. This value should be fewer than 255 - // characters. - string description = 2; - - // Output only. The create time of this saved query. - google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The account's email address who has created this saved query. - string creator = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update time of this saved query. - google.protobuf.Timestamp last_update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The account's email address who has updated this saved query - // most recently. - string last_updater = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels applied on the resource. - // This value should not contain more than 10 entries. The key and value of - // each entry must be non-empty and fewer than 64 characters. - map labels = 7; - - // The query content. - QueryContent content = 8; -} - -// Request to create a saved query. -message CreateSavedQueryRequest { - // Required. The name of the project/folder/organization where this - // saved_query should be created in. It can only be an organization number - // (such as "organizations/123"), a folder number (such as "folders/123"), a - // project ID (such as "projects/my-project-id")", or a project number (such - // as "projects/12345"). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/SavedQuery" - } - ]; - - // Required. The saved_query details. The `name` field must be empty as it - // will be generated based on the parent and saved_query_id. - SavedQuery saved_query = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID to use for the saved query, which must be unique in the - // specified parent. It will become the final component of the saved query's - // resource name. - // - // This value should be 4-63 characters, and valid characters - // are /[a-z][0-9]-/. - // - // Notice that this field is required in the saved query creation, and the - // `name` field of the `saved_query` will be ignored. - string saved_query_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request to get a saved query. -message GetSavedQueryRequest { - // Required. The name of the saved query and it must be in the format of: - // - // * projects/project_number/savedQueries/saved_query_id - // * folders/folder_number/savedQueries/saved_query_id - // * organizations/organization_number/savedQueries/saved_query_id - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudasset.googleapis.com/SavedQuery" - } - ]; -} - -// Request to list saved queries. -message ListSavedQueriesRequest { - // Required. The parent project/folder/organization whose savedQueries are to - // be listed. It can only be using project/folder/organization number (such as - // "folders/12345")", or a project ID (such as "projects/my-project-id"). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/SavedQuery" - } - ]; - - // Optional. The expression to filter resources. - // The expression is a list of zero or more restrictions combined via logical - // operators `AND` and `OR`. When `AND` and `OR` are both used in the - // expression, parentheses must be appropriately used to group the - // combinations. The expression may also contain regular expressions. - // - // See https://google.aip.dev/160 for more information on the grammar. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of saved queries to return per page. The - // service may return fewer than this value. If unspecified, at most 50 will - // be returned. - // The maximum value is 1000; values above 1000 will be coerced to 1000. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListSavedQueries` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListSavedQueries` must - // match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response of listing saved queries. -message ListSavedQueriesResponse { - // A list of savedQueries. - repeated SavedQuery saved_queries = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// Request to update a saved query. -message UpdateSavedQueryRequest { - // Required. The saved query to update. - // - // The saved query's `name` field is used to identify the one to update, - // which has format as below: - // - // * projects/project_number/savedQueries/saved_query_id - // * folders/folder_number/savedQueries/saved_query_id - // * organizations/organization_number/savedQueries/saved_query_id - SavedQuery saved_query = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The list of fields to update. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request to delete a saved query. -message DeleteSavedQueryRequest { - // Required. The name of the saved query to delete. It must be in the format - // of: - // - // * projects/project_number/savedQueries/saved_query_id - // * folders/folder_number/savedQueries/saved_query_id - // * organizations/organization_number/savedQueries/saved_query_id - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudasset.googleapis.com/SavedQuery" - } - ]; -} - -// The request message for performing resource move analysis. -message AnalyzeMoveRequest { - // View enum for supporting partial analysis responses. - enum AnalysisView { - // The default/unset value. - // The API will default to the FULL view. - ANALYSIS_VIEW_UNSPECIFIED = 0; - - // Full analysis including all level of impacts of the specified resource - // move. - FULL = 1; - - // Basic analysis only including blockers which will prevent the specified - // resource move at runtime. - BASIC = 2; - } - - // Required. Name of the resource to perform the analysis against. - // Only GCP Project are supported as of today. Hence, this can only be Project - // ID (such as "projects/my-project-id") or a Project Number (such as - // "projects/12345"). - string resource = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Name of the GCP Folder or Organization to reparent the target - // resource. The analysis will be performed against hypothetically moving the - // resource to this specified desitination parent. This can only be a Folder - // number (such as "folders/123") or an Organization number (such as - // "organizations/123"). - string destination_parent = 2 [(google.api.field_behavior) = REQUIRED]; - - // Analysis view indicating what information should be included in the - // analysis response. If unspecified, the default view is FULL. - AnalysisView view = 3; -} - -// The response message for resource move analysis. -message AnalyzeMoveResponse { - // The list of analyses returned from performing the intended resource move - // analysis. The analysis is grouped by different Cloud services. - repeated MoveAnalysis move_analysis = 1; -} - -// A message to group the analysis information. -message MoveAnalysis { - // The user friendly display name of the analysis. E.g. IAM, Organization - // Policy etc. - string display_name = 1; - - oneof result { - // Analysis result of moving the target resource. - MoveAnalysisResult analysis = 2; - - // Description of error encountered when performing the analysis. - google.rpc.Status error = 3; - } -} - -// An analysis result including blockers and warnings. -message MoveAnalysisResult { - // Blocking information that would prevent the target resource from moving - // to the specified destination at runtime. - repeated MoveImpact blockers = 1; - - // Warning information indicating that moving the target resource to the - // specified destination might be unsafe. This can include important policy - // information and configuration changes, but will not block moves at runtime. - repeated MoveImpact warnings = 2; -} - -// A message to group impacts of moving the target resource. -message MoveImpact { - // User friendly impact detail in a free form message. - string detail = 1; -} - -// Output configuration query assets. -message QueryAssetsOutputConfig { - // BigQuery destination. - message BigQueryDestination { - // Required. The BigQuery dataset where the query results will be saved. It - // has the format of "projects/{projectId}/datasets/{datasetId}". - string dataset = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The BigQuery table where the query results will be saved. If - // this table does not exist, a new table with the given name will be - // created. - string table = 2 [(google.api.field_behavior) = REQUIRED]; - - // Specifies the action that occurs if the destination table or partition - // already exists. The following values are supported: - // - // * WRITE_TRUNCATE: If the table or partition already exists, BigQuery - // overwrites the entire table or all the partitions data. - // * WRITE_APPEND: If the table or partition already exists, BigQuery - // appends the data to the table or the latest partition. - // * WRITE_EMPTY: If the table already exists and contains data, an error is - // returned. - string write_disposition = 3; - } - - // BigQuery destination where the query results will be saved. - BigQueryDestination bigquery_destination = 1; -} - -// QueryAssets request. -message QueryAssetsRequest { - // Required. The relative name of the root asset. This can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"), - // or a folder number (such as "folders/123"). - // - // Only assets belonging to the `parent` will be returned. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/Asset" - } - ]; - - oneof query { - // Optional. A SQL statement that's compatible with [BigQuery Standard - // SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). - string statement = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Reference to the query job, which is from the - // `QueryAssetsResponse` of previous `QueryAssets` call. - string job_reference = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The maximum number of rows to return in the results. Responses - // are limited to 10 MB and 1000 rows. - // - // By default, the maximum row count is 1000. When the byte or row count limit - // is reached, the rest of the query results will be paginated. - // - // The field will be ignored when [output_config] is specified. - int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token received from previous `QueryAssets`. - // - // The field will be ignored when [output_config] is specified. - string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the maximum amount of time that the client is willing - // to wait for the query to complete. By default, this limit is 5 min for the - // first query, and 1 minute for the following queries. If the query is - // complete, the `done` field in the `QueryAssetsResponse` is true, otherwise - // false. - // - // Like BigQuery [jobs.query - // API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) - // The call is not guaranteed to wait for the specified timeout; it typically - // returns after around 200 seconds (200,000 milliseconds), even if the query - // is not complete. - // - // The field will be ignored when [output_config] is specified. - google.protobuf.Duration timeout = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Specifies what time period or point in time to query asset metadata at. - // * unset - query asset metadata as it is right now - // * [read_time_window] - query asset metadata as it was at any point in time - // between [start_time] and [end_time]. - // * [read_time] - query asset metadata as it was at that point in time. - // If data for the timestamp/date range selected does not exist, - // it will simply return a valid response with no rows. - oneof time { - // Optional. [start_time] is required. [start_time] must be less than - // [end_time] Defaults [end_time] to now if [start_time] is set and - // [end_time] isn't. Maximum permitted time range is 7 days. - TimeWindow read_time_window = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Queries cloud assets as they appeared at the specified point in - // time. - google.protobuf.Timestamp read_time = 8 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Destination where the query results will be saved. - // - // When this field is specified, the query results won't be saved in the - // [QueryAssetsResponse.query_result]. Instead - // [QueryAssetsResponse.output_config] will be set. - // - // Meanwhile, [QueryAssetsResponse.job_reference] will be set and can be used - // to check the status of the query job when passed to a following - // [QueryAssets] API call. - QueryAssetsOutputConfig output_config = 9 - [(google.api.field_behavior) = OPTIONAL]; -} - -// QueryAssets response. -message QueryAssetsResponse { - // Reference to a query job. - string job_reference = 1; - - // The query response, which can be either an `error` or a valid `response`. - // - // If `done` == `false` and the query result is being saved in a output, the - // output_config field will be set. - // If `done` == `true`, exactly one of - // `error`, `query_result` or `output_config` will be set. - bool done = 2; - - oneof response { - // Error status. - google.rpc.Status error = 3; - - // Result of the query. - QueryResult query_result = 4; - - // Output configuration which indicates instead of being returned in API - // response on the fly, the query result will be saved in a specific output. - QueryAssetsOutputConfig output_config = 5; - } -} - -// Execution results of the query. -// -// The result is formatted as rows represented by BigQuery compatible [schema]. -// When pagination is necessary, it will contains the page token to retrieve -// the results of following pages. -message QueryResult { - // Each row hold a query result in the format of `Struct`. - repeated google.protobuf.Struct rows = 1; - - // Describes the format of the [rows]. - TableSchema schema = 2; - - // Token to retrieve the next page of the results. - string next_page_token = 3; - - // Total rows of the whole query results. - int64 total_rows = 4; -} - -// BigQuery Compatible table schema. -message TableSchema { - // Describes the fields in a table. - repeated TableFieldSchema fields = 1; -} - -// A field in TableSchema. -message TableFieldSchema { - // The field name. The name must contain only letters (a-z, A-Z), - // numbers (0-9), or underscores (_), and must start with a letter or - // underscore. The maximum length is 128 characters. - string field = 1; - - // The field data type. Possible values include - // * STRING - // * BYTES - // * INTEGER - // * FLOAT - // * BOOLEAN - // * TIMESTAMP - // * DATE - // * TIME - // * DATETIME - // * GEOGRAPHY, - // * NUMERIC, - // * BIGNUMERIC, - // * RECORD - // (where RECORD indicates that the field contains a nested schema). - string type = 2; - - // The field mode. Possible values include NULLABLE, REQUIRED and - // REPEATED. The default value is NULLABLE. - string mode = 3; - - // Describes the nested schema fields if the type property is set - // to RECORD. - repeated TableFieldSchema fields = 4; -} - -// A request message for -// [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. -message BatchGetEffectiveIamPoliciesRequest { - // Required. Only IAM policies on or below the scope will be returned. - // - // This can only be an organization number (such as "organizations/123"), a - // folder number (such as "folders/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"). - // - // To know how to get organization id, visit [here - // ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). - // - // To know how to get folder or project id, visit [here - // ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). - string scope = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { child_type: "*" } - ]; - - // Required. The names refer to the [full_resource_names] - // (https://cloud.google.com/asset-inventory/docs/resource-name-format) - // of [searchable asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). - // A maximum of 20 resources' effective policies can be retrieved in a batch. - repeated string names = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "*" } - ]; -} - -// A response message for -// [AssetService.BatchGetEffectiveIamPolicies][google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies]. -message BatchGetEffectiveIamPoliciesResponse { - // The effective IAM policies on one resource. - message EffectiveIamPolicy { - // The IAM policy and its attached resource. - message PolicyInfo { - // The full resource name the - // [policy][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.policy] - // is directly attached to. - string attached_resource = 1; - - // The IAM policy that's directly attached to the - // [attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource]. - google.iam.v1.Policy policy = 2; - } - - // The [full_resource_name] - // (https://cloud.google.com/asset-inventory/docs/resource-name-format) - // for which the - // [policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies] - // are computed. This is one of the - // [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names] - // the caller provides in the request. - string full_resource_name = 1; - - // The effective policies for the - // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]. - // - // These policies include the policy set on the - // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name] - // and those set on its parents and ancestors up to the - // [BatchGetEffectiveIamPoliciesRequest.scope][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.scope]. - // Note that these policies are not filtered according to the resource type - // of the - // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name]. - // - // These policies are hierarchically ordered by - // [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource] - // starting from - // [full_resource_name][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.full_resource_name] - // itself to its parents and ancestors, such that policies[i]'s - // [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource] - // is the child of policies[i+1]'s - // [PolicyInfo.attached_resource][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.PolicyInfo.attached_resource], - // if policies[i+1] exists. - repeated PolicyInfo policies = 2; - } - - // The effective policies for a batch of resources. Note that the results - // order is the same as the order of - // [BatchGetEffectiveIamPoliciesRequest.names][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest.names]. - // When a resource does not have any effective IAM policies, its corresponding - // policy_result will contain empty - // [EffectiveIamPolicy.policies][google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse.EffectiveIamPolicy.policies]. - repeated EffectiveIamPolicy policy_results = 2; -} - -// Asset content type. -enum ContentType { - // Unspecified content type. - CONTENT_TYPE_UNSPECIFIED = 0; - - // Resource metadata. - RESOURCE = 1; - - // The actual IAM policy set on a resource. - IAM_POLICY = 2; - - // The Cloud Organization Policy set on an asset. - ORG_POLICY = 4; - - // The Cloud Access context manager Policy set on an asset. - ACCESS_POLICY = 5; - - // The runtime OS Inventory information. - OS_INVENTORY = 6; - - // The related resources. - RELATIONSHIP = 7; -} diff --git a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto deleted file mode 100644 index 83a23693ae80..000000000000 --- a/owl-bot-staging/java-asset/v1/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto +++ /dev/null @@ -1,919 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1; - -import "google/api/resource.proto"; -import "google/cloud/orgpolicy/v1/orgpolicy.proto"; -import "google/cloud/osconfig/v1/inventory.proto"; -import "google/iam/v1/policy.proto"; -import "google/identity/accesscontextmanager/v1/access_level.proto"; -import "google/identity/accesscontextmanager/v1/access_policy.proto"; -import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/code.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Asset.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetProto"; -option java_package = "com.google.cloud.asset.v1"; -option php_namespace = "Google\\Cloud\\Asset\\V1"; - -// An asset in Google Cloud and its temporal metadata, including the time window -// when it was observed and its status during that window. -message TemporalAsset { - // State of prior asset. - enum PriorAssetState { - // prior_asset is not applicable for the current asset. - PRIOR_ASSET_STATE_UNSPECIFIED = 0; - - // prior_asset is populated correctly. - PRESENT = 1; - - // Failed to set prior_asset. - INVALID = 2; - - // Current asset is the first known state. - DOES_NOT_EXIST = 3; - - // prior_asset is a deletion. - DELETED = 4; - } - - // The time window when the asset data and state was observed. - TimeWindow window = 1; - - // Whether the asset has been deleted or not. - bool deleted = 2; - - // An asset in Google Cloud. - Asset asset = 3; - - // State of prior_asset. - PriorAssetState prior_asset_state = 4; - - // Prior copy of the asset. Populated if prior_asset_state is PRESENT. - // Currently this is only set for responses in Real-Time Feed. - Asset prior_asset = 5; -} - -// A time window specified by its `start_time` and `end_time`. -message TimeWindow { - // Start time of the time window (exclusive). - google.protobuf.Timestamp start_time = 1; - - // End time of the time window (inclusive). If not specified, the current - // timestamp is used instead. - google.protobuf.Timestamp end_time = 2; -} - -// An asset in Google Cloud. An asset can be any resource in the Google Cloud -// [resource -// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), -// a resource outside the Google Cloud resource hierarchy (such as Google -// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy), -// or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship). -// See [Supported asset -// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) -// for more information. -message Asset { - option (google.api.resource) = { - type: "cloudasset.googleapis.com/Asset" - pattern: "*" - }; - - // The last update timestamp of an asset. update_time is updated when - // create/update/delete operation is performed. - google.protobuf.Timestamp update_time = 11; - - // The full name of the asset. Example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` - // - // See [Resource - // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string name = 1; - - // The type of the asset. Example: `compute.googleapis.com/Disk` - // - // See [Supported asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - // for more information. - string asset_type = 2; - - // A representation of the resource. - Resource resource = 3; - - // A representation of the Cloud IAM policy set on a Google Cloud resource. - // There can be a maximum of one Cloud IAM policy set on any given resource. - // In addition, Cloud IAM policies inherit their granted access scope from any - // policies set on parent resources in the resource hierarchy. Therefore, the - // effectively policy is the union of both the policy set on this resource - // and each policy set on all of the resource's ancestry resource levels in - // the hierarchy. See - // [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance) - // for more information. - google.iam.v1.Policy iam_policy = 4; - - // A representation of an [organization - // policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). - // There can be more than one organization policy with different constraints - // set on a given resource. - repeated google.cloud.orgpolicy.v1.Policy org_policy = 6; - - // A representation of an [access - // policy](https://cloud.google.com/access-context-manager/docs/overview#access-policies). - oneof access_context_policy { - // Please also refer to the [access policy user - // guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). - google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - - // Please also refer to the [access level user - // guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). - google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - - // Please also refer to the [service perimeter user - // guide](https://cloud.google.com/vpc-service-controls/docs/overview). - google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = - 9; - } - - // A representation of runtime OS Inventory information. See [this - // topic](https://cloud.google.com/compute/docs/instances/os-inventory-management) - // for more information. - google.cloud.osconfig.v1.Inventory os_inventory = 12; - - // DEPRECATED. This field only presents for the purpose of - // backward-compatibility. The server will never generate responses with this - // field. - // The related assets of the asset of one relationship type. One asset - // only represents one type of relationship. - RelatedAssets related_assets = 13 [deprecated = true]; - - // One related asset of the current asset. - RelatedAsset related_asset = 15; - - // The ancestry path of an asset in Google Cloud [resource - // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - // represented as a list of relative resource names. An ancestry path starts - // with the closest ancestor in the hierarchy and ends at root. If the asset - // is a project, folder, or organization, the ancestry path starts from the - // asset itself. - // - // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` - repeated string ancestors = 10; -} - -// A representation of a Google Cloud resource. -message Resource { - // The API version. Example: `v1` - string version = 1; - - // The URL of the discovery document containing the resource's JSON schema. - // Example: - // `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` - // - // This value is unspecified for resources that do not have an API based on a - // discovery document, such as Cloud Bigtable. - string discovery_document_uri = 2; - - // The JSON schema name listed in the discovery document. Example: - // `Project` - // - // This value is unspecified for resources that do not have an API based on a - // discovery document, such as Cloud Bigtable. - string discovery_name = 3; - - // The REST URL for accessing the resource. An HTTP `GET` request using this - // URL returns the resource itself. Example: - // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` - // - // This value is unspecified for resources without a REST API. - string resource_url = 4; - - // The full name of the immediate parent of this resource. See - // [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - // - // For Google Cloud assets, this value is the parent resource defined in the - // [Cloud IAM policy - // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). - // Example: - // `//cloudresourcemanager.googleapis.com/projects/my_project_123` - // - // For third-party assets, this field may be set differently. - string parent = 5; - - // The content of the resource, in which some sensitive fields are removed - // and may not be present. - google.protobuf.Struct data = 6; - - // The location of the resource in Google Cloud, such as its zone and region. - // For more information, see https://cloud.google.com/about/locations/. - string location = 8; -} - -// DEPRECATED. This message only presents for the purpose of -// backward-compatibility. The server will never populate this message in -// responses. -// The detailed related assets with the `relationship_type`. -message RelatedAssets { - option deprecated = true; - - // The detailed relationship attributes. - RelationshipAttributes relationship_attributes = 1; - - // The peer resources of the relationship. - repeated RelatedAsset assets = 2; -} - -// DEPRECATED. This message only presents for the purpose of -// backward-compatibility. The server will never populate this message in -// responses. -// The relationship attributes which include `type`, `source_resource_type`, -// `target_resource_type` and `action`. -message RelationshipAttributes { - option deprecated = true; - - // The unique identifier of the relationship type. Example: - // `INSTANCE_TO_INSTANCEGROUP` - string type = 4; - - // The source asset type. Example: `compute.googleapis.com/Instance` - string source_resource_type = 1; - - // The target asset type. Example: `compute.googleapis.com/Disk` - string target_resource_type = 2; - - // The detail of the relationship, e.g. `contains`, `attaches` - string action = 3; -} - -// An asset identifier in Google Cloud which contains its name, type and -// ancestors. An asset can be any resource in the Google Cloud [resource -// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), -// a resource outside the Google Cloud resource hierarchy (such as Google -// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). -// See [Supported asset -// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) -// for more information. -message RelatedAsset { - // The full name of the asset. Example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` - // - // See [Resource - // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string asset = 1 [(google.api.resource_reference) = { - type: "cloudasset.googleapis.com/Asset" - }]; - - // The type of the asset. Example: `compute.googleapis.com/Disk` - // - // See [Supported asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - // for more information. - string asset_type = 2; - - // The ancestors of an asset in Google Cloud [resource - // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - // represented as a list of relative resource names. An ancestry path starts - // with the closest ancestor in the hierarchy and ends at root. - // - // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` - repeated string ancestors = 3; - - // The unique identifier of the relationship type. Example: - // `INSTANCE_TO_INSTANCEGROUP` - string relationship_type = 4; -} - -// A result of Resource Search, containing information of a cloud resource. -// Next ID: 29 -message ResourceSearchResult { - // The full resource name of this resource. Example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Cloud Asset Inventory Resource Name - // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - // for more information. - // - // To search against the `name`: - // - // * use a field query. Example: `name:instance1` - // * use a free text query. Example: `instance1` - string name = 1; - - // The type of this resource. Example: `compute.googleapis.com/Disk`. - // - // To search against the `asset_type`: - // - // * specify the `asset_type` field in your search request. - string asset_type = 2; - - // The project that this resource belongs to, in the form of - // projects/{PROJECT_NUMBER}. This field is available when the resource - // belongs to a project. - // - // To search against `project`: - // - // * use a field query. Example: `project:12345` - // * use a free text query. Example: `12345` - // * specify the `scope` field as this project in your search request. - string project = 3; - - // The folder(s) that this resource belongs to, in the form of - // folders/{FOLDER_NUMBER}. This field is available when the resource - // belongs to one or more folders. - // - // To search against `folders`: - // - // * use a field query. Example: `folders:(123 OR 456)` - // * use a free text query. Example: `123` - // * specify the `scope` field as this folder in your search request. - repeated string folders = 17; - - // The organization that this resource belongs to, in the form of - // organizations/{ORGANIZATION_NUMBER}. This field is available when the - // resource belongs to an organization. - // - // To search against `organization`: - // - // * use a field query. Example: `organization:123` - // * use a free text query. Example: `123` - // * specify the `scope` field as this organization in your search request. - string organization = 18; - - // The display name of this resource. This field is available only when the - // resource's Protobuf contains it. - // - // To search against the `display_name`: - // - // * use a field query. Example: `displayName:"My Instance"` - // * use a free text query. Example: `"My Instance"` - string display_name = 4; - - // One or more paragraphs of text description of this resource. Maximum length - // could be up to 1M bytes. This field is available only when the resource's - // Protobuf contains it. - // - // To search against the `description`: - // - // * use a field query. Example: `description:"important instance"` - // * use a free text query. Example: `"important instance"` - string description = 5; - - // Location can be `global`, regional like `us-east1`, or zonal like - // `us-west1-b`. This field is available only when the resource's Protobuf - // contains it. - // - // To search against the `location`: - // - // * use a field query. Example: `location:us-west*` - // * use a free text query. Example: `us-west*` - string location = 6; - - // Labels associated with this resource. See [Labelling and grouping GCP - // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - // for more information. This field is available only when the resource's - // Protobuf contains it. - // - // To search against the `labels`: - // - // * use a field query: - // - query on any label's key or value. Example: `labels:prod` - // - query by a given label. Example: `labels.env:prod` - // - query by a given label's existence. Example: `labels.env:*` - // * use a free text query. Example: `prod` - map labels = 7; - - // Network tags associated with this resource. Like labels, network tags are a - // type of annotations used to group GCP resources. See [Labelling GCP - // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - // for more information. This field is available only when the resource's - // Protobuf contains it. - // - // To search against the `network_tags`: - // - // * use a field query. Example: `networkTags:internal` - // * use a free text query. Example: `internal` - repeated string network_tags = 8; - - // The Cloud KMS - // [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) - // name or - // [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) - // name. This field is available only when the resource's Protobuf contains - // it. - // - // To search against the `kms_key`: - // - // * use a field query. Example: `kmsKey:key` - // * use a free text query. Example: `key` - string kms_key = 10; - - // The create timestamp of this resource, at which the resource was created. - // The granularity is in seconds. Timestamp.nanos will always be 0. This field - // is available only when the resource's Protobuf contains it. - // - // To search against `create_time`: - // - // * use a field query. - // - value in seconds since unix epoch. Example: `createTime > 1609459200` - // - value in date string. Example: `createTime > 2021-01-01` - // - value in date-time string (must be quoted). Example: `createTime > - // "2021-01-01T00:00:00"` - google.protobuf.Timestamp create_time = 11; - - // The last update timestamp of this resource, at which the resource was last - // modified or deleted. The granularity is in seconds. Timestamp.nanos will - // always be 0. This field is available only when the resource's Protobuf - // contains it. - // - // To search against `update_time`: - // - // * use a field query. - // - value in seconds since unix epoch. Example: `updateTime < 1609459200` - // - value in date string. Example: `updateTime < 2021-01-01` - // - value in date-time string (must be quoted). Example: `updateTime < - // "2021-01-01T00:00:00"` - google.protobuf.Timestamp update_time = 12; - - // The state of this resource. Different resources types have different state - // definitions that are mapped from various fields of different resource - // types. This field is available only when the resource's Protobuf contains - // it. - // - // Example: - // If the resource is an instance provided by Compute Engine, - // its state will include PROVISIONING, STAGING, RUNNING, STOPPING, - // SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition - // in [API - // Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). - // If the resource is a project provided by Cloud Resource Manager, its state - // will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and - // DELETE_IN_PROGRESS. See `lifecycleState` definition in [API - // Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). - // - // To search against the `state`: - // - // * use a field query. Example: `state:RUNNING` - // * use a free text query. Example: `RUNNING` - string state = 13; - - // The additional searchable attributes of this resource. The attributes may - // vary from one resource type to another. Examples: `projectId` for Project, - // `dnsName` for DNS ManagedZone. This field contains a subset of the resource - // metadata fields that are returned by the List or Get APIs provided by the - // corresponding GCP service (e.g., Compute Engine). see [API references and - // supported searchable - // attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - // to see which fields are included. - // - // You can search values of these fields through free text search. However, - // you should not consume the field programically as the field names and - // values may change as the GCP service updates to a new incompatible API - // version. - // - // To search against the `additional_attributes`: - // - // * use a free text query to match the attributes values. Example: to search - // `additional_attributes = { dnsName: "foobar" }`, you can issue a query - // `foobar`. - google.protobuf.Struct additional_attributes = 9; - - // The full resource name of this resource's parent, if it has one. - // To search against the `parent_full_resource_name`: - // - // * use a field query. Example: - // `parentFullResourceName:"project-name"` - // * use a free text query. Example: - // `project-name` - string parent_full_resource_name = 19; - - // Versioned resource representations of this resource. This is repeated - // because there could be multiple versions of resource representations during - // version migration. - // - // This `versioned_resources` field is not searchable. Some attributes of the - // resource representations are exposed in `additional_attributes` field, so - // as to allow users to search on them. - repeated VersionedResource versioned_resources = 16; - - // Attached resources of this resource. For example, an OSConfig - // Inventory is an attached resource of a Compute Instance. This field is - // repeated because a resource could have multiple attached resources. - // - // This `attached_resources` field is not searchable. Some attributes - // of the attached resources are exposed in `additional_attributes` field, so - // as to allow users to search on them. - repeated AttachedResource attached_resources = 20; - - // A map of related resources of this resource, keyed by the - // relationship type. A relationship type is in the format of - // {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`, - // `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`. - // See [supported relationship - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). - map relationships = 21; - - // TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}. - // To search against the `tagKeys`: - // - // * use a field query. Example: - // - `tagKeys:"123456789/env*"` - // - `tagKeys="123456789/env"` - // - `tagKeys:"env"` - // - // * use a free text query. Example: - // - `env` - repeated string tag_keys = 23; - - // TagValue namespaced names, in the format of - // {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. - // To search against the `tagValues`: - // - // * use a field query. Example: - // - `tagValues:"env"` - // - `tagValues:"env/prod"` - // - `tagValues:"123456789/env/prod*"` - // - `tagValues="123456789/env/prod"` - // - // * use a free text query. Example: - // - `prod` - repeated string tag_values = 25; - - // TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. - // To search against the `tagValueIds`: - // - // * use a field query. Example: - // - `tagValueIds:"456"` - // - `tagValueIds="tagValues/456"` - // - // * use a free text query. Example: - // - `456` - repeated string tag_value_ids = 26; - - // The type of this resource's immediate parent, if there is one. - // - // To search against the `parent_asset_type`: - // - // * use a field query. Example: - // `parentAssetType:"cloudresourcemanager.googleapis.com/Project"` - // * use a free text query. Example: - // `cloudresourcemanager.googleapis.com/Project` - string parent_asset_type = 103; -} - -// Resource representation as defined by the corresponding service providing the -// resource for a given API version. -message VersionedResource { - // API version of the resource. - // - // Example: - // If the resource is an instance provided by Compute Engine v1 API as defined - // in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, - // version will be "v1". - string version = 1; - - // JSON representation of the resource as defined by the corresponding - // service providing this resource. - // - // Example: - // If the resource is an instance provided by Compute Engine, this field will - // contain the JSON representation of the instance as defined by Compute - // Engine: - // `https://cloud.google.com/compute/docs/reference/rest/v1/instances`. - // - // You can find the resource definition for each supported resource type in - // this table: - // `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types` - google.protobuf.Struct resource = 2; -} - -// Attached resource representation, which is defined by the corresponding -// service provider. It represents an attached resource's payload. -message AttachedResource { - // The type of this attached resource. - // - // Example: `osconfig.googleapis.com/Inventory` - // - // You can find the supported attached asset types of each resource in this - // table: - // `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types` - string asset_type = 1; - - // Versioned resource representations of this attached resource. This is - // repeated because there could be multiple versions of the attached resource - // representations during version migration. - repeated VersionedResource versioned_resources = 3; -} - -// The related resources of the primary resource. -message RelatedResources { - // The detailed related resources of the primary resource. - repeated RelatedResource related_resources = 1; -} - -// The detailed related resource. -message RelatedResource { - // The type of the asset. Example: `compute.googleapis.com/Instance` - string asset_type = 1; - - // The full resource name of the related resource. Example: - // `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123` - string full_resource_name = 2; -} - -// A result of IAM Policy search, containing information of an IAM policy. -message IamPolicySearchResult { - // Explanation about the IAM policy search result. - message Explanation { - // IAM permissions - message Permissions { - // A list of permissions. A sample permission string: `compute.disk.get`. - repeated string permissions = 1; - } - - // The map from roles to their included permissions that match the - // permission query (i.e., a query containing `policy.role.permissions:`). - // Example: if query `policy.role.permissions:compute.disk.get` - // matches a policy binding that contains owner role, the - // matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The - // roles can also be found in the returned `policy` bindings. Note that the - // map is populated only for requests with permission queries. - map matched_permissions = 1; - } - - // The full resource name of the resource associated with this IAM policy. - // Example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Cloud Asset Inventory Resource Name - // Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) - // for more information. - // - // To search against the `resource`: - // - // * use a field query. Example: `resource:organizations/123` - string resource = 1; - - // The type of the resource associated with this IAM policy. Example: - // `compute.googleapis.com/Disk`. - // - // To search against the `asset_type`: - // - // * specify the `asset_types` field in your search request. - string asset_type = 5; - - // The project that the associated GCP resource belongs to, in the form of - // projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM - // instance, Cloud Storage bucket), the project field will indicate the - // project that contains the resource. If an IAM policy is set on a folder or - // orgnization, this field will be empty. - // - // To search against the `project`: - // - // * specify the `scope` field as this project in your search request. - string project = 2; - - // The folder(s) that the IAM policy belongs to, in the form of - // folders/{FOLDER_NUMBER}. This field is available when the IAM policy - // belongs to one or more folders. - // - // To search against `folders`: - // - // * use a field query. Example: `folders:(123 OR 456)` - // * use a free text query. Example: `123` - // * specify the `scope` field as this folder in your search request. - repeated string folders = 6; - - // The organization that the IAM policy belongs to, in the form - // of organizations/{ORGANIZATION_NUMBER}. This field is available when the - // IAM policy belongs to an organization. - // - // To search against `organization`: - // - // * use a field query. Example: `organization:123` - // * use a free text query. Example: `123` - // * specify the `scope` field as this organization in your search request. - string organization = 7; - - // The IAM policy directly set on the given resource. Note that the original - // IAM policy can contain multiple bindings. This only contains the bindings - // that match the given query. For queries that don't contain a constrain on - // policies (e.g., an empty query), this contains all the bindings. - // - // To search against the `policy` bindings: - // - // * use a field query: - // - query by the policy contained members. Example: - // `policy:amy@gmail.com` - // - query by the policy contained roles. Example: - // `policy:roles/compute.admin` - // - query by the policy contained roles' included permissions. Example: - // `policy.role.permissions:compute.instances.create` - google.iam.v1.Policy policy = 3; - - // Explanation about the IAM policy search result. It contains additional - // information to explain why the search result matches the query. - Explanation explanation = 4; -} - -// Represents the detailed state of an entity under analysis, such as a -// resource, an identity or an access. -message IamPolicyAnalysisState { - // The Google standard error code that best describes the state. - // For example: - // - OK means the analysis on this entity has been successfully finished; - // - PERMISSION_DENIED means an access denied error is encountered; - // - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started - // in time; - google.rpc.Code code = 1; - - // The human-readable description of the cause of failure. - string cause = 2; -} - -// The Condition evaluation. -message ConditionEvaluation { - // Value of this expression. - enum EvaluationValue { - // Reserved for future use. - EVALUATION_VALUE_UNSPECIFIED = 0; - - // The evaluation result is `true`. - TRUE = 1; - - // The evaluation result is `false`. - FALSE = 2; - - // The evaluation result is `conditional` when the condition expression - // contains variables that are either missing input values or have not been - // supported by Analyzer yet. - CONDITIONAL = 3; - } - - // The evaluation result. - EvaluationValue evaluation_value = 1; -} - -// IAM Policy analysis result, consisting of one IAM policy binding and derived -// access control lists. -message IamPolicyAnalysisResult { - // A Google Cloud resource under analysis. - message Resource { - // The [full resource - // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - string full_resource_name = 1; - - // The analysis state of this resource. - IamPolicyAnalysisState analysis_state = 2; - } - - // An IAM role or permission under analysis. - message Access { - oneof oneof_access { - // The role. - string role = 1; - - // The permission. - string permission = 2; - } - - // The analysis state of this access. - IamPolicyAnalysisState analysis_state = 3; - } - - // An identity under analysis. - message Identity { - // The identity name in any form of members appear in - // [IAM policy - // binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such - // as: - // - user:foo@google.com - // - group:group1@google.com - // - serviceAccount:s1@prj1.iam.gserviceaccount.com - // - projectOwner:some_project_id - // - domain:google.com - // - allUsers - // - etc. - string name = 1; - - // The analysis state of this identity. - IamPolicyAnalysisState analysis_state = 2; - } - - // A directional edge. - message Edge { - // The source node of the edge. For example, it could be a full resource - // name for a resource node or an email of an identity. - string source_node = 1; - - // The target node of the edge. For example, it could be a full resource - // name for a resource node or an email of an identity. - string target_node = 2; - } - - // An access control list, derived from the above IAM policy binding, which - // contains a set of resources and accesses. May include one - // item from each set to compose an access control entry. - // - // NOTICE that there could be multiple access control lists for one IAM policy - // binding. The access control lists are created based on resource and access - // combinations. - // - // For example, assume we have the following cases in one IAM policy binding: - // - Permission P1 and P2 apply to resource R1 and R2; - // - Permission P3 applies to resource R2 and R3; - // - // This will result in the following access control lists: - // - AccessControlList 1: [R1, R2], [P1, P2] - // - AccessControlList 2: [R2, R3], [P3] - message AccessControlList { - // The resources that match one of the following conditions: - // - The resource_selector, if it is specified in request; - // - Otherwise, resources reachable from the policy attached resource. - repeated Resource resources = 1; - - // The accesses that match one of the following conditions: - // - The access_selector, if it is specified in request; - // - Otherwise, access specifiers reachable from the policy binding's role. - repeated Access accesses = 2; - - // Resource edges of the graph starting from the policy attached - // resource to any descendant resources. The - // [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] - // contains the full resource name of a parent resource and - // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] - // contains the full resource name of a child resource. This field is - // present only if the output_resource_edges option is enabled in request. - repeated Edge resource_edges = 3; - - // Condition evaluation for this AccessControlList, if there is a condition - // defined in the above IAM policy binding. - ConditionEvaluation condition_evaluation = 4; - } - - // The identities and group edges. - message IdentityList { - // Only the identities that match one of the following conditions will be - // presented: - // - The identity_selector, if it is specified in request; - // - Otherwise, identities reachable from the policy binding's members. - repeated Identity identities = 1; - - // Group identity edges of the graph starting from the binding's - // group members to any node of the - // [identities][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. - // The - // [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] - // contains a group, such as `group:parent@google.com`. The - // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.target_node] - // contains a member of the group, such as `group:child@google.com` or - // `user:foo@google.com`. This field is present only if the - // output_group_edges option is enabled in request. - repeated Edge group_edges = 2; - } - - // The [full resource - // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) - // of the resource to which the - // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] - // policy attaches. - string attached_resource_full_name = 1; - - // The Cloud IAM policy binding under analysis. - google.iam.v1.Binding iam_binding = 2; - - // The access control lists derived from the - // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] - // that match or potentially match resource and access selectors specified in - // the request. - repeated AccessControlList access_control_lists = 3; - - // The identity list derived from members of the - // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] - // that match or potentially match identity selector specified in the request. - IdentityList identity_list = 4; - - // Represents whether all analyses on the - // [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] - // have successfully finished. - bool fully_explored = 5; -} diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java deleted file mode 100644 index 397a1551cee2..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/AsyncAnalyzeIamPolicy.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_analyzeiampolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; -import com.google.protobuf.Duration; - -public class AsyncAnalyzeIamPolicy { - - public static void main(String[] args) throws Exception { - asyncAnalyzeIamPolicy(); - } - - public static void asyncAnalyzeIamPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - AnalyzeIamPolicyRequest request = - AnalyzeIamPolicyRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setExecutionTimeout(Duration.newBuilder().build()) - .build(); - ApiFuture future = - assetServiceClient.analyzeIamPolicyCallable().futureCall(request); - // Do something. - AnalyzeIamPolicyResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_analyzeiampolicy_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java deleted file mode 100644 index 1d462b10839e..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicy/SyncAnalyzeIamPolicy.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_analyzeiampolicy_sync] -import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; -import com.google.protobuf.Duration; - -public class SyncAnalyzeIamPolicy { - - public static void main(String[] args) throws Exception { - syncAnalyzeIamPolicy(); - } - - public static void syncAnalyzeIamPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - AnalyzeIamPolicyRequest request = - AnalyzeIamPolicyRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setExecutionTimeout(Duration.newBuilder().build()) - .build(); - AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_analyzeiampolicy_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java deleted file mode 100644 index a5178fab9a4d..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunning.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig; -import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; -import com.google.longrunning.Operation; - -public class AsyncAnalyzeIamPolicyLongrunning { - - public static void main(String[] args) throws Exception { - asyncAnalyzeIamPolicyLongrunning(); - } - - public static void asyncAnalyzeIamPolicyLongrunning() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - AnalyzeIamPolicyLongrunningRequest request = - AnalyzeIamPolicyLongrunningRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) - .build(); - ApiFuture future = - assetServiceClient.analyzeIamPolicyLongrunningCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java deleted file mode 100644 index 4f2d518a7c91..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/AsyncAnalyzeIamPolicyLongrunningLRO.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig; -import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; - -public class AsyncAnalyzeIamPolicyLongrunningLRO { - - public static void main(String[] args) throws Exception { - asyncAnalyzeIamPolicyLongrunningLRO(); - } - - public static void asyncAnalyzeIamPolicyLongrunningLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - AnalyzeIamPolicyLongrunningRequest request = - AnalyzeIamPolicyLongrunningRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) - .build(); - OperationFuture - future = - assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request); - // Do something. - AnalyzeIamPolicyLongrunningResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_lro_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java deleted file mode 100644 index f14d16f4d4e2..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzeiampolicylongrunning/SyncAnalyzeIamPolicyLongrunning.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_sync] -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest; -import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig; -import com.google.cloud.asset.v1.IamPolicyAnalysisQuery; - -public class SyncAnalyzeIamPolicyLongrunning { - - public static void main(String[] args) throws Exception { - syncAnalyzeIamPolicyLongrunning(); - } - - public static void syncAnalyzeIamPolicyLongrunning() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - AnalyzeIamPolicyLongrunningRequest request = - AnalyzeIamPolicyLongrunningRequest.newBuilder() - .setAnalysisQuery(IamPolicyAnalysisQuery.newBuilder().build()) - .setSavedAnalysisQuery("savedAnalysisQuery376058885") - .setOutputConfig(IamPolicyAnalysisOutputConfig.newBuilder().build()) - .build(); - AnalyzeIamPolicyLongrunningResponse response = - assetServiceClient.analyzeIamPolicyLongrunningAsync(request).get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_analyzeiampolicylongrunning_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java deleted file mode 100644 index 0bccc2c63bbd..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/AsyncAnalyzeMove.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_analyzemove_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AnalyzeMoveRequest; -import com.google.cloud.asset.v1.AnalyzeMoveResponse; -import com.google.cloud.asset.v1.AssetServiceClient; - -public class AsyncAnalyzeMove { - - public static void main(String[] args) throws Exception { - asyncAnalyzeMove(); - } - - public static void asyncAnalyzeMove() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - AnalyzeMoveRequest request = - AnalyzeMoveRequest.newBuilder() - .setResource("resource-341064690") - .setDestinationParent("destinationParent-1733659048") - .build(); - ApiFuture future = - assetServiceClient.analyzeMoveCallable().futureCall(request); - // Do something. - AnalyzeMoveResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_analyzemove_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java deleted file mode 100644 index dd975540ee7a..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/analyzemove/SyncAnalyzeMove.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_analyzemove_sync] -import com.google.cloud.asset.v1.AnalyzeMoveRequest; -import com.google.cloud.asset.v1.AnalyzeMoveResponse; -import com.google.cloud.asset.v1.AssetServiceClient; - -public class SyncAnalyzeMove { - - public static void main(String[] args) throws Exception { - syncAnalyzeMove(); - } - - public static void syncAnalyzeMove() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - AnalyzeMoveRequest request = - AnalyzeMoveRequest.newBuilder() - .setResource("resource-341064690") - .setDestinationParent("destinationParent-1733659048") - .build(); - AnalyzeMoveResponse response = assetServiceClient.analyzeMove(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_analyzemove_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java deleted file mode 100644 index 5b18158c3523..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/AsyncBatchGetAssetsHistory.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_batchgetassetshistory_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.TimeWindow; -import java.util.ArrayList; - -public class AsyncBatchGetAssetsHistory { - - public static void main(String[] args) throws Exception { - asyncBatchGetAssetsHistory(); - } - - public static void asyncBatchGetAssetsHistory() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .addAllAssetNames(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setReadTimeWindow(TimeWindow.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - ApiFuture future = - assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request); - // Do something. - BatchGetAssetsHistoryResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_batchgetassetshistory_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java deleted file mode 100644 index c0e6a6c4ae89..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgetassetshistory/SyncBatchGetAssetsHistory.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_batchgetassetshistory_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; -import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.TimeWindow; -import java.util.ArrayList; - -public class SyncBatchGetAssetsHistory { - - public static void main(String[] args) throws Exception { - syncBatchGetAssetsHistory(); - } - - public static void syncBatchGetAssetsHistory() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - BatchGetAssetsHistoryRequest request = - BatchGetAssetsHistoryRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .addAllAssetNames(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setReadTimeWindow(TimeWindow.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_batchgetassetshistory_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java deleted file mode 100644 index c874fbf6ec0d..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/AsyncBatchGetEffectiveIamPolicies.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; -import com.google.cloud.asset.v1.FolderName; -import java.util.ArrayList; - -public class AsyncBatchGetEffectiveIamPolicies { - - public static void main(String[] args) throws Exception { - asyncBatchGetEffectiveIamPolicies(); - } - - public static void asyncBatchGetEffectiveIamPolicies() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - BatchGetEffectiveIamPoliciesRequest request = - BatchGetEffectiveIamPoliciesRequest.newBuilder() - .setScope(FolderName.of("[FOLDER]").toString()) - .addAllNames(new ArrayList()) - .build(); - ApiFuture future = - assetServiceClient.batchGetEffectiveIamPoliciesCallable().futureCall(request); - // Do something. - BatchGetEffectiveIamPoliciesResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java deleted file mode 100644 index 5033bdb707b5..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/batchgeteffectiveiampolicies/SyncBatchGetEffectiveIamPolicies.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesRequest; -import com.google.cloud.asset.v1.BatchGetEffectiveIamPoliciesResponse; -import com.google.cloud.asset.v1.FolderName; -import java.util.ArrayList; - -public class SyncBatchGetEffectiveIamPolicies { - - public static void main(String[] args) throws Exception { - syncBatchGetEffectiveIamPolicies(); - } - - public static void syncBatchGetEffectiveIamPolicies() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - BatchGetEffectiveIamPoliciesRequest request = - BatchGetEffectiveIamPoliciesRequest.newBuilder() - .setScope(FolderName.of("[FOLDER]").toString()) - .addAllNames(new ArrayList()) - .build(); - BatchGetEffectiveIamPoliciesResponse response = - assetServiceClient.batchGetEffectiveIamPolicies(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_batchgeteffectiveiampolicies_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 913a1c1c0dbf..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.AssetServiceSettings; -import com.google.cloud.asset.v1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 7b65f1da80f1..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_create_setcredentialsprovider1_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.AssetServiceSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index fa2c2a4b4e7e..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_create_setendpoint_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.AssetServiceSettings; -import com.google.cloud.asset.v1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java deleted file mode 100644 index 060c56a7646c..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/AsyncCreateFeed.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createfeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.CreateFeedRequest; -import com.google.cloud.asset.v1.Feed; - -public class AsyncCreateFeed { - - public static void main(String[] args) throws Exception { - asyncCreateFeed(); - } - - public static void asyncCreateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - CreateFeedRequest request = - CreateFeedRequest.newBuilder() - .setParent("parent-995424086") - .setFeedId("feedId-1278410919") - .setFeed(Feed.newBuilder().build()) - .build(); - ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request); - // Do something. - Feed response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_createfeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java deleted file mode 100644 index fea0a079f661..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeed.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createfeed_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.CreateFeedRequest; -import com.google.cloud.asset.v1.Feed; - -public class SyncCreateFeed { - - public static void main(String[] args) throws Exception { - syncCreateFeed(); - } - - public static void syncCreateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - CreateFeedRequest request = - CreateFeedRequest.newBuilder() - .setParent("parent-995424086") - .setFeedId("feedId-1278410919") - .setFeed(Feed.newBuilder().build()) - .build(); - Feed response = assetServiceClient.createFeed(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java deleted file mode 100644 index 66eddd4c2740..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createfeed/SyncCreateFeedString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createfeed_string_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; - -public class SyncCreateFeedString { - - public static void main(String[] args) throws Exception { - syncCreateFeedString(); - } - - public static void syncCreateFeedString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String parent = "parent-995424086"; - Feed response = assetServiceClient.createFeed(parent); - } - } -} -// [END asset_v1_generated_assetserviceclient_createfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java deleted file mode 100644 index f908b386a7ca..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/AsyncCreateSavedQuery.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createsavedquery_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.CreateSavedQueryRequest; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class AsyncCreateSavedQuery { - - public static void main(String[] args) throws Exception { - asyncCreateSavedQuery(); - } - - public static void asyncCreateSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - CreateSavedQueryRequest request = - CreateSavedQueryRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setSavedQuery(SavedQuery.newBuilder().build()) - .setSavedQueryId("savedQueryId378086268") - .build(); - ApiFuture future = - assetServiceClient.createSavedQueryCallable().futureCall(request); - // Do something. - SavedQuery response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_createsavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java deleted file mode 100644 index 3404aaf6f5db..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQuery.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createsavedquery_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.CreateSavedQueryRequest; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncCreateSavedQuery { - - public static void main(String[] args) throws Exception { - syncCreateSavedQuery(); - } - - public static void syncCreateSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - CreateSavedQueryRequest request = - CreateSavedQueryRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setSavedQuery(SavedQuery.newBuilder().build()) - .setSavedQueryId("savedQueryId378086268") - .build(); - SavedQuery response = assetServiceClient.createSavedQuery(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_createsavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java deleted file mode 100644 index bb92329549b8..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryFoldernameSavedqueryString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createsavedquery_foldernamesavedquerystring_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncCreateSavedQueryFoldernameSavedqueryString { - - public static void main(String[] args) throws Exception { - syncCreateSavedQueryFoldernameSavedqueryString(); - } - - public static void syncCreateSavedQueryFoldernameSavedqueryString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - FolderName parent = FolderName.of("[FOLDER]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); - } - } -} -// [END asset_v1_generated_assetserviceclient_createsavedquery_foldernamesavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java deleted file mode 100644 index d14793b2a511..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryOrganizationnameSavedqueryString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createsavedquery_organizationnamesavedquerystring_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.OrganizationName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncCreateSavedQueryOrganizationnameSavedqueryString { - - public static void main(String[] args) throws Exception { - syncCreateSavedQueryOrganizationnameSavedqueryString(); - } - - public static void syncCreateSavedQueryOrganizationnameSavedqueryString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); - } - } -} -// [END asset_v1_generated_assetserviceclient_createsavedquery_organizationnamesavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java deleted file mode 100644 index 8855942d615e..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryProjectnameSavedqueryString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createsavedquery_projectnamesavedquerystring_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncCreateSavedQueryProjectnameSavedqueryString { - - public static void main(String[] args) throws Exception { - syncCreateSavedQueryProjectnameSavedqueryString(); - } - - public static void syncCreateSavedQueryProjectnameSavedqueryString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ProjectName parent = ProjectName.of("[PROJECT]"); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); - } - } -} -// [END asset_v1_generated_assetserviceclient_createsavedquery_projectnamesavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java deleted file mode 100644 index b0e3e8d7af59..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/createsavedquery/SyncCreateSavedQueryStringSavedqueryString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_createsavedquery_stringsavedquerystring_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncCreateSavedQueryStringSavedqueryString { - - public static void main(String[] args) throws Exception { - syncCreateSavedQueryStringSavedqueryString(); - } - - public static void syncCreateSavedQueryStringSavedqueryString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String parent = ProjectName.of("[PROJECT]").toString(); - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - String savedQueryId = "savedQueryId378086268"; - SavedQuery response = assetServiceClient.createSavedQuery(parent, savedQuery, savedQueryId); - } - } -} -// [END asset_v1_generated_assetserviceclient_createsavedquery_stringsavedquerystring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java deleted file mode 100644 index cc5bdb96e8e1..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/AsyncDeleteFeed.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletefeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.DeleteFeedRequest; -import com.google.cloud.asset.v1.FeedName; -import com.google.protobuf.Empty; - -public class AsyncDeleteFeed { - - public static void main(String[] args) throws Exception { - asyncDeleteFeed(); - } - - public static void asyncDeleteFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - DeleteFeedRequest request = - DeleteFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletefeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java deleted file mode 100644 index 1786f511b92c..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeed.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletefeed_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.DeleteFeedRequest; -import com.google.cloud.asset.v1.FeedName; -import com.google.protobuf.Empty; - -public class SyncDeleteFeed { - - public static void main(String[] args) throws Exception { - syncDeleteFeed(); - } - - public static void syncDeleteFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - DeleteFeedRequest request = - DeleteFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - assetServiceClient.deleteFeed(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletefeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java deleted file mode 100644 index b16984b667f5..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletefeed_feedname_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FeedName; -import com.google.protobuf.Empty; - -public class SyncDeleteFeedFeedname { - - public static void main(String[] args) throws Exception { - syncDeleteFeedFeedname(); - } - - public static void syncDeleteFeedFeedname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - assetServiceClient.deleteFeed(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletefeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java deleted file mode 100644 index 0ec0024d6556..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletefeed/SyncDeleteFeedString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletefeed_string_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FeedName; -import com.google.protobuf.Empty; - -public class SyncDeleteFeedString { - - public static void main(String[] args) throws Exception { - syncDeleteFeedString(); - } - - public static void syncDeleteFeedString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); - assetServiceClient.deleteFeed(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletefeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java deleted file mode 100644 index 745652bd24f3..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/AsyncDeleteSavedQuery.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletesavedquery_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.DeleteSavedQueryRequest; -import com.google.cloud.asset.v1.SavedQueryName; -import com.google.protobuf.Empty; - -public class AsyncDeleteSavedQuery { - - public static void main(String[] args) throws Exception { - asyncDeleteSavedQuery(); - } - - public static void asyncDeleteSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - DeleteSavedQueryRequest request = - DeleteSavedQueryRequest.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .build(); - ApiFuture future = assetServiceClient.deleteSavedQueryCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletesavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java deleted file mode 100644 index f188c5067a50..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuery.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletesavedquery_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.DeleteSavedQueryRequest; -import com.google.cloud.asset.v1.SavedQueryName; -import com.google.protobuf.Empty; - -public class SyncDeleteSavedQuery { - - public static void main(String[] args) throws Exception { - syncDeleteSavedQuery(); - } - - public static void syncDeleteSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - DeleteSavedQueryRequest request = - DeleteSavedQueryRequest.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .build(); - assetServiceClient.deleteSavedQuery(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletesavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java deleted file mode 100644 index 8bccb08a7146..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQuerySavedqueryname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletesavedquery_savedqueryname_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.SavedQueryName; -import com.google.protobuf.Empty; - -public class SyncDeleteSavedQuerySavedqueryname { - - public static void main(String[] args) throws Exception { - syncDeleteSavedQuerySavedqueryname(); - } - - public static void syncDeleteSavedQuerySavedqueryname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - assetServiceClient.deleteSavedQuery(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletesavedquery_savedqueryname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java deleted file mode 100644 index a0496113a9e7..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/deletesavedquery/SyncDeleteSavedQueryString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_deletesavedquery_string_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.SavedQueryName; -import com.google.protobuf.Empty; - -public class SyncDeleteSavedQueryString { - - public static void main(String[] args) throws Exception { - syncDeleteSavedQueryString(); - } - - public static void syncDeleteSavedQueryString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString(); - assetServiceClient.deleteSavedQuery(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_deletesavedquery_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java deleted file mode 100644 index 6e4462175c47..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssets.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_exportassets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.ExportAssetsRequest; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.OutputConfig; -import com.google.longrunning.Operation; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class AsyncExportAssets { - - public static void main(String[] args) throws Exception { - asyncExportAssets(); - } - - public static void asyncExportAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - ApiFuture future = assetServiceClient.exportAssetsCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_exportassets_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java deleted file mode 100644 index 44c5380a9a53..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/AsyncExportAssetsLRO.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_exportassets_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.ExportAssetsRequest; -import com.google.cloud.asset.v1.ExportAssetsResponse; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.OutputConfig; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class AsyncExportAssetsLRO { - - public static void main(String[] args) throws Exception { - asyncExportAssetsLRO(); - } - - public static void asyncExportAssetsLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - OperationFuture future = - assetServiceClient.exportAssetsOperationCallable().futureCall(request); - // Do something. - ExportAssetsResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_exportassets_lro_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java deleted file mode 100644 index 0d5399334f1b..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/exportassets/SyncExportAssets.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_exportassets_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.ExportAssetsRequest; -import com.google.cloud.asset.v1.ExportAssetsResponse; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.OutputConfig; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class SyncExportAssets { - - public static void main(String[] args) throws Exception { - syncExportAssets(); - } - - public static void syncExportAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_exportassets_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java deleted file mode 100644 index 40de97de9e3f..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/AsyncGetFeed.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getfeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.FeedName; -import com.google.cloud.asset.v1.GetFeedRequest; - -public class AsyncGetFeed { - - public static void main(String[] args) throws Exception { - asyncGetFeed(); - } - - public static void asyncGetFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - GetFeedRequest request = - GetFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request); - // Do something. - Feed response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_getfeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java deleted file mode 100644 index 0490c1c1eaf1..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeed.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getfeed_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.FeedName; -import com.google.cloud.asset.v1.GetFeedRequest; - -public class SyncGetFeed { - - public static void main(String[] args) throws Exception { - syncGetFeed(); - } - - public static void syncGetFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - GetFeedRequest request = - GetFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - Feed response = assetServiceClient.getFeed(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_getfeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java deleted file mode 100644 index f697ff3f5b7f..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedFeedname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getfeed_feedname_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.FeedName; - -public class SyncGetFeedFeedname { - - public static void main(String[] args) throws Exception { - syncGetFeedFeedname(); - } - - public static void syncGetFeedFeedname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - Feed response = assetServiceClient.getFeed(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_getfeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java deleted file mode 100644 index 9e750f6c0872..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getfeed/SyncGetFeedString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getfeed_string_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.FeedName; - -public class SyncGetFeedString { - - public static void main(String[] args) throws Exception { - syncGetFeedString(); - } - - public static void syncGetFeedString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); - Feed response = assetServiceClient.getFeed(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_getfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java deleted file mode 100644 index 6296e79d1096..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/AsyncGetSavedQuery.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getsavedquery_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.GetSavedQueryRequest; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SavedQueryName; - -public class AsyncGetSavedQuery { - - public static void main(String[] args) throws Exception { - asyncGetSavedQuery(); - } - - public static void asyncGetSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - GetSavedQueryRequest request = - GetSavedQueryRequest.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .build(); - ApiFuture future = assetServiceClient.getSavedQueryCallable().futureCall(request); - // Do something. - SavedQuery response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_getsavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java deleted file mode 100644 index fbf5f0a533bf..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuery.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getsavedquery_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.GetSavedQueryRequest; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SavedQueryName; - -public class SyncGetSavedQuery { - - public static void main(String[] args) throws Exception { - syncGetSavedQuery(); - } - - public static void syncGetSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - GetSavedQueryRequest request = - GetSavedQueryRequest.newBuilder() - .setName( - SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString()) - .build(); - SavedQuery response = assetServiceClient.getSavedQuery(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_getsavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java deleted file mode 100644 index eeb827c8a0f6..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQuerySavedqueryname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getsavedquery_savedqueryname_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SavedQueryName; - -public class SyncGetSavedQuerySavedqueryname { - - public static void main(String[] args) throws Exception { - syncGetSavedQuerySavedqueryname(); - } - - public static void syncGetSavedQuerySavedqueryname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SavedQueryName name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]"); - SavedQuery response = assetServiceClient.getSavedQuery(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_getsavedquery_savedqueryname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java deleted file mode 100644 index d9353b6b9539..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/getsavedquery/SyncGetSavedQueryString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_getsavedquery_string_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.SavedQueryName; - -public class SyncGetSavedQueryString { - - public static void main(String[] args) throws Exception { - syncGetSavedQueryString(); - } - - public static void syncGetSavedQueryString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String name = SavedQueryName.ofProjectSavedQueryName("[PROJECT]", "[SAVED_QUERY]").toString(); - SavedQuery response = assetServiceClient.getSavedQuery(name); - } - } -} -// [END asset_v1_generated_assetserviceclient_getsavedquery_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java deleted file mode 100644 index 1d8d0b60b6eb..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssets.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listassets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.Asset; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.ListAssetsRequest; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class AsyncListAssets { - - public static void main(String[] args) throws Exception { - asyncListAssets(); - } - - public static void asyncListAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .addAllRelationshipTypes(new ArrayList()) - .build(); - ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request); - // Do something. - for (Asset element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listassets_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java deleted file mode 100644 index 01e1d69ebfdf..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/AsyncListAssetsPaged.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listassets_paged_async] -import com.google.cloud.asset.v1.Asset; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.ListAssetsRequest; -import com.google.cloud.asset.v1.ListAssetsResponse; -import com.google.common.base.Strings; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class AsyncListAssetsPaged { - - public static void main(String[] args) throws Exception { - asyncListAssetsPaged(); - } - - public static void asyncListAssetsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .addAllRelationshipTypes(new ArrayList()) - .build(); - while (true) { - ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request); - for (Asset element : response.getAssetsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listassets_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java deleted file mode 100644 index e52d29c39485..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssets.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listassets_sync] -import com.google.cloud.asset.v1.Asset; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ContentType; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.ListAssetsRequest; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class SyncListAssets { - - public static void main(String[] args) throws Exception { - syncListAssets(); - } - - public static void syncListAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .addAllRelationshipTypes(new ArrayList()) - .build(); - for (Asset element : assetServiceClient.listAssets(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java deleted file mode 100644 index 2c1309b320de..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsResourcename.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listassets_resourcename_sync] -import com.google.api.resourcenames.ResourceName; -import com.google.cloud.asset.v1.Asset; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FolderName; - -public class SyncListAssetsResourcename { - - public static void main(String[] args) throws Exception { - syncListAssetsResourcename(); - } - - public static void syncListAssetsResourcename() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ResourceName parent = FolderName.of("[FOLDER]"); - for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listassets_resourcename_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java deleted file mode 100644 index ddc3aa7ea584..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listassets/SyncListAssetsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listassets_string_sync] -import com.google.cloud.asset.v1.Asset; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FeedName; - -public class SyncListAssetsString { - - public static void main(String[] args) throws Exception { - syncListAssetsString(); - } - - public static void syncListAssetsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); - for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listassets_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java deleted file mode 100644 index 3e47fc647d16..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/AsyncListFeeds.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listfeeds_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ListFeedsRequest; -import com.google.cloud.asset.v1.ListFeedsResponse; - -public class AsyncListFeeds { - - public static void main(String[] args) throws Exception { - asyncListFeeds(); - } - - public static void asyncListFeeds() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListFeedsRequest request = - ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); - ApiFuture future = - assetServiceClient.listFeedsCallable().futureCall(request); - // Do something. - ListFeedsResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_listfeeds_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java deleted file mode 100644 index 8bff72705dc6..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeeds.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listfeeds_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ListFeedsRequest; -import com.google.cloud.asset.v1.ListFeedsResponse; - -public class SyncListFeeds { - - public static void main(String[] args) throws Exception { - syncListFeeds(); - } - - public static void syncListFeeds() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListFeedsRequest request = - ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); - ListFeedsResponse response = assetServiceClient.listFeeds(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_listfeeds_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java deleted file mode 100644 index 3d6a842eeb4f..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listfeeds/SyncListFeedsString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listfeeds_string_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ListFeedsResponse; - -public class SyncListFeedsString { - - public static void main(String[] args) throws Exception { - syncListFeedsString(); - } - - public static void syncListFeedsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String parent = "parent-995424086"; - ListFeedsResponse response = assetServiceClient.listFeeds(parent); - } - } -} -// [END asset_v1_generated_assetserviceclient_listfeeds_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java deleted file mode 100644 index 9e178c164c47..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueries.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listsavedqueries_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ListSavedQueriesRequest; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class AsyncListSavedQueries { - - public static void main(String[] args) throws Exception { - asyncListSavedQueries(); - } - - public static void asyncListSavedQueries() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListSavedQueriesRequest request = - ListSavedQueriesRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - assetServiceClient.listSavedQueriesPagedCallable().futureCall(request); - // Do something. - for (SavedQuery element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listsavedqueries_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java deleted file mode 100644 index 303a499805d4..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/AsyncListSavedQueriesPaged.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listsavedqueries_paged_async] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ListSavedQueriesRequest; -import com.google.cloud.asset.v1.ListSavedQueriesResponse; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.common.base.Strings; - -public class AsyncListSavedQueriesPaged { - - public static void main(String[] args) throws Exception { - asyncListSavedQueriesPaged(); - } - - public static void asyncListSavedQueriesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListSavedQueriesRequest request = - ListSavedQueriesRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListSavedQueriesResponse response = - assetServiceClient.listSavedQueriesCallable().call(request); - for (SavedQuery element : response.getSavedQueriesList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listsavedqueries_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java deleted file mode 100644 index d97d4ec355b8..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueries.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listsavedqueries_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ListSavedQueriesRequest; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncListSavedQueries { - - public static void main(String[] args) throws Exception { - syncListSavedQueries(); - } - - public static void syncListSavedQueries() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListSavedQueriesRequest request = - ListSavedQueriesRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setFilter("filter-1274492040") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (SavedQuery element : assetServiceClient.listSavedQueries(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listsavedqueries_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java deleted file mode 100644 index 8f8a758d7d3b..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesFoldername.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listsavedqueries_foldername_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncListSavedQueriesFoldername { - - public static void main(String[] args) throws Exception { - syncListSavedQueriesFoldername(); - } - - public static void syncListSavedQueriesFoldername() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - FolderName parent = FolderName.of("[FOLDER]"); - for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listsavedqueries_foldername_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java deleted file mode 100644 index 6a6eda31445d..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesOrganizationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listsavedqueries_organizationname_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.OrganizationName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncListSavedQueriesOrganizationname { - - public static void main(String[] args) throws Exception { - syncListSavedQueriesOrganizationname(); - } - - public static void syncListSavedQueriesOrganizationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - OrganizationName parent = OrganizationName.of("[ORGANIZATION]"); - for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listsavedqueries_organizationname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java deleted file mode 100644 index 226ef455bc14..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesProjectname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listsavedqueries_projectname_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncListSavedQueriesProjectname { - - public static void main(String[] args) throws Exception { - syncListSavedQueriesProjectname(); - } - - public static void syncListSavedQueriesProjectname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ProjectName parent = ProjectName.of("[PROJECT]"); - for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listsavedqueries_projectname_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java deleted file mode 100644 index 66a80549544c..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/listsavedqueries/SyncListSavedQueriesString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_listsavedqueries_string_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ProjectName; -import com.google.cloud.asset.v1.SavedQuery; - -public class SyncListSavedQueriesString { - - public static void main(String[] args) throws Exception { - syncListSavedQueriesString(); - } - - public static void syncListSavedQueriesString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String parent = ProjectName.of("[PROJECT]").toString(); - for (SavedQuery element : assetServiceClient.listSavedQueries(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_listsavedqueries_string_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java deleted file mode 100644 index 64e9cd858053..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/AsyncQueryAssets.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_queryassets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.QueryAssetsOutputConfig; -import com.google.cloud.asset.v1.QueryAssetsRequest; -import com.google.cloud.asset.v1.QueryAssetsResponse; -import com.google.protobuf.Duration; - -public class AsyncQueryAssets { - - public static void main(String[] args) throws Exception { - asyncQueryAssets(); - } - - public static void asyncQueryAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - QueryAssetsRequest request = - QueryAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setTimeout(Duration.newBuilder().build()) - .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) - .build(); - ApiFuture future = - assetServiceClient.queryAssetsCallable().futureCall(request); - // Do something. - QueryAssetsResponse response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_queryassets_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java deleted file mode 100644 index fc591f210470..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/queryassets/SyncQueryAssets.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_queryassets_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.FolderName; -import com.google.cloud.asset.v1.QueryAssetsOutputConfig; -import com.google.cloud.asset.v1.QueryAssetsRequest; -import com.google.cloud.asset.v1.QueryAssetsResponse; -import com.google.protobuf.Duration; - -public class SyncQueryAssets { - - public static void main(String[] args) throws Exception { - syncQueryAssets(); - } - - public static void syncQueryAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - QueryAssetsRequest request = - QueryAssetsRequest.newBuilder() - .setParent(FolderName.of("[FOLDER]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setTimeout(Duration.newBuilder().build()) - .setOutputConfig(QueryAssetsOutputConfig.newBuilder().build()) - .build(); - QueryAssetsResponse response = assetServiceClient.queryAssets(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_queryassets_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java deleted file mode 100644 index 7e7a38c5309f..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchalliampolicies_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicySearchResult; -import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; -import java.util.ArrayList; - -public class AsyncSearchAllIamPolicies { - - public static void main(String[] args) throws Exception { - asyncSearchAllIamPolicies(); - } - - public static void asyncSearchAllIamPolicies() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .addAllAssetTypes(new ArrayList()) - .setOrderBy("orderBy-1207110587") - .build(); - ApiFuture future = - assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request); - // Do something. - for (IamPolicySearchResult element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchalliampolicies_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java deleted file mode 100644 index 4de6b3f53ab8..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchalliampolicies_paged_async] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicySearchResult; -import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1.SearchAllIamPoliciesResponse; -import com.google.common.base.Strings; -import java.util.ArrayList; - -public class AsyncSearchAllIamPoliciesPaged { - - public static void main(String[] args) throws Exception { - asyncSearchAllIamPoliciesPaged(); - } - - public static void asyncSearchAllIamPoliciesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .addAllAssetTypes(new ArrayList()) - .setOrderBy("orderBy-1207110587") - .build(); - while (true) { - SearchAllIamPoliciesResponse response = - assetServiceClient.searchAllIamPoliciesCallable().call(request); - for (IamPolicySearchResult element : response.getResultsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchalliampolicies_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java deleted file mode 100644 index 50ee2ef294d7..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchalliampolicies_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicySearchResult; -import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; -import java.util.ArrayList; - -public class SyncSearchAllIamPolicies { - - public static void main(String[] args) throws Exception { - syncSearchAllIamPolicies(); - } - - public static void syncSearchAllIamPolicies() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .addAllAssetTypes(new ArrayList()) - .setOrderBy("orderBy-1207110587") - .build(); - for (IamPolicySearchResult element : - assetServiceClient.searchAllIamPolicies(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchalliampolicies_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java deleted file mode 100644 index 2704f9be42b8..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.IamPolicySearchResult; - -public class SyncSearchAllIamPoliciesStringString { - - public static void main(String[] args) throws Exception { - syncSearchAllIamPoliciesStringString(); - } - - public static void syncSearchAllIamPoliciesStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String scope = "scope109264468"; - String query = "query107944136"; - for (IamPolicySearchResult element : - assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java deleted file mode 100644 index 5d8a22c23421..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResources.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchallresources_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ResourceSearchResult; -import com.google.cloud.asset.v1.SearchAllResourcesRequest; -import com.google.protobuf.FieldMask; -import java.util.ArrayList; - -public class AsyncSearchAllResources { - - public static void main(String[] args) throws Exception { - asyncSearchAllResources(); - } - - public static void asyncSearchAllResources() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .addAllAssetTypes(new ArrayList()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setReadMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = - assetServiceClient.searchAllResourcesPagedCallable().futureCall(request); - // Do something. - for (ResourceSearchResult element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchallresources_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java deleted file mode 100644 index c025ac210b23..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchallresources_paged_async] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ResourceSearchResult; -import com.google.cloud.asset.v1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1.SearchAllResourcesResponse; -import com.google.common.base.Strings; -import com.google.protobuf.FieldMask; -import java.util.ArrayList; - -public class AsyncSearchAllResourcesPaged { - - public static void main(String[] args) throws Exception { - asyncSearchAllResourcesPaged(); - } - - public static void asyncSearchAllResourcesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .addAllAssetTypes(new ArrayList()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setReadMask(FieldMask.newBuilder().build()) - .build(); - while (true) { - SearchAllResourcesResponse response = - assetServiceClient.searchAllResourcesCallable().call(request); - for (ResourceSearchResult element : response.getResultsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchallresources_paged_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java deleted file mode 100644 index 5aeb9954d79d..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResources.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchallresources_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ResourceSearchResult; -import com.google.cloud.asset.v1.SearchAllResourcesRequest; -import com.google.protobuf.FieldMask; -import java.util.ArrayList; - -public class SyncSearchAllResources { - - public static void main(String[] args) throws Exception { - syncSearchAllResources(); - } - - public static void syncSearchAllResources() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .addAllAssetTypes(new ArrayList()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .setReadMask(FieldMask.newBuilder().build()) - .build(); - for (ResourceSearchResult element : - assetServiceClient.searchAllResources(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java deleted file mode 100644 index 7e87019e5db8..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.ResourceSearchResult; -import java.util.ArrayList; -import java.util.List; - -public class SyncSearchAllResourcesStringStringListstring { - - public static void main(String[] args) throws Exception { - syncSearchAllResourcesStringStringListstring(); - } - - public static void syncSearchAllResourcesStringStringListstring() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - for (ResourceSearchResult element : - assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java deleted file mode 100644 index 4239ca9a6609..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/AsyncUpdateFeed.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_updatefeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.UpdateFeedRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateFeed { - - public static void main(String[] args) throws Exception { - asyncUpdateFeed(); - } - - public static void asyncUpdateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - UpdateFeedRequest request = - UpdateFeedRequest.newBuilder() - .setFeed(Feed.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request); - // Do something. - Feed response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_updatefeed_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java deleted file mode 100644 index 691eb8a262af..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeed.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_updatefeed_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; -import com.google.cloud.asset.v1.UpdateFeedRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateFeed { - - public static void main(String[] args) throws Exception { - syncUpdateFeed(); - } - - public static void syncUpdateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - UpdateFeedRequest request = - UpdateFeedRequest.newBuilder() - .setFeed(Feed.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Feed response = assetServiceClient.updateFeed(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_updatefeed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java deleted file mode 100644 index dd9bbaba4035..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_updatefeed_feed_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.Feed; - -public class SyncUpdateFeedFeed { - - public static void main(String[] args) throws Exception { - syncUpdateFeedFeed(); - } - - public static void syncUpdateFeedFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - Feed feed = Feed.newBuilder().build(); - Feed response = assetServiceClient.updateFeed(feed); - } - } -} -// [END asset_v1_generated_assetserviceclient_updatefeed_feed_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java deleted file mode 100644 index 3a52188236dc..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/AsyncUpdateSavedQuery.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_updatesavedquery_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.UpdateSavedQueryRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateSavedQuery { - - public static void main(String[] args) throws Exception { - asyncUpdateSavedQuery(); - } - - public static void asyncUpdateSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - UpdateSavedQueryRequest request = - UpdateSavedQueryRequest.newBuilder() - .setSavedQuery(SavedQuery.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = - assetServiceClient.updateSavedQueryCallable().futureCall(request); - // Do something. - SavedQuery response = future.get(); - } - } -} -// [END asset_v1_generated_assetserviceclient_updatesavedquery_async] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java deleted file mode 100644 index 816b7610559a..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuery.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_updatesavedquery_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.cloud.asset.v1.UpdateSavedQueryRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateSavedQuery { - - public static void main(String[] args) throws Exception { - syncUpdateSavedQuery(); - } - - public static void syncUpdateSavedQuery() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - UpdateSavedQueryRequest request = - UpdateSavedQueryRequest.newBuilder() - .setSavedQuery(SavedQuery.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - SavedQuery response = assetServiceClient.updateSavedQuery(request); - } - } -} -// [END asset_v1_generated_assetserviceclient_updatesavedquery_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java deleted file mode 100644 index c1dd01afa306..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetserviceclient/updatesavedquery/SyncUpdateSavedQuerySavedqueryFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetserviceclient_updatesavedquery_savedqueryfieldmask_sync] -import com.google.cloud.asset.v1.AssetServiceClient; -import com.google.cloud.asset.v1.SavedQuery; -import com.google.protobuf.FieldMask; - -public class SyncUpdateSavedQuerySavedqueryFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateSavedQuerySavedqueryFieldmask(); - } - - public static void syncUpdateSavedQuerySavedqueryFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SavedQuery savedQuery = SavedQuery.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - SavedQuery response = assetServiceClient.updateSavedQuery(savedQuery, updateMask); - } - } -} -// [END asset_v1_generated_assetserviceclient_updatesavedquery_savedqueryfieldmask_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java deleted file mode 100644 index d7822c14a45e..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/assetservicesettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 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.v1.samples; - -// [START asset_v1_generated_assetservicesettings_batchgetassetshistory_sync] -import com.google.cloud.asset.v1.AssetServiceSettings; -import java.time.Duration; - -public class SyncBatchGetAssetsHistory { - - public static void main(String[] args) throws Exception { - syncBatchGetAssetsHistory(); - } - - public static void syncBatchGetAssetsHistory() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); - assetServiceSettingsBuilder - .batchGetAssetsHistorySettings() - .setRetrySettings( - assetServiceSettingsBuilder - .batchGetAssetsHistorySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1_generated_assetservicesettings_batchgetassetshistory_sync] diff --git a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java b/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java deleted file mode 100644 index 2458f13c3196..000000000000 --- a/owl-bot-staging/java-asset/v1/samples/snippets/generated/com/google/cloud/asset/v1/stub/assetservicestubsettings/batchgetassetshistory/SyncBatchGetAssetsHistory.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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.v1.stub.samples; - -// [START asset_v1_generated_assetservicestubsettings_batchgetassetshistory_sync] -import com.google.cloud.asset.v1.stub.AssetServiceStubSettings; -import java.time.Duration; - -public class SyncBatchGetAssetsHistory { - - public static void main(String[] args) throws Exception { - syncBatchGetAssetsHistory(); - } - - public static void syncBatchGetAssetsHistory() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceStubSettings.Builder assetServiceSettingsBuilder = - AssetServiceStubSettings.newBuilder(); - assetServiceSettingsBuilder - .batchGetAssetsHistorySettings() - .setRetrySettings( - assetServiceSettingsBuilder - .batchGetAssetsHistorySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1_generated_assetservicestubsettings_batchgetassetshistory_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java deleted file mode 100644 index 64ad4c7fdd09..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java +++ /dev/null @@ -1,735 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStub; -import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Asset service definition. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   String scope = "scope109264468";
- *   String query = "query107944136";
- *   List assetTypes = new ArrayList<>();
- *   for (StandardResourceMetadata element :
- *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
- *     // doThingsWith(element);
- *   }
- * }
- * }
- * - *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of AssetServiceSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceClient implements BackgroundResource { - private final AssetServiceSettings settings; - private final AssetServiceStub stub; - - /** Constructs an instance of AssetServiceClient with default settings. */ - public static final AssetServiceClient create() throws IOException { - return create(AssetServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { - return new AssetServiceClient(settings); - } - - /** - * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(AssetServiceSettings). - */ - public static final AssetServiceClient create(AssetServiceStub stub) { - return new AssetServiceClient(stub); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected AssetServiceClient(AssetServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected AssetServiceClient(AssetServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final AssetServiceSettings getSettings() { - return settings; - } - - public AssetServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the resources under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the resources under a scope, - * even if they don't have .get permission of all the resources. Callers should have - * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String scope = "scope109264468";
-   *   String query = "query107944136";
-   *   List assetTypes = new ArrayList<>();
-   *   for (StandardResourceMetadata element :
-   *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param scope Required. The relative name of an asset. The search is limited to the resources - * within the `scope`. The allowed value must be: - *
    - *
  • Organization number (such as "organizations/123") - *
  • Folder number(such as "folders/1234") - *
  • Project number (such as "projects/12345") - *
  • Project id (such as "projects/abc") - *
- * - * @param query Optional. The query statement. - * @param assetTypes Optional. A list of asset types that this request searches for. If empty, it - * will search all the supported asset types. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllResourcesPagedResponse searchAllResources( - String scope, String query, List assetTypes) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope(scope) - .setQuery(query) - .addAllAssetTypes(assetTypes) - .build(); - return searchAllResources(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the resources under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the resources under a scope, - * even if they don't have .get permission of all the resources. Callers should have - * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllResourcesRequest request =
-   *       SearchAllResourcesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   for (StandardResourceMetadata element :
-   *       assetServiceClient.searchAllResources(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllResourcesPagedResponse searchAllResources( - SearchAllResourcesRequest request) { - return searchAllResourcesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the resources under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the resources under a scope, - * even if they don't have .get permission of all the resources. Callers should have - * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllResourcesRequest request =
-   *       SearchAllResourcesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.searchAllResourcesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (StandardResourceMetadata element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllResourcesPagedCallable() { - return stub.searchAllResourcesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the resources under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the resources under a scope, - * even if they don't have .get permission of all the resources. Callers should have - * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllResourcesRequest request =
-   *       SearchAllResourcesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   while (true) {
-   *     SearchAllResourcesResponse response =
-   *         assetServiceClient.searchAllResourcesCallable().call(request);
-   *     for (StandardResourceMetadata element : response.getResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllResourcesCallable() { - return stub.searchAllResourcesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the IAM policies under a - * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should - * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String scope = "scope109264468";
-   *   String query = "query107944136";
-   *   for (IamPolicySearchResult element :
-   *       assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param scope Required. The relative name of an asset. The search is limited to the resources - * within the `scope`. The allowed value must be: - *
    - *
  • Organization number (such as "organizations/123") - *
  • Folder number(such as "folders/1234") - *
  • Project number (such as "projects/12345") - *
  • Project id (such as "projects/abc") - *
- * - * @param query Optional. The query statement. Examples: - *
    - *
  • "policy:myuser{@literal @}mydomain.com" - *
  • "policy:(myuser{@literal @}mydomain.com viewer)" - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder().setScope(scope).setQuery(query).build(); - return searchAllIamPolicies(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the IAM policies under a - * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should - * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllIamPoliciesRequest request =
-   *       SearchAllIamPoliciesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (IamPolicySearchResult element :
-   *       assetServiceClient.searchAllIamPolicies(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( - SearchAllIamPoliciesRequest request) { - return searchAllIamPoliciesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the IAM policies under a - * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should - * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllIamPoliciesRequest request =
-   *       SearchAllIamPoliciesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (IamPolicySearchResult element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllIamPoliciesPagedCallable() { - return stub.searchAllIamPoliciesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization). - * This RPC gives callers especially admins the ability to search all the IAM policies under a - * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should - * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be - * rejected. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   SearchAllIamPoliciesRequest request =
-   *       SearchAllIamPoliciesRequest.newBuilder()
-   *           .setScope("scope109264468")
-   *           .setQuery("query107944136")
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     SearchAllIamPoliciesResponse response =
-   *         assetServiceClient.searchAllIamPoliciesCallable().call(request);
-   *     for (IamPolicySearchResult element : response.getResultsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - searchAllIamPoliciesCallable() { - return stub.searchAllIamPoliciesCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class SearchAllResourcesPagedResponse - extends AbstractPagedListResponse< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - StandardResourceMetadata, - SearchAllResourcesPage, - SearchAllResourcesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - SearchAllResourcesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new SearchAllResourcesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private SearchAllResourcesPagedResponse(SearchAllResourcesPage page) { - super(page, SearchAllResourcesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class SearchAllResourcesPage - extends AbstractPage< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - StandardResourceMetadata, - SearchAllResourcesPage> { - - private SearchAllResourcesPage( - PageContext - context, - SearchAllResourcesResponse response) { - super(context, response); - } - - private static SearchAllResourcesPage createEmptyPage() { - return new SearchAllResourcesPage(null, null); - } - - @Override - protected SearchAllResourcesPage createPage( - PageContext - context, - SearchAllResourcesResponse response) { - return new SearchAllResourcesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class SearchAllResourcesFixedSizeCollection - extends AbstractFixedSizeCollection< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - StandardResourceMetadata, - SearchAllResourcesPage, - SearchAllResourcesFixedSizeCollection> { - - private SearchAllResourcesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static SearchAllResourcesFixedSizeCollection createEmptyCollection() { - return new SearchAllResourcesFixedSizeCollection(null, 0); - } - - @Override - protected SearchAllResourcesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new SearchAllResourcesFixedSizeCollection(pages, collectionSize); - } - } - - public static class SearchAllIamPoliciesPagedResponse - extends AbstractPagedListResponse< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult, - SearchAllIamPoliciesPage, - SearchAllIamPoliciesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - SearchAllIamPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new SearchAllIamPoliciesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private SearchAllIamPoliciesPagedResponse(SearchAllIamPoliciesPage page) { - super(page, SearchAllIamPoliciesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class SearchAllIamPoliciesPage - extends AbstractPage< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult, - SearchAllIamPoliciesPage> { - - private SearchAllIamPoliciesPage( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - SearchAllIamPoliciesResponse response) { - super(context, response); - } - - private static SearchAllIamPoliciesPage createEmptyPage() { - return new SearchAllIamPoliciesPage(null, null); - } - - @Override - protected SearchAllIamPoliciesPage createPage( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - SearchAllIamPoliciesResponse response) { - return new SearchAllIamPoliciesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class SearchAllIamPoliciesFixedSizeCollection - extends AbstractFixedSizeCollection< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult, - SearchAllIamPoliciesPage, - SearchAllIamPoliciesFixedSizeCollection> { - - private SearchAllIamPoliciesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static SearchAllIamPoliciesFixedSizeCollection createEmptyCollection() { - return new SearchAllIamPoliciesFixedSizeCollection(null, 0); - } - - @Override - protected SearchAllIamPoliciesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new SearchAllIamPoliciesFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java deleted file mode 100644 index dbfedba29787..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1; - -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStubSettings; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of searchAllResources to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .searchAllResourcesSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to searchAllResources. */ - public PagedCallSettings< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).searchAllResourcesSettings(); - } - - /** Returns the object with the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return ((AssetServiceStubSettings) getStubSettings()).searchAllIamPoliciesSettings(); - } - - public static final AssetServiceSettings create(AssetServiceStubSettings stub) - throws IOException { - return new AssetServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AssetServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AssetServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AssetServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AssetServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AssetServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(AssetServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(AssetServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AssetServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(AssetServiceStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); - } - - public AssetServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AssetServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to searchAllResources. */ - public PagedCallSettings.Builder< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return getStubSettingsBuilder().searchAllResourcesSettings(); - } - - /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings.Builder< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return getStubSettingsBuilder().searchAllIamPoliciesSettings(); - } - - @Override - public AssetServiceSettings build() throws IOException { - return new AssetServiceSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json deleted file mode 100644 index 2e1ed2b4d3a3..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/gapic_metadata.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.asset.v1p1beta1", - "libraryPackage": "com.google.cloud.asset.v1p1beta1", - "services": { - "AssetService": { - "clients": { - "grpc": { - "libraryClient": "AssetServiceClient", - "rpcs": { - "SearchAllIamPolicies": { - "methods": ["searchAllIamPolicies", "searchAllIamPolicies", "searchAllIamPoliciesPagedCallable", "searchAllIamPoliciesCallable"] - }, - "SearchAllResources": { - "methods": ["searchAllResources", "searchAllResources", "searchAllResourcesPagedCallable", "searchAllResourcesCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java deleted file mode 100644 index 59e064f89e2a..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= AssetServiceClient ======================= - * - *

Service Description: Asset service definition. - * - *

Sample for AssetServiceClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   String scope = "scope109264468";
- *   String query = "query107944136";
- *   List assetTypes = new ArrayList<>();
- *   for (StandardResourceMetadata element :
- *       assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
- *     // doThingsWith(element);
- *   }
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.asset.v1p1beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java deleted file mode 100644 index ff4b535cb198..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.stub; - -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class AssetServiceStub implements BackgroundResource { - - public UnaryCallable - searchAllResourcesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllResourcesPagedCallable()"); - } - - public UnaryCallable - searchAllResourcesCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllResourcesCallable()"); - } - - public UnaryCallable - searchAllIamPoliciesPagedCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesPagedCallable()"); - } - - public UnaryCallable - searchAllIamPoliciesCallable() { - throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java deleted file mode 100644 index 3636ae123faf..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.stub; - -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; -import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of searchAllResources to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
- *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .searchAllResourcesSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings; - private final PagedCallSettings< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings; - - private static final PagedListDescriptor< - SearchAllResourcesRequest, SearchAllResourcesResponse, StandardResourceMetadata> - SEARCH_ALL_RESOURCES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchAllResourcesRequest, SearchAllResourcesResponse, StandardResourceMetadata>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public SearchAllResourcesRequest injectToken( - SearchAllResourcesRequest payload, String token) { - return SearchAllResourcesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public SearchAllResourcesRequest injectPageSize( - SearchAllResourcesRequest payload, int pageSize) { - return SearchAllResourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(SearchAllResourcesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(SearchAllResourcesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - SearchAllResourcesResponse payload) { - return payload.getResultsList() == null - ? ImmutableList.of() - : payload.getResultsList(); - } - }; - - private static final PagedListDescriptor< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult> - SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC = - new PagedListDescriptor< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse, IamPolicySearchResult>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public SearchAllIamPoliciesRequest injectToken( - SearchAllIamPoliciesRequest payload, String token) { - return SearchAllIamPoliciesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public SearchAllIamPoliciesRequest injectPageSize( - SearchAllIamPoliciesRequest payload, int pageSize) { - return SearchAllIamPoliciesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(SearchAllIamPoliciesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(SearchAllIamPoliciesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - SearchAllIamPoliciesResponse payload) { - return payload.getResultsList() == null - ? ImmutableList.of() - : payload.getResultsList(); - } - }; - - private static final PagedListResponseFactory< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - SEARCH_ALL_RESOURCES_PAGE_STR_FACT = - new PagedListResponseFactory< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - SearchAllResourcesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - SearchAllResourcesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - SearchAllResourcesRequest, - SearchAllResourcesResponse, - StandardResourceMetadata> - pageContext = - PageContext.create( - callable, SEARCH_ALL_RESOURCES_PAGE_STR_DESC, request, context); - return SearchAllResourcesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT = - new PagedListResponseFactory< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - SearchAllIamPoliciesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - IamPolicySearchResult> - pageContext = - PageContext.create( - callable, SEARCH_ALL_IAM_POLICIES_PAGE_STR_DESC, request, context); - return SearchAllIamPoliciesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to searchAllResources. */ - public PagedCallSettings< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return searchAllResourcesSettings; - } - - /** Returns the object with the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return searchAllIamPoliciesSettings; - } - - public AssetServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAssetServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonAssetServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "cloudasset.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "cloudasset.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build(); - searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build(); - } - - /** Builder for AssetServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings; - private final PagedCallSettings.Builder< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(15000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(15000L)) - .setTotalTimeout(Duration.ofMillis(15000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - searchAllResourcesSettings = PagedCallSettings.newBuilder(SEARCH_ALL_RESOURCES_PAGE_STR_FACT); - searchAllIamPoliciesSettings = - PagedCallSettings.newBuilder(SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - searchAllResourcesSettings, searchAllIamPoliciesSettings); - initDefaults(this); - } - - protected Builder(AssetServiceStubSettings settings) { - super(settings); - - searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder(); - searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - searchAllResourcesSettings, searchAllIamPoliciesSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .searchAllResourcesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .searchAllIamPoliciesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to searchAllResources. */ - public PagedCallSettings.Builder< - SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> - searchAllResourcesSettings() { - return searchAllResourcesSettings; - } - - /** Returns the builder for the settings used for calls to searchAllIamPolicies. */ - public PagedCallSettings.Builder< - SearchAllIamPoliciesRequest, - SearchAllIamPoliciesResponse, - SearchAllIamPoliciesPagedResponse> - searchAllIamPoliciesSettings() { - return searchAllIamPoliciesSettings; - } - - @Override - public AssetServiceStubSettings build() throws IOException { - return new AssetServiceStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java deleted file mode 100644 index 9a6b0cff432a..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java deleted file mode 100644 index 0f2e0b071dec..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.stub; - -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceStub extends AssetServiceStub { - private static final MethodDescriptor - searchAllResourcesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllResources") - .setRequestMarshaller( - ProtoUtils.marshaller(SearchAllResourcesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SearchAllResourcesResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - searchAllIamPoliciesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllIamPolicies") - .setRequestMarshaller( - ProtoUtils.marshaller(SearchAllIamPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(SearchAllIamPoliciesResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable - searchAllResourcesCallable; - private final UnaryCallable - searchAllResourcesPagedCallable; - private final UnaryCallable - searchAllIamPoliciesCallable; - private final UnaryCallable - searchAllIamPoliciesPagedCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { - return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAssetServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAssetServiceStub( - AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - searchAllResourcesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(searchAllResourcesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("scope", String.valueOf(request.getScope())); - return params.build(); - }) - .build(); - GrpcCallSettings - searchAllIamPoliciesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("scope", String.valueOf(request.getScope())); - return params.build(); - }) - .build(); - - this.searchAllResourcesCallable = - callableFactory.createUnaryCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllResourcesPagedCallable = - callableFactory.createPagedCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllIamPoliciesCallable = - callableFactory.createUnaryCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - this.searchAllIamPoliciesPagedCallable = - callableFactory.createPagedCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable - searchAllResourcesCallable() { - return searchAllResourcesCallable; - } - - @Override - public UnaryCallable - searchAllResourcesPagedCallable() { - return searchAllResourcesPagedCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesCallable() { - return searchAllIamPoliciesCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesPagedCallable() { - return searchAllIamPoliciesPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java deleted file mode 100644 index fc1a62cf8f7e..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonAssetServiceCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java deleted file mode 100644 index 403f13d0c07f..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/HttpJsonAssetServiceStub.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.stub; - -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonAssetServiceStub extends AssetServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - searchAllResourcesMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllResources") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p1beta1/{scope=*/*}/resources:searchAll", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "scope", request.getScope()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "assetTypes", request.getAssetTypesList()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "query", request.getQuery()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchAllResourcesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse> - searchAllIamPoliciesMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.cloud.asset.v1p1beta1.AssetService/SearchAllIamPolicies") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p1beta1/{scope=*/*}/iamPolicies:searchAll", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "scope", request.getScope()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "query", request.getQuery()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(SearchAllIamPoliciesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable - searchAllResourcesCallable; - private final UnaryCallable - searchAllResourcesPagedCallable; - private final UnaryCallable - searchAllIamPoliciesCallable; - private final UnaryCallable - searchAllIamPoliciesPagedCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonAssetServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonAssetServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings - searchAllResourcesTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(searchAllResourcesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - searchAllIamPoliciesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(searchAllIamPoliciesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.searchAllResourcesCallable = - callableFactory.createUnaryCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllResourcesPagedCallable = - callableFactory.createPagedCallable( - searchAllResourcesTransportSettings, - settings.searchAllResourcesSettings(), - clientContext); - this.searchAllIamPoliciesCallable = - callableFactory.createUnaryCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - this.searchAllIamPoliciesPagedCallable = - callableFactory.createPagedCallable( - searchAllIamPoliciesTransportSettings, - settings.searchAllIamPoliciesSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(searchAllResourcesMethodDescriptor); - methodDescriptors.add(searchAllIamPoliciesMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable - searchAllResourcesCallable() { - return searchAllResourcesCallable; - } - - @Override - public UnaryCallable - searchAllResourcesPagedCallable() { - return searchAllResourcesPagedCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesCallable() { - return searchAllIamPoliciesCallable; - } - - @Override - public UnaryCallable - searchAllIamPoliciesPagedCallable() { - return searchAllIamPoliciesPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java deleted file mode 100644 index 1a4adb9a8692..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientHttpJsonTest.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1; - -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.asset.v1p1beta1.stub.HttpJsonAssetServiceStub; -import com.google.common.collect.Lists; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonAssetServiceStub.getMethodDescriptors(), - AssetServiceSettings.getDefaultEndpoint()); - AssetServiceSettings settings = - AssetServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void searchAllResourcesTest() throws Exception { - StandardResourceMetadata responsesElement = StandardResourceMetadata.newBuilder().build(); - SearchAllResourcesResponse expectedResponse = - SearchAllResourcesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - - SearchAllResourcesPagedResponse pagedListResponse = - client.searchAllResources(scope, query, assetTypes); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void searchAllResourcesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - client.searchAllResources(scope, query, assetTypes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void searchAllIamPoliciesTest() throws Exception { - IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); - SearchAllIamPoliciesResponse expectedResponse = - SearchAllIamPoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - - SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void searchAllIamPoliciesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String scope = "scope-2319/scope-2319"; - String query = "query107944136"; - client.searchAllIamPolicies(scope, query); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java deleted file mode 100644 index 5313fde9d0c5..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1; - -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; -import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.protobuf.AbstractMessage; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientTest { - private static MockAssetService mockAssetService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockAssetService = new MockAssetService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - AssetServiceSettings settings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void searchAllResourcesTest() throws Exception { - StandardResourceMetadata responsesElement = StandardResourceMetadata.newBuilder().build(); - SearchAllResourcesResponse expectedResponse = - SearchAllResourcesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - - SearchAllResourcesPagedResponse pagedListResponse = - client.searchAllResources(scope, query, assetTypes); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SearchAllResourcesRequest actualRequest = ((SearchAllResourcesRequest) actualRequests.get(0)); - - Assert.assertEquals(scope, actualRequest.getScope()); - Assert.assertEquals(query, actualRequest.getQuery()); - Assert.assertEquals(assetTypes, actualRequest.getAssetTypesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void searchAllResourcesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - client.searchAllResources(scope, query, assetTypes); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void searchAllIamPoliciesTest() throws Exception { - IamPolicySearchResult responsesElement = IamPolicySearchResult.newBuilder().build(); - SearchAllIamPoliciesResponse expectedResponse = - SearchAllIamPoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllResults(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - String scope = "scope109264468"; - String query = "query107944136"; - - SearchAllIamPoliciesPagedResponse pagedListResponse = client.searchAllIamPolicies(scope, query); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - SearchAllIamPoliciesRequest actualRequest = - ((SearchAllIamPoliciesRequest) actualRequests.get(0)); - - Assert.assertEquals(scope, actualRequest.getScope()); - Assert.assertEquals(query, actualRequest.getQuery()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void searchAllIamPoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String scope = "scope109264468"; - String query = "query107944136"; - client.searchAllIamPolicies(scope, query); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java deleted file mode 100644 index bdfd8b9cb016..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetService implements MockGrpcService { - private final MockAssetServiceImpl serviceImpl; - - public MockAssetService() { - serviceImpl = new MockAssetServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java deleted file mode 100644 index a9c79fb093ce..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.asset.v1p1beta1.AssetServiceGrpc.AssetServiceImplBase; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetServiceImpl extends AssetServiceImplBase { - private List requests; - private Queue responses; - - public MockAssetServiceImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void searchAllResources( - SearchAllResourcesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SearchAllResourcesResponse) { - requests.add(request); - responseObserver.onNext(((SearchAllResourcesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SearchAllResources, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SearchAllResourcesResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void searchAllIamPolicies( - SearchAllIamPoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof SearchAllIamPoliciesResponse) { - requests.add(request); - responseObserver.onNext(((SearchAllIamPoliciesResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method SearchAllIamPolicies, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - SearchAllIamPoliciesResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java b/owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java deleted file mode 100644 index 73fe8769d725..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java +++ /dev/null @@ -1,429 +0,0 @@ -package com.google.cloud.asset.v1p1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Asset service definition.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/asset/v1p1beta1/asset_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AssetServiceGrpc { - - private AssetServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.asset.v1p1beta1.AssetService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getSearchAllResourcesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SearchAllResources", - requestType = com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.class, - responseType = com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSearchAllResourcesMethod() { - io.grpc.MethodDescriptor getSearchAllResourcesMethod; - if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getSearchAllResourcesMethod = AssetServiceGrpc.getSearchAllResourcesMethod) == null) { - AssetServiceGrpc.getSearchAllResourcesMethod = getSearchAllResourcesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllResources")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllResources")) - .build(); - } - } - } - return getSearchAllResourcesMethod; - } - - private static volatile io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SearchAllIamPolicies", - requestType = com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.class, - responseType = com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod() { - io.grpc.MethodDescriptor getSearchAllIamPoliciesMethod; - if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { - synchronized (AssetServiceGrpc.class) { - if ((getSearchAllIamPoliciesMethod = AssetServiceGrpc.getSearchAllIamPoliciesMethod) == null) { - AssetServiceGrpc.getSearchAllIamPoliciesMethod = getSearchAllIamPoliciesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAllIamPolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.getDefaultInstance())) - .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("SearchAllIamPolicies")) - .build(); - } - } - } - return getSearchAllIamPoliciesMethod; - } - - /** - * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { - - /** - *
-     * Searches all the resources under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the resources under a scope,
-     * even if they don't have .get permission of all the resources. Callers
-     * should have cloud.assets.SearchAllResources permission on the requested
-     * scope, otherwise it will be rejected.
-     * 
- */ - public void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllResourcesMethod(), responseObserver); - } - - /** - *
-     * Searches all the IAM policies under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the IAM policies under a scope,
-     * even if they don't have .getIamPolicy permission of all the IAM policies.
-     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
-     * requested scope, otherwise it will be rejected.
-     * 
- */ - public void searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAllIamPoliciesMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - 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>( - this, 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>( - this, METHODID_SEARCH_ALL_IAM_POLICIES))) - .build(); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * Searches all the resources under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the resources under a scope,
-     * even if they don't have .get permission of all the resources. Callers
-     * should have cloud.assets.SearchAllResources permission on the requested
-     * scope, otherwise it will be rejected.
-     * 
- */ - public void searchAllResources(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSearchAllResourcesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * Searches all the IAM policies under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the IAM policies under a scope,
-     * even if they don't have .getIamPolicy permission of all the IAM policies.
-     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
-     * requested scope, otherwise it will be rejected.
-     * 
- */ - public void searchAllIamPolicies(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * Searches all the resources under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the resources under a scope,
-     * even if they don't have .get permission of all the resources. Callers
-     * should have cloud.assets.SearchAllResources permission on the requested
-     * scope, otherwise it will be rejected.
-     * 
- */ - 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 under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the IAM policies under a scope,
-     * even if they don't have .getIamPolicy permission of all the IAM policies.
-     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
-     * requested scope, otherwise it will be rejected.
-     * 
- */ - 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); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * Searches all the resources under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the resources under a scope,
-     * even if they don't have .get permission of all the resources. Callers
-     * should have cloud.assets.SearchAllResources permission on the requested
-     * scope, otherwise it will be rejected.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture searchAllResources( - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSearchAllResourcesMethod(), getCallOptions()), request); - } - - /** - *
-     * Searches all the IAM policies under a given accessible CRM scope
-     * (project/folder/organization). This RPC gives callers
-     * especially admins the ability to search all the IAM policies under a scope,
-     * even if they don't have .getIamPolicy permission of all the IAM policies.
-     * Callers should have cloud.assets.SearchAllIamPolicies permission on the
-     * requested scope, otherwise it will be rejected.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture searchAllIamPolicies( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSearchAllIamPoliciesMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_SEARCH_ALL_RESOURCES = 0; - private static final int METHODID_SEARCH_ALL_IAM_POLICIES = 1; - - 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 AssetServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AssetServiceImplBase 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_SEARCH_ALL_RESOURCES: - serviceImpl.searchAllResources((com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SEARCH_ALL_IAM_POLICIES: - serviceImpl.searchAllIamPolicies((com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) 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(); - } - } - } - - private static abstract 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.v1p1beta1.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 String methodName; - - AssetServiceMethodDescriptorSupplier(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(getSearchAllResourcesMethod()) - .addMethod(getSearchAllIamPoliciesMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java deleted file mode 100644 index 4a68b91ba585..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java +++ /dev/null @@ -1,129 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/assets.proto - -package com.google.cloud.asset.v1p1beta1; - -public final class AssetProto { - private AssetProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/asset/v1p1beta1/assets.pr" + - "oto\022\034google.cloud.asset.v1p1beta1\032\032googl" + - "e/iam/v1/policy.proto\"\302\002\n\030StandardResour" + - "ceMetadata\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002" + - " \001(\t\022\017\n\007project\030\003 \001(\t\022\024\n\014display_name\030\004 " + - "\001(\t\022\023\n\013description\030\005 \001(\t\022\035\n\025additional_a" + - "ttributes\030\n \003(\t\022\020\n\010location\030\013 \001(\t\022R\n\006lab" + - "els\030\014 \003(\0132B.google.cloud.asset.v1p1beta1" + - ".StandardResourceMetadata.LabelsEntry\022\024\n" + - "\014network_tags\030\r \003(\t\032-\n\013LabelsEntry\022\013\n\003ke" + - "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\243\003\n\025IamPolicy" + - "SearchResult\022\020\n\010resource\030\001 \001(\t\022\017\n\007projec" + - "t\030\003 \001(\t\022%\n\006policy\030\004 \001(\0132\025.google.iam.v1." + - "Policy\022T\n\013explanation\030\005 \001(\0132?.google.clo" + - "ud.asset.v1p1beta1.IamPolicySearchResult" + - ".Explanation\032\351\001\n\013Explanation\022t\n\023matched_" + - "permissions\030\001 \003(\0132W.google.cloud.asset.v" + - "1p1beta1.IamPolicySearchResult.Explanati" + - "on.MatchedPermissionsEntry\032d\n\027MatchedPer" + - "missionsEntry\022\013\n\003key\030\001 \001(\t\0228\n\005value\030\002 \001(" + - "\0132).google.cloud.asset.v1p1beta1.Permiss" + - "ions:\0028\001\"\"\n\013Permissions\022\023\n\013permissions\030\001" + - " \003(\tB\264\001\n com.google.cloud.asset.v1p1beta" + - "1B\nAssetProtoP\001ZAgoogle.golang.org/genpr" + - "oto/googleapis/cloud/asset/v1p1beta1;ass" + - "et\370\001\001\252\002\034Google.Cloud.Asset.V1P1Beta1\312\002\034G" + - "oogle\\Cloud\\Asset\\V1p1beta1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.iam.v1.PolicyProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor, - new java.lang.String[] { "Name", "AssetType", "Project", "DisplayName", "Description", "AdditionalAttributes", "Location", "Labels", "NetworkTags", }); - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor = - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor, - new java.lang.String[] { "Resource", "Project", "Policy", "Explanation", }); - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor = - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor, - new java.lang.String[] { "MatchedPermissions", }); - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor = - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor, - new java.lang.String[] { "Permissions", }); - com.google.iam.v1.PolicyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java deleted file mode 100644 index 250866763a66..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java +++ /dev/null @@ -1,132 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -public final class AssetServiceProto { - private AssetServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n0google/cloud/asset/v1p1beta1/asset_ser" + - "vice.proto\022\034google.cloud.asset.v1p1beta1" + - "\032\034google/api/annotations.proto\032\027google/a" + - "pi/client.proto\032\037google/api/field_behavi" + - "or.proto\032)google/cloud/asset/v1p1beta1/a" + - "ssets.proto\"\245\001\n\031SearchAllResourcesReques" + - "t\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A" + - "\001\022\030\n\013asset_types\030\003 \003(\tB\003\340A\001\022\026\n\tpage_size" + - "\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\022\025\n\010" + - "order_by\030\n \001(\tB\003\340A\001\"~\n\032SearchAllResource" + - "sResponse\022G\n\007results\030\001 \003(\01326.google.clou" + - "d.asset.v1p1beta1.StandardResourceMetada" + - "ta\022\027\n\017next_page_token\030\002 \001(\t\"v\n\033SearchAll" + - "IamPoliciesRequest\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022" + - "\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340" + - "A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"}\n\034SearchAll" + - "IamPoliciesResponse\022D\n\007results\030\001 \003(\01323.g" + - "oogle.cloud.asset.v1p1beta1.IamPolicySea" + - "rchResult\022\027\n\017next_page_token\030\002 \001(\t2\211\004\n\014A" + - "ssetService\022\325\001\n\022SearchAllResources\0227.goo" + - "gle.cloud.asset.v1p1beta1.SearchAllResou" + - "rcesRequest\0328.google.cloud.asset.v1p1bet" + - "a1.SearchAllResourcesResponse\"L\202\323\344\223\002,\022*/" + - "v1p1beta1/{scope=*/*}/resources:searchAl" + - "l\332A\027scope,query,asset_types\022\321\001\n\024SearchAl" + - "lIamPolicies\0229.google.cloud.asset.v1p1be" + - "ta1.SearchAllIamPoliciesRequest\032:.google" + - ".cloud.asset.v1p1beta1.SearchAllIamPolic" + - "iesResponse\"B\202\323\344\223\002.\022,/v1p1beta1/{scope=*" + - "/*}/iamPolicies:searchAll\332A\013scope,query\032" + - "M\312A\031cloudasset.googleapis.com\322A.https://" + - "www.googleapis.com/auth/cloud-platformB\270" + - "\001\n com.google.cloud.asset.v1p1beta1B\021Ass" + - "etServiceProtoP\001ZAgoogle.golang.org/genp" + - "roto/googleapis/cloud/asset/v1p1beta1;as" + - "set\252\002\034Google.Cloud.Asset.V1P1Beta1\312\002\034Goo" + - "gle\\Cloud\\Asset\\V1p1beta1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.asset.v1p1beta1.AssetProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor, - new java.lang.String[] { "Scope", "Query", "AssetTypes", "PageSize", "PageToken", "OrderBy", }); - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor, - new java.lang.String[] { "Results", "NextPageToken", }); - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor, - new java.lang.String[] { "Scope", "Query", "PageSize", "PageToken", }); - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor, - new java.lang.String[] { "Results", "NextPageToken", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.asset.v1p1beta1.AssetProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java deleted file mode 100644 index f45a17763797..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java +++ /dev/null @@ -1,2204 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/assets.proto - -package com.google.cloud.asset.v1p1beta1; - -/** - *
- * The result for a IAM Policy search.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult} - */ -public final class IamPolicySearchResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult) - IamPolicySearchResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use IamPolicySearchResult.newBuilder() to construct. - private IamPolicySearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private IamPolicySearchResult() { - resource_ = ""; - project_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new IamPolicySearchResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IamPolicySearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 34: { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder subBuilder = null; - if (explanation_ != null) { - subBuilder = explanation_.toBuilder(); - } - explanation_ = input.readMessage(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(explanation_); - explanation_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder.class); - } - - public interface ExplanationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - int getMatchedPermissionsCount(); - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - boolean containsMatchedPermissions( - java.lang.String key); - /** - * Use {@link #getMatchedPermissionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getMatchedPermissions(); - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - java.util.Map - getMatchedPermissionsMap(); - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - - /* nullable */ -com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrDefault( - java.lang.String key, - /* nullable */ -com.google.cloud.asset.v1p1beta1.Permissions defaultValue); - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - - com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrThrow( - java.lang.String key); - } - /** - *
-   * Explanation about the IAM policy search result.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation} - */ - public static final class Explanation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) - ExplanationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Explanation.newBuilder() to construct. - private Explanation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Explanation() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Explanation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Explanation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - matchedPermissions_ = com.google.protobuf.MapField.newMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - matchedPermissions__ = input.readMessage( - MatchedPermissionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - matchedPermissions_.getMutableMap().put( - matchedPermissions__.getKey(), matchedPermissions__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetMatchedPermissions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder.class); - } - - public static final int MATCHED_PERMISSIONS_FIELD_NUMBER = 1; - private static final class MatchedPermissionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.asset.v1p1beta1.Permissions.getDefaultInstance()); - } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> matchedPermissions_; - private com.google.protobuf.MapField - internalGetMatchedPermissions() { - if (matchedPermissions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - } - return matchedPermissions_; - } - - public int getMatchedPermissionsCount() { - return internalGetMatchedPermissions().getMap().size(); - } - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - - @java.lang.Override - public boolean containsMatchedPermissions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetMatchedPermissions().getMap().containsKey(key); - } - /** - * Use {@link #getMatchedPermissionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMatchedPermissions() { - return getMatchedPermissionsMap(); - } - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public java.util.Map getMatchedPermissionsMap() { - return internalGetMatchedPermissions().getMap(); - } - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrDefault( - java.lang.String key, - com.google.cloud.asset.v1p1beta1.Permissions defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * The map from roles to their included permission matching the permission
-     * query (e.g. containing `policy.role.permissions:`). A sample role string:
-     * "roles/compute.instanceAdmin". The roles can also be found in the
-     * returned `policy` bindings. Note that the map is populated only if
-     * requesting with a permission query.
-     * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetMatchedPermissions(), - MatchedPermissionsDefaultEntryHolder.defaultEntry, - 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry - : internalGetMatchedPermissions().getMap().entrySet()) { - com.google.protobuf.MapEntry - matchedPermissions__ = MatchedPermissionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, matchedPermissions__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation other = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) obj; - - if (!internalGetMatchedPermissions().equals( - other.internalGetMatchedPermissions())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetMatchedPermissions().getMap().isEmpty()) { - hash = (37 * hash) + MATCHED_PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetMatchedPermissions().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Explanation about the IAM policy search result.
-     * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 1: - return internalGetMatchedPermissions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 1: - return internalGetMutableMatchedPermissions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableMatchedPermissions().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_Explanation_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation build() { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation buildPartial() { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation result = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation(this); - int from_bitField0_ = bitField0_; - result.matchedPermissions_ = internalGetMatchedPermissions(); - result.matchedPermissions_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation other) { - if (other == com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance()) return this; - internalGetMutableMatchedPermissions().mergeFrom( - other.internalGetMatchedPermissions()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.asset.v1p1beta1.Permissions> matchedPermissions_; - private com.google.protobuf.MapField - internalGetMatchedPermissions() { - if (matchedPermissions_ == null) { - return com.google.protobuf.MapField.emptyMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - } - return matchedPermissions_; - } - private com.google.protobuf.MapField - internalGetMutableMatchedPermissions() { - onChanged();; - if (matchedPermissions_ == null) { - matchedPermissions_ = com.google.protobuf.MapField.newMapField( - MatchedPermissionsDefaultEntryHolder.defaultEntry); - } - if (!matchedPermissions_.isMutable()) { - matchedPermissions_ = matchedPermissions_.copy(); - } - return matchedPermissions_; - } - - public int getMatchedPermissionsCount() { - return internalGetMatchedPermissions().getMap().size(); - } - /** - *
-       * The map from roles to their included permission matching the permission
-       * query (e.g. containing `policy.role.permissions:`). A sample role string:
-       * "roles/compute.instanceAdmin". The roles can also be found in the
-       * returned `policy` bindings. Note that the map is populated only if
-       * requesting with a permission query.
-       * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - - @java.lang.Override - public boolean containsMatchedPermissions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetMatchedPermissions().getMap().containsKey(key); - } - /** - * Use {@link #getMatchedPermissionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getMatchedPermissions() { - return getMatchedPermissionsMap(); - } - /** - *
-       * The map from roles to their included permission matching the permission
-       * query (e.g. containing `policy.role.permissions:`). A sample role string:
-       * "roles/compute.instanceAdmin". The roles can also be found in the
-       * returned `policy` bindings. Note that the map is populated only if
-       * requesting with a permission query.
-       * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public java.util.Map getMatchedPermissionsMap() { - return internalGetMatchedPermissions().getMap(); - } - /** - *
-       * The map from roles to their included permission matching the permission
-       * query (e.g. containing `policy.role.permissions:`). A sample role string:
-       * "roles/compute.instanceAdmin". The roles can also be found in the
-       * returned `policy` bindings. Note that the map is populated only if
-       * requesting with a permission query.
-       * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrDefault( - java.lang.String key, - com.google.cloud.asset.v1p1beta1.Permissions defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * The map from roles to their included permission matching the permission
-       * query (e.g. containing `policy.role.permissions:`). A sample role string:
-       * "roles/compute.instanceAdmin". The roles can also be found in the
-       * returned `policy` bindings. Note that the map is populated only if
-       * requesting with a permission query.
-       * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - @java.lang.Override - - public com.google.cloud.asset.v1p1beta1.Permissions getMatchedPermissionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetMatchedPermissions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearMatchedPermissions() { - internalGetMutableMatchedPermissions().getMutableMap() - .clear(); - return this; - } - /** - *
-       * The map from roles to their included permission matching the permission
-       * query (e.g. containing `policy.role.permissions:`). A sample role string:
-       * "roles/compute.instanceAdmin". The roles can also be found in the
-       * returned `policy` bindings. Note that the map is populated only if
-       * requesting with a permission query.
-       * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - - public Builder removeMatchedPermissions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableMatchedPermissions().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableMatchedPermissions() { - return internalGetMutableMatchedPermissions().getMutableMap(); - } - /** - *
-       * The map from roles to their included permission matching the permission
-       * query (e.g. containing `policy.role.permissions:`). A sample role string:
-       * "roles/compute.instanceAdmin". The roles can also be found in the
-       * returned `policy` bindings. Note that the map is populated only if
-       * requesting with a permission query.
-       * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - public Builder putMatchedPermissions( - java.lang.String key, - com.google.cloud.asset.v1p1beta1.Permissions value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableMatchedPermissions().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * The map from roles to their included permission matching the permission
-       * query (e.g. containing `policy.role.permissions:`). A sample role string:
-       * "roles/compute.instanceAdmin". The roles can also be found in the
-       * returned `policy` bindings. Note that the map is populated only if
-       * requesting with a permission query.
-       * 
- * - * map<string, .google.cloud.asset.v1p1beta1.Permissions> matched_permissions = 1; - */ - - public Builder putAllMatchedPermissions( - java.util.Map values) { - internalGetMutableMatchedPermissions().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation) - private static final com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation(); - } - - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Explanation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Explanation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int RESOURCE_FIELD_NUMBER = 1; - private volatile java.lang.Object resource_; - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * of the resource associated with this IAM policy.
-   * 
- * - * string resource = 1; - * @return The resource. - */ - @java.lang.Override - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } - } - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * of the resource associated with this IAM policy.
-   * 
- * - * string resource = 1; - * @return The bytes for resource. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 3; - private volatile java.lang.Object project_; - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, the project field will be empty.
-   * 
- * - * string project = 3; - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } - } - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, the project field will be empty.
-   * 
- * - * string project = 3; - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POLICY_FIELD_NUMBER = 4; - private com.google.iam.v1.Policy policy_; - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g. an empty query), this contains all the bindings.
-   * 
- * - * .google.iam.v1.Policy policy = 4; - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g. an empty query), this contains all the bindings.
-   * 
- * - * .google.iam.v1.Policy policy = 4; - * @return The policy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getPolicy() { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g. an empty query), this contains all the bindings.
-   * 
- * - * .google.iam.v1.Policy policy = 4; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - public static final int EXPLANATION_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation_; - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - * @return Whether the explanation field is set. - */ - @java.lang.Override - public boolean hasExplanation() { - return explanation_ != null; - } - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - * @return The explanation. - */ - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getExplanation() { - return explanation_ == null ? com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; - } - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { - return getExplanation(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); - } - if (policy_ != null) { - output.writeMessage(4, getPolicy()); - } - if (explanation_ != null) { - output.writeMessage(5, getExplanation()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); - } - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPolicy()); - } - if (explanation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getExplanation()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult other = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) obj; - - if (!getResource() - .equals(other.getResource())) return false; - if (!getProject() - .equals(other.getProject())) return false; - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy() - .equals(other.getPolicy())) return false; - } - if (hasExplanation() != other.hasExplanation()) return false; - if (hasExplanation()) { - if (!getExplanation() - .equals(other.getExplanation())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - if (hasExplanation()) { - hash = (37 * hash) + EXPLANATION_FIELD_NUMBER; - hash = (53 * hash) + getExplanation().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The result for a IAM Policy search.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult) - com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.class, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resource_ = ""; - - project_ = ""; - - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - if (explanationBuilder_ == null) { - explanation_ = null; - } else { - explanation_ = null; - explanationBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult build() { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult buildPartial() { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult result = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult(this); - result.resource_ = resource_; - result.project_ = project_; - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.build(); - } - if (explanationBuilder_ == null) { - result.explanation_ = explanation_; - } else { - result.explanation_ = explanationBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.IamPolicySearchResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult other) { - if (other == com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance()) return this; - if (!other.getResource().isEmpty()) { - resource_ = other.resource_; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - onChanged(); - } - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - if (other.hasExplanation()) { - mergeExplanation(other.getExplanation()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object resource_ = ""; - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * of the resource associated with this IAM policy.
-     * 
- * - * string resource = 1; - * @return The resource. - */ - public java.lang.String getResource() { - java.lang.Object ref = resource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resource_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * of the resource associated with this IAM policy.
-     * 
- * - * string resource = 1; - * @return The bytes for resource. - */ - public com.google.protobuf.ByteString - getResourceBytes() { - java.lang.Object ref = resource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * of the resource associated with this IAM policy.
-     * 
- * - * string resource = 1; - * @param value The resource to set. - * @return This builder for chaining. - */ - public Builder setResource( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resource_ = value; - onChanged(); - return this; - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * of the resource associated with this IAM policy.
-     * 
- * - * string resource = 1; - * @return This builder for chaining. - */ - public Builder clearResource() { - - resource_ = getDefaultInstance().getResource(); - onChanged(); - return this; - } - /** - *
-     * The [full resource
-     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * of the resource associated with this IAM policy.
-     * 
- * - * string resource = 1; - * @param value The bytes for resource to set. - * @return This builder for chaining. - */ - public Builder setResourceBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resource_ = value; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, the project field will be empty.
-     * 
- * - * string project = 3; - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, the project field will be empty.
-     * 
- * - * string project = 3; - * @return The bytes for project. - */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, the project field will be empty.
-     * 
- * - * string project = 3; - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - project_ = value; - onChanged(); - return this; - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, the project field will be empty.
-     * 
- * - * string project = 3; - * @return This builder for chaining. - */ - public Builder clearProject() { - - project_ = getDefaultInstance().getProject(); - onChanged(); - return this; - } - /** - *
-     * The project that the associated GCP resource belongs to, in the form of
-     * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-     * instance, Cloud Storage bucket), the project field will indicate the
-     * project that contains the resource. If an IAM policy is set on a folder or
-     * orgnization, the project field will be empty.
-     * 
- * - * string project = 3; - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - project_ = value; - onChanged(); - return this; - } - - private com.google.iam.v1.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> policyBuilder_; - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - * @return The policy. - */ - public com.google.iam.v1.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - */ - public Builder setPolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - */ - public Builder setPolicy( - com.google.iam.v1.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - */ - public Builder mergePolicy(com.google.iam.v1.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - */ - public com.google.iam.v1.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - */ - public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null ? - com.google.iam.v1.Policy.getDefaultInstance() : policy_; - } - } - /** - *
-     * The IAM policy directly set on the given resource. Note that the original
-     * IAM policy can contain multiple bindings. This only contains the bindings
-     * that match the given query. For queries that don't contain a constrain on
-     * policies (e.g. an empty query), this contains all the bindings.
-     * 
- * - * .google.iam.v1.Policy policy = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( - getPolicy(), - getParentForChildren(), - isClean()); - policy_ = null; - } - return policyBuilder_; - } - - private com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder> explanationBuilder_; - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - * @return Whether the explanation field is set. - */ - public boolean hasExplanation() { - return explanationBuilder_ != null || explanation_ != null; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - * @return The explanation. - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getExplanation() { - if (explanationBuilder_ == null) { - return explanation_ == null ? com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; - } else { - return explanationBuilder_.getMessage(); - } - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - public Builder setExplanation(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation value) { - if (explanationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - explanation_ = value; - onChanged(); - } else { - explanationBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - public Builder setExplanation( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder builderForValue) { - if (explanationBuilder_ == null) { - explanation_ = builderForValue.build(); - onChanged(); - } else { - explanationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - public Builder mergeExplanation(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation value) { - if (explanationBuilder_ == null) { - if (explanation_ != null) { - explanation_ = - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.newBuilder(explanation_).mergeFrom(value).buildPartial(); - } else { - explanation_ = value; - } - onChanged(); - } else { - explanationBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - public Builder clearExplanation() { - if (explanationBuilder_ == null) { - explanation_ = null; - onChanged(); - } else { - explanation_ = null; - explanationBuilder_ = null; - } - - return this; - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder getExplanationBuilder() { - - onChanged(); - return getExplanationFieldBuilder().getBuilder(); - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder() { - if (explanationBuilder_ != null) { - return explanationBuilder_.getMessageOrBuilder(); - } else { - return explanation_ == null ? - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.getDefaultInstance() : explanation_; - } - } - /** - *
-     * Explanation about the IAM policy search result. It contains additional
-     * information to explain why the search result matches the query.
-     * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder> - getExplanationFieldBuilder() { - if (explanationBuilder_ == null) { - explanationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder>( - getExplanation(), - getParentForChildren(), - isClean()); - explanation_ = null; - } - return explanationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult) - private static final com.google.cloud.asset.v1p1beta1.IamPolicySearchResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult(); - } - - public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public IamPolicySearchResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IamPolicySearchResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java deleted file mode 100644 index 66b38341f7d0..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java +++ /dev/null @@ -1,127 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/assets.proto - -package com.google.cloud.asset.v1p1beta1; - -public interface IamPolicySearchResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.IamPolicySearchResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * of the resource associated with this IAM policy.
-   * 
- * - * string resource = 1; - * @return The resource. - */ - java.lang.String getResource(); - /** - *
-   * The [full resource
-   * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * of the resource associated with this IAM policy.
-   * 
- * - * string resource = 1; - * @return The bytes for resource. - */ - com.google.protobuf.ByteString - getResourceBytes(); - - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, the project field will be empty.
-   * 
- * - * string project = 3; - * @return The project. - */ - java.lang.String getProject(); - /** - *
-   * The project that the associated GCP resource belongs to, in the form of
-   * `projects/{project_number}`. If an IAM policy is set on a resource (like VM
-   * instance, Cloud Storage bucket), the project field will indicate the
-   * project that contains the resource. If an IAM policy is set on a folder or
-   * orgnization, the project field will be empty.
-   * 
- * - * string project = 3; - * @return The bytes for project. - */ - com.google.protobuf.ByteString - getProjectBytes(); - - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g. an empty query), this contains all the bindings.
-   * 
- * - * .google.iam.v1.Policy policy = 4; - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g. an empty query), this contains all the bindings.
-   * 
- * - * .google.iam.v1.Policy policy = 4; - * @return The policy. - */ - com.google.iam.v1.Policy getPolicy(); - /** - *
-   * The IAM policy directly set on the given resource. Note that the original
-   * IAM policy can contain multiple bindings. This only contains the bindings
-   * that match the given query. For queries that don't contain a constrain on
-   * policies (e.g. an empty query), this contains all the bindings.
-   * 
- * - * .google.iam.v1.Policy policy = 4; - */ - com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder(); - - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - * @return Whether the explanation field is set. - */ - boolean hasExplanation(); - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - * @return The explanation. - */ - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation getExplanation(); - /** - *
-   * Explanation about the IAM policy search result. It contains additional
-   * information to explain why the search result matches the query.
-   * 
- * - * .google.cloud.asset.v1p1beta1.IamPolicySearchResult.Explanation explanation = 5; - */ - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.ExplanationOrBuilder getExplanationOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java deleted file mode 100644 index 41af01602502..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/Permissions.java +++ /dev/null @@ -1,676 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/assets.proto - -package com.google.cloud.asset.v1p1beta1; - -/** - *
- * IAM permissions
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.Permissions} - */ -public final class Permissions extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.Permissions) - PermissionsOrBuilder { -private static final long serialVersionUID = 0L; - // Use Permissions.newBuilder() to construct. - private Permissions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Permissions() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Permissions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Permissions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.Permissions.class, com.google.cloud.asset.v1p1beta1.Permissions.Builder.class); - } - - public static final int PERMISSIONS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList permissions_; - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList - getPermissionsList() { - return permissions_; - } - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString - getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < permissions_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < permissions_.size(); i++) { - dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); - } - size += dataSize; - size += 1 * getPermissionsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.Permissions)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.Permissions other = (com.google.cloud.asset.v1p1beta1.Permissions) obj; - - if (!getPermissionsList() - .equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPermissionsCount() > 0) { - hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; - hash = (53 * hash) + getPermissionsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.Permissions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.Permissions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * IAM permissions
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.Permissions} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.Permissions) - com.google.cloud.asset.v1p1beta1.PermissionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.Permissions.class, com.google.cloud.asset.v1p1beta1.Permissions.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.Permissions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_Permissions_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.Permissions getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.Permissions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.Permissions build() { - com.google.cloud.asset.v1p1beta1.Permissions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.Permissions buildPartial() { - com.google.cloud.asset.v1p1beta1.Permissions result = new com.google.cloud.asset.v1p1beta1.Permissions(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.permissions_ = permissions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.Permissions) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.Permissions)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.Permissions other) { - if (other == com.google.cloud.asset.v1p1beta1.Permissions.getDefaultInstance()) return this; - if (!other.permissions_.isEmpty()) { - if (permissions_.isEmpty()) { - permissions_ = other.permissions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePermissionsIsMutable(); - permissions_.addAll(other.permissions_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.Permissions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.Permissions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensurePermissionsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @return A list containing the permissions. - */ - public com.google.protobuf.ProtocolStringList - getPermissionsList() { - return permissions_.getUnmodifiableView(); - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @return The count of permissions. - */ - public int getPermissionsCount() { - return permissions_.size(); - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - public java.lang.String getPermissions(int index) { - return permissions_.get(index); - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - public com.google.protobuf.ByteString - getPermissionsBytes(int index) { - return permissions_.getByteString(index); - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @param index The index to set the value at. - * @param value The permissions to set. - * @return This builder for chaining. - */ - public Builder setPermissions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @param value The permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @param values The permissions to add. - * @return This builder for chaining. - */ - public Builder addAllPermissions( - java.lang.Iterable values) { - ensurePermissionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, permissions_); - onChanged(); - return this; - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @return This builder for chaining. - */ - public Builder clearPermissions() { - permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of permissions. A sample permission string: "compute.disk.get".
-     * 
- * - * repeated string permissions = 1; - * @param value The bytes of the permissions to add. - * @return This builder for chaining. - */ - public Builder addPermissionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensurePermissionsIsMutable(); - permissions_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.Permissions) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.Permissions) - private static final com.google.cloud.asset.v1p1beta1.Permissions DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.Permissions(); - } - - public static com.google.cloud.asset.v1p1beta1.Permissions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Permissions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Permissions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.Permissions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java deleted file mode 100644 index ef7bee9844a3..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/PermissionsOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/assets.proto - -package com.google.cloud.asset.v1p1beta1; - -public interface PermissionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.Permissions) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @return A list containing the permissions. - */ - java.util.List - getPermissionsList(); - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @return The count of permissions. - */ - int getPermissionsCount(); - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @param index The index of the element to return. - * @return The permissions at the given index. - */ - java.lang.String getPermissions(int index); - /** - *
-   * A list of permissions. A sample permission string: "compute.disk.get".
-   * 
- * - * repeated string permissions = 1; - * @param index The index of the value to return. - * @return The bytes of the permissions at the given index. - */ - com.google.protobuf.ByteString - getPermissionsBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java deleted file mode 100644 index 6c2f777c0701..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java +++ /dev/null @@ -1,1096 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -/** - *
- * Search all IAM policies request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} - */ -public final class SearchAllIamPoliciesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) - SearchAllIamPoliciesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllIamPoliciesRequest.newBuilder() to construct. - private SearchAllIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllIamPoliciesRequest() { - scope_ = ""; - query_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllIamPoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllIamPoliciesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - scope_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 24: { - - pageSize_ = input.readInt32(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.Builder.class); - } - - public static final int SCOPE_FIELD_NUMBER = 1; - private volatile java.lang.Object scope_; - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - @java.lang.Override - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } - } - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_FIELD_NUMBER = 2; - private volatile java.lang.Object query_; - /** - *
-   * Optional. The query statement.
-   * Examples:
-   * * "policy:myuser@mydomain.com"
-   * * "policy:(myuser@mydomain.com viewer)"
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } - } - /** - *
-   * Optional. The query statement.
-   * Examples:
-   * * "policy:myuser@mydomain.com"
-   * * "policy:(myuser@mydomain.com viewer)"
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 3; - private int pageSize_; - /** - *
-   * Optional. The page size for search result pagination. Page size is capped at 500 even
-   * if a larger value is given. If set to zero, server will pick an appropriate
-   * default. Returned results may be fewer than requested. When this happens,
-   * there could be more results as long as `next_page_token` is returned.
-   * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 4; - private volatile java.lang.Object pageToken_; - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding call to
-   * this method. `page_token` must be the value of `next_page_token` from the
-   * previous response. The values of all other method parameters must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding call to
-   * this method. `page_token` must be the value of `next_page_token` from the
-   * previous response. The values of all other method parameters must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); - } - if (pageSize_ != 0) { - output.writeInt32(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest other = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) obj; - - if (!getScope() - .equals(other.getScope())) return false; - if (!getQuery() - .equals(other.getQuery())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScope().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all IAM policies request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - query_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest build() { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest result = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(this); - result.scope_ = scope_; - result.query_ = query_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.getDefaultInstance()) return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object scope_ = ""; - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - scope_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearScope() { - - scope_ = getDefaultInstance().getScope(); - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - scope_ = value; - onChanged(); - return this; - } - - private java.lang.Object query_ = ""; - /** - *
-     * Optional. The query statement.
-     * Examples:
-     * * "policy:myuser@mydomain.com"
-     * * "policy:(myuser@mydomain.com viewer)"
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. The query statement.
-     * Examples:
-     * * "policy:myuser@mydomain.com"
-     * * "policy:(myuser@mydomain.com viewer)"
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. The query statement.
-     * Examples:
-     * * "policy:myuser@mydomain.com"
-     * * "policy:(myuser@mydomain.com viewer)"
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - query_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement.
-     * Examples:
-     * * "policy:myuser@mydomain.com"
-     * * "policy:(myuser@mydomain.com viewer)"
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearQuery() { - - query_ = getDefaultInstance().getQuery(); - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement.
-     * Examples:
-     * * "policy:myuser@mydomain.com"
-     * * "policy:(myuser@mydomain.com viewer)"
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for query to set. - * @return This builder for chaining. - */ - public Builder setQueryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - query_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Optional. The page size for search result pagination. Page size is capped at 500 even
-     * if a larger value is given. If set to zero, server will pick an appropriate
-     * default. Returned results may be fewer than requested. When this happens,
-     * there could be more results as long as `next_page_token` is returned.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped at 500 even
-     * if a larger value is given. If set to zero, server will pick an appropriate
-     * default. Returned results may be fewer than requested. When this happens,
-     * there could be more results as long as `next_page_token` is returned.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped at 500 even
-     * if a larger value is given. If set to zero, server will pick an appropriate
-     * default. Returned results may be fewer than requested. When this happens,
-     * there could be more results as long as `next_page_token` is returned.
-     * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding call to
-     * this method. `page_token` must be the value of `next_page_token` from the
-     * previous response. The values of all other method parameters must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding call to
-     * this method. `page_token` must be the value of `next_page_token` from the
-     * previous response. The values of all other method parameters must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding call to
-     * this method. `page_token` must be the value of `next_page_token` from the
-     * previous response. The values of all other method parameters must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding call to
-     * this method. `page_token` must be the value of `next_page_token` from the
-     * previous response. The values of all other method parameters must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Optional. If present, retrieve the next batch of results from the preceding call to
-     * this method. `page_token` must be the value of `next_page_token` from the
-     * previous response. The values of all other method parameters must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) - private static final com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest(); - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllIamPoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java deleted file mode 100644 index afcbed816785..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -public interface SearchAllIamPoliciesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - java.lang.String getScope(); - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - com.google.protobuf.ByteString - getScopeBytes(); - - /** - *
-   * Optional. The query statement.
-   * Examples:
-   * * "policy:myuser@mydomain.com"
-   * * "policy:(myuser@mydomain.com viewer)"
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - java.lang.String getQuery(); - /** - *
-   * Optional. The query statement.
-   * Examples:
-   * * "policy:myuser@mydomain.com"
-   * * "policy:(myuser@mydomain.com viewer)"
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - com.google.protobuf.ByteString - getQueryBytes(); - - /** - *
-   * Optional. The page size for search result pagination. Page size is capped at 500 even
-   * if a larger value is given. If set to zero, server will pick an appropriate
-   * default. Returned results may be fewer than requested. When this happens,
-   * there could be more results as long as `next_page_token` is returned.
-   * 
- * - * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding call to
-   * this method. `page_token` must be the value of `next_page_token` from the
-   * previous response. The values of all other method parameters must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Optional. If present, retrieve the next batch of results from the preceding call to
-   * this method. `page_token` must be the value of `next_page_token` from the
-   * previous response. The values of all other method parameters must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java deleted file mode 100644 index 7b8d7fddff71..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java +++ /dev/null @@ -1,1075 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -/** - *
- * Search all IAM policies response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} - */ -public final class SearchAllIamPoliciesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) - SearchAllIamPoliciesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllIamPoliciesResponse.newBuilder() to construct. - private SearchAllIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllIamPoliciesResponse() { - results_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllIamPoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllIamPoliciesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.Builder.class); - } - - public static final int RESULTS_FIELD_NUMBER = 1; - private java.util.List results_; - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) { - return results_.get(index); - } - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse other = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) obj; - - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all IAM policies response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse build() { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse result = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.getDefaultInstance()) return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder> resultsBuilder_; - - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder addResults(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder addResults( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance()); - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance()); - } - /** - *
-     * A list of IamPolicy that match the search query. Related information such
-     * as the associated resource is returned along with the policy.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder, com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Set if there are more results than those appearing in this response; to get
-     * the next set of results, call this method again, using this value as the
-     * `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) - private static final com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse(); - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllIamPoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllIamPoliciesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java deleted file mode 100644 index eb39db5c90dd..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -public interface SearchAllIamPoliciesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - java.util.List - getResultsList(); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - int getResultsCount(); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * A list of IamPolicy that match the search query. Related information such
-   * as the associated resource is returned along with the policy.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1; - */ - com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Set if there are more results than those appearing in this response; to get
-   * the next set of results, call this method again, using this value as the
-   * `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java deleted file mode 100644 index 026f16c774fc..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java +++ /dev/null @@ -1,1522 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -/** - *
- * Search all resources request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} - */ -public final class SearchAllResourcesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) - SearchAllResourcesRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllResourcesRequest.newBuilder() to construct. - private SearchAllResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllResourcesRequest() { - scope_ = ""; - query_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - pageToken_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllResourcesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllResourcesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - scope_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: { - - pageSize_ = input.readInt32(); - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.Builder.class); - } - - public static final int SCOPE_FIELD_NUMBER = 1; - private volatile java.lang.Object scope_; - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - @java.lang.Override - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } - } - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int QUERY_FIELD_NUMBER = 2; - private volatile java.lang.Object query_; - /** - *
-   * Optional. The query statement.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } - } - /** - *
-   * Optional. The query statement.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - *
-   * Optional. The page size for search result pagination. Page size is capped at 500 even
-   * if a larger value is given. If set to zero, server will pick an appropriate
-   * default. Returned results may be fewer than requested. When this happens,
-   * there could be more results as long as `next_page_token` is returned.
-   * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 5; - private volatile java.lang.Object pageToken_; - /** - *
-   * Optional. If present, then retrieve the next batch of results from the preceding call
-   * to this method.  `page_token` must be the value of `next_page_token` from
-   * the previous response. The values of all other method parameters, must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * Optional. If present, then retrieve the next batch of results from the preceding call
-   * to this method.  `page_token` must be the value of `next_page_token` from
-   * the previous response. The values of all other method parameters, must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 10; - private volatile java.lang.Object orderBy_; - /** - *
-   * Optional. A comma separated list of fields specifying the sorting order of the
-   * results. The default order is ascending. Add " desc" after the field name
-   * to indicate descending order. Redundant space characters are ignored. For
-   * example, "  foo ,  bar  desc  ".
-   * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - *
-   * Optional. A comma separated list of fields specifying the sorting order of the
-   * results. The default order is ascending. Add " desc" after the field name
-   * to indicate descending order. Redundant space characters are ignored. For
-   * example, "  foo ,  bar  desc  ".
-   * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, orderBy_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scope_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, orderBy_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest other = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) obj; - - if (!getScope() - .equals(other.getScope())) return false; - if (!getQuery() - .equals(other.getQuery())) return false; - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!getOrderBy() - .equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + getScope().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all resources request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - scope_ = ""; - - query_ = ""; - - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - pageSize_ = 0; - - pageToken_ = ""; - - orderBy_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest build() { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest result = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(this); - int from_bitField0_ = bitField0_; - result.scope_ = scope_; - result.query_ = query_; - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.orderBy_ = orderBy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.getDefaultInstance()) return this; - if (!other.getScope().isEmpty()) { - scope_ = other.scope_; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - onChanged(); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object scope_ = ""; - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - public java.lang.String getScope() { - java.lang.Object ref = scope_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - scope_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - public com.google.protobuf.ByteString - getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The scope to set. - * @return This builder for chaining. - */ - public Builder setScope( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - scope_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearScope() { - - scope_ = getDefaultInstance().getScope(); - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of an asset. The search is limited to the resources
-     * within the `scope`. The allowed value must be:
-     * * Organization number (such as "organizations/123")
-     * * Folder number(such as "folders/1234")
-     * * Project number (such as "projects/12345")
-     * * Project id (such as "projects/abc")
-     * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for scope to set. - * @return This builder for chaining. - */ - public Builder setScopeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - scope_ = value; - onChanged(); - return this; - } - - private java.lang.Object query_ = ""; - /** - *
-     * Optional. The query statement.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. The query statement.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - public com.google.protobuf.ByteString - getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. The query statement.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - query_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearQuery() { - - query_ = getDefaultInstance().getQuery(); - onChanged(); - return this; - } - /** - *
-     * Optional. The query statement.
-     * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for query to set. - * @return This builder for chaining. - */ - public Builder setQueryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - query_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Optional. A list of asset types that this request searches for. If empty, it will
-     * search all the supported asset types.
-     * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * Optional. The page size for search result pagination. Page size is capped at 500 even
-     * if a larger value is given. If set to zero, server will pick an appropriate
-     * default. Returned results may be fewer than requested. When this happens,
-     * there could be more results as long as `next_page_token` is returned.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped at 500 even
-     * if a larger value is given. If set to zero, server will pick an appropriate
-     * default. Returned results may be fewer than requested. When this happens,
-     * there could be more results as long as `next_page_token` is returned.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. The page size for search result pagination. Page size is capped at 500 even
-     * if a larger value is given. If set to zero, server will pick an appropriate
-     * default. Returned results may be fewer than requested. When this happens,
-     * there could be more results as long as `next_page_token` is returned.
-     * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * Optional. If present, then retrieve the next batch of results from the preceding call
-     * to this method.  `page_token` must be the value of `next_page_token` from
-     * the previous response. The values of all other method parameters, must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the preceding call
-     * to this method.  `page_token` must be the value of `next_page_token` from
-     * the previous response. The values of all other method parameters, must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the preceding call
-     * to this method.  `page_token` must be the value of `next_page_token` from
-     * the previous response. The values of all other method parameters, must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the preceding call
-     * to this method.  `page_token` must be the value of `next_page_token` from
-     * the previous response. The values of all other method parameters, must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * Optional. If present, then retrieve the next batch of results from the preceding call
-     * to this method.  `page_token` must be the value of `next_page_token` from
-     * the previous response. The values of all other method parameters, must be
-     * identical to those in the previous call.
-     * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - *
-     * Optional. A comma separated list of fields specifying the sorting order of the
-     * results. The default order is ascending. Add " desc" after the field name
-     * to indicate descending order. Redundant space characters are ignored. For
-     * example, "  foo ,  bar  desc  ".
-     * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Optional. A comma separated list of fields specifying the sorting order of the
-     * results. The default order is ascending. Add " desc" after the field name
-     * to indicate descending order. Redundant space characters are ignored. For
-     * example, "  foo ,  bar  desc  ".
-     * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString - getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Optional. A comma separated list of fields specifying the sorting order of the
-     * results. The default order is ascending. Add " desc" after the field name
-     * to indicate descending order. Redundant space characters are ignored. For
-     * example, "  foo ,  bar  desc  ".
-     * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - *
-     * Optional. A comma separated list of fields specifying the sorting order of the
-     * results. The default order is ascending. Add " desc" after the field name
-     * to indicate descending order. Redundant space characters are ignored. For
-     * example, "  foo ,  bar  desc  ".
-     * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - *
-     * Optional. A comma separated list of fields specifying the sorting order of the
-     * results. The default order is ascending. Add " desc" after the field name
-     * to indicate descending order. Redundant space characters are ignored. For
-     * example, "  foo ,  bar  desc  ".
-     * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) - private static final com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest(); - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllResourcesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java deleted file mode 100644 index ac30746283bf..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java +++ /dev/null @@ -1,169 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -public interface SearchAllResourcesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The scope. - */ - java.lang.String getScope(); - /** - *
-   * Required. The relative name of an asset. The search is limited to the resources
-   * within the `scope`. The allowed value must be:
-   * * Organization number (such as "organizations/123")
-   * * Folder number(such as "folders/1234")
-   * * Project number (such as "projects/12345")
-   * * Project id (such as "projects/abc")
-   * 
- * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for scope. - */ - com.google.protobuf.ByteString - getScopeBytes(); - - /** - *
-   * Optional. The query statement.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The query. - */ - java.lang.String getQuery(); - /** - *
-   * Optional. The query statement.
-   * 
- * - * string query = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for query. - */ - com.google.protobuf.ByteString - getQueryBytes(); - - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * Optional. A list of asset types that this request searches for. If empty, it will
-   * search all the supported asset types.
-   * 
- * - * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Optional. The page size for search result pagination. Page size is capped at 500 even
-   * if a larger value is given. If set to zero, server will pick an appropriate
-   * default. Returned results may be fewer than requested. When this happens,
-   * there could be more results as long as `next_page_token` is returned.
-   * 
- * - * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * Optional. If present, then retrieve the next batch of results from the preceding call
-   * to this method.  `page_token` must be the value of `next_page_token` from
-   * the previous response. The values of all other method parameters, must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * Optional. If present, then retrieve the next batch of results from the preceding call
-   * to this method.  `page_token` must be the value of `next_page_token` from
-   * the previous response. The values of all other method parameters, must be
-   * identical to those in the previous call.
-   * 
- * - * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); - - /** - *
-   * Optional. A comma separated list of fields specifying the sorting order of the
-   * results. The default order is ascending. Add " desc" after the field name
-   * to indicate descending order. Redundant space characters are ignored. For
-   * example, "  foo ,  bar  desc  ".
-   * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - *
-   * Optional. A comma separated list of fields specifying the sorting order of the
-   * results. The default order is ascending. Add " desc" after the field name
-   * to indicate descending order. Redundant space characters are ignored. For
-   * example, "  foo ,  bar  desc  ".
-   * 
- * - * string order_by = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString - getOrderByBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java deleted file mode 100644 index ddd19c83b0cc..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java +++ /dev/null @@ -1,1052 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -/** - *
- * Search all resources response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} - */ -public final class SearchAllResourcesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) - SearchAllResourcesResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use SearchAllResourcesResponse.newBuilder() to construct. - private SearchAllResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SearchAllResourcesResponse() { - results_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SearchAllResourcesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SearchAllResourcesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.parser(), extensionRegistry)); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.Builder.class); - } - - public static final int RESULTS_FIELD_NUMBER = 1; - private java.util.List results_; - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - @java.lang.Override - public java.util.List getResultsList() { - return results_; - } - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - @java.lang.Override - public java.util.List - getResultsOrBuilderList() { - return results_; - } - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - @java.lang.Override - public int getResultsCount() { - return results_.size(); - } - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) { - return results_.get(index); - } - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder( - int index) { - return results_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included.  To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included.  To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < results_.size(); i++) { - output.writeMessage(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < results_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, results_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse other = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) obj; - - if (!getResultsList() - .equals(other.getResultsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getResultsCount() > 0) { - hash = (37 * hash) + RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getResultsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Search all resources response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.class, com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - resultsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse build() { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse buildPartial() { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse result = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(this); - int from_bitField0_ = bitField0_; - if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.results_ = results_; - } else { - result.results_ = resultsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse other) { - if (other == com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.getDefaultInstance()) return this; - if (resultsBuilder_ == null) { - if (!other.results_.isEmpty()) { - if (results_.isEmpty()) { - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureResultsIsMutable(); - results_.addAll(other.results_); - } - onChanged(); - } - } else { - if (!other.results_.isEmpty()) { - if (resultsBuilder_.isEmpty()) { - resultsBuilder_.dispose(); - resultsBuilder_ = null; - results_ = other.results_; - bitField0_ = (bitField0_ & ~0x00000001); - resultsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getResultsFieldBuilder() : null; - } else { - resultsBuilder_.addAllMessages(other.results_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List results_ = - java.util.Collections.emptyList(); - private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - results_ = new java.util.ArrayList(results_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder> resultsBuilder_; - - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public java.util.List getResultsList() { - if (resultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(results_); - } else { - return resultsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public int getResultsCount() { - if (resultsBuilder_ == null) { - return results_.size(); - } else { - return resultsBuilder_.getCount(); - } - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) { - if (resultsBuilder_ == null) { - return results_.get(index); - } else { - return resultsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.set(index, value); - onChanged(); - } else { - resultsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder setResults( - int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.set(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder addResults(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(value); - onChanged(); - } else { - resultsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) { - if (resultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureResultsIsMutable(); - results_.add(index, value); - onChanged(); - } else { - resultsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder addResults( - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder addResults( - int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.add(index, builderForValue.build()); - onChanged(); - } else { - resultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder addAllResults( - java.lang.Iterable values) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, results_); - onChanged(); - } else { - resultsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder clearResults() { - if (resultsBuilder_ == null) { - results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - resultsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public Builder removeResults(int index) { - if (resultsBuilder_ == null) { - ensureResultsIsMutable(); - results_.remove(index); - onChanged(); - } else { - resultsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder getResultsBuilder( - int index) { - return getResultsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder( - int index) { - if (resultsBuilder_ == null) { - return results_.get(index); } else { - return resultsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public java.util.List - getResultsOrBuilderList() { - if (resultsBuilder_ != null) { - return resultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(results_); - } - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder() { - return getResultsFieldBuilder().addBuilder( - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance()); - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder( - int index) { - return getResultsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance()); - } - /** - *
-     * A list of resource that match the search query.
-     * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - public java.util.List - getResultsBuilderList() { - return getResultsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder> - getResultsFieldBuilder() { - if (resultsBuilder_ == null) { - resultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder, com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>( - results_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - results_ = null; - } - return resultsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included.  To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included.  To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included.  To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included.  To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * If there are more results than those appearing in this response, then
-     * `next_page_token` is included.  To get the next set of results, call this
-     * method again using the value of `next_page_token` as `page_token`.
-     * 
- * - * string next_page_token = 2; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) - private static final com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse(); - } - - public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAllResourcesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchAllResourcesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java deleted file mode 100644 index cea3d70ab592..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/asset_service.proto - -package com.google.cloud.asset.v1p1beta1; - -public interface SearchAllResourcesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - java.util.List - getResultsList(); - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index); - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - int getResultsCount(); - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - java.util.List - getResultsOrBuilderList(); - /** - *
-   * A list of resource that match the search query.
-   * 
- * - * repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1; - */ - com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder( - int index); - - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included.  To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * If there are more results than those appearing in this response, then
-   * `next_page_token` is included.  To get the next set of results, call this
-   * method again using the value of `next_page_token` as `page_token`.
-   * 
- * - * string next_page_token = 2; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java deleted file mode 100644 index f69059be507c..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java +++ /dev/null @@ -1,2389 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/assets.proto - -package com.google.cloud.asset.v1p1beta1; - -/** - *
- * The standard metadata of a cloud resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.StandardResourceMetadata} - */ -public final class StandardResourceMetadata extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.StandardResourceMetadata) - StandardResourceMetadataOrBuilder { -private static final long serialVersionUID = 0L; - // Use StandardResourceMetadata.newBuilder() to construct. - private StandardResourceMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private StandardResourceMetadata() { - name_ = ""; - assetType_ = ""; - project_ = ""; - displayName_ = ""; - description_ = ""; - additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - location_ = ""; - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new StandardResourceMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private StandardResourceMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - additionalAttributes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - additionalAttributes_.add(s); - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 98: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - labels__ = input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put( - labels__.getKey(), labels__.getValue()); - break; - } - case 106: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - networkTags_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - additionalAttributes_ = additionalAttributes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 12: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.class, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The full resource name. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The full resource name. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of this resource.
-   * For example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of this resource.
-   * For example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 3; - private volatile java.lang.Object project_; - /** - *
-   * The project that this resource belongs to, in the form of
-   * `projects/{project_number}`.
-   * 
- * - * string project = 3; - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } - } - /** - *
-   * The project that this resource belongs to, in the form of
-   * `projects/{project_number}`.
-   * 
- * - * string project = 3; - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object displayName_; - /** - *
-   * The display name of this resource.
-   * 
- * - * string display_name = 4; - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - *
-   * The display name of this resource.
-   * 
- * - * string display_name = 4; - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 5; - private volatile java.lang.Object description_; - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes.
-   * 
- * - * string description = 5; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes.
-   * 
- * - * string description = 5; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDITIONAL_ATTRIBUTES_FIELD_NUMBER = 10; - private com.google.protobuf.LazyStringList additionalAttributes_; - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @return A list containing the additionalAttributes. - */ - public com.google.protobuf.ProtocolStringList - getAdditionalAttributesList() { - return additionalAttributes_; - } - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @return The count of additionalAttributes. - */ - public int getAdditionalAttributesCount() { - return additionalAttributes_.size(); - } - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @param index The index of the element to return. - * @return The additionalAttributes at the given index. - */ - public java.lang.String getAdditionalAttributes(int index) { - return additionalAttributes_.get(index); - } - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @param index The index of the value to return. - * @return The bytes of the additionalAttributes at the given index. - */ - public com.google.protobuf.ByteString - getAdditionalAttributesBytes(int index) { - return additionalAttributes_.getByteString(index); - } - - public static final int LOCATION_FIELD_NUMBER = 11; - private volatile java.lang.Object location_; - /** - *
-   * Location can be "global", regional like "us-east1", or zonal like
-   * "us-west1-b".
-   * 
- * - * string location = 11; - * @return The location. - */ - @java.lang.Override - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } - } - /** - *
-   * Location can be "global", regional like "us-east1", or zonal like
-   * "us-west1-b".
-   * 
- * - * string location = 11; - * @return The bytes for location. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABELS_FIELD_NUMBER = 12; - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int NETWORK_TAGS_FIELD_NUMBER = 13; - private com.google.protobuf.LazyStringList networkTags_; - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @return A list containing the networkTags. - */ - public com.google.protobuf.ProtocolStringList - getNetworkTagsList() { - return networkTags_; - } - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @return The count of networkTags. - */ - public int getNetworkTagsCount() { - return networkTags_.size(); - } - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - public java.lang.String getNetworkTags(int index) { - return networkTags_.get(index); - } - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - public com.google.protobuf.ByteString - getNetworkTagsBytes(int index) { - return networkTags_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); - } - for (int i = 0; i < additionalAttributes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, additionalAttributes_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, location_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetLabels(), - LabelsDefaultEntryHolder.defaultEntry, - 12); - for (int i = 0; i < networkTags_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, networkTags_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); - } - { - int dataSize = 0; - for (int i = 0; i < additionalAttributes_.size(); i++) { - dataSize += computeStringSizeNoTag(additionalAttributes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAdditionalAttributesList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, location_); - } - for (java.util.Map.Entry entry - : internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry - labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, labels__); - } - { - int dataSize = 0; - for (int i = 0; i < networkTags_.size(); i++) { - dataSize += computeStringSizeNoTag(networkTags_.getRaw(i)); - } - size += dataSize; - size += 1 * getNetworkTagsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p1beta1.StandardResourceMetadata)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata other = (com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (!getProject() - .equals(other.getProject())) return false; - if (!getDisplayName() - .equals(other.getDisplayName())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (!getAdditionalAttributesList() - .equals(other.getAdditionalAttributesList())) return false; - if (!getLocation() - .equals(other.getLocation())) return false; - if (!internalGetLabels().equals( - other.internalGetLabels())) return false; - if (!getNetworkTagsList() - .equals(other.getNetworkTagsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (getAdditionalAttributesCount() > 0) { - hash = (37 * hash) + ADDITIONAL_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getAdditionalAttributesList().hashCode(); - } - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - if (getNetworkTagsCount() > 0) { - hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; - hash = (53 * hash) + getNetworkTagsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The standard metadata of a cloud resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p1beta1.StandardResourceMetadata} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p1beta1.StandardResourceMetadata) - com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 12: - return internalGetLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 12: - return internalGetMutableLabels(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.class, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assetType_ = ""; - - project_ = ""; - - displayName_ = ""; - - description_ = ""; - - additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - location_ = ""; - - internalGetMutableLabels().clear(); - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p1beta1.AssetProto.internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getDefaultInstanceForType() { - return com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata build() { - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata buildPartial() { - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata result = new com.google.cloud.asset.v1p1beta1.StandardResourceMetadata(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.assetType_ = assetType_; - result.project_ = project_; - result.displayName_ = displayName_; - result.description_ = description_; - if (((bitField0_ & 0x00000001) != 0)) { - additionalAttributes_ = additionalAttributes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.additionalAttributes_ = additionalAttributes_; - result.location_ = location_; - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - if (((bitField0_ & 0x00000004) != 0)) { - networkTags_ = networkTags_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.networkTags_ = networkTags_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) { - return mergeFrom((com.google.cloud.asset.v1p1beta1.StandardResourceMetadata)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata other) { - if (other == com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.additionalAttributes_.isEmpty()) { - if (additionalAttributes_.isEmpty()) { - additionalAttributes_ = other.additionalAttributes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdditionalAttributesIsMutable(); - additionalAttributes_.addAll(other.additionalAttributes_); - } - onChanged(); - } - if (!other.getLocation().isEmpty()) { - location_ = other.location_; - onChanged(); - } - internalGetMutableLabels().mergeFrom( - other.internalGetLabels()); - if (!other.networkTags_.isEmpty()) { - if (networkTags_.isEmpty()) { - networkTags_ = other.networkTags_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureNetworkTagsIsMutable(); - networkTags_.addAll(other.networkTags_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The full resource name. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full resource name. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full resource name. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The full resource name. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The full resource name. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of this resource.
-     * For example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of this resource.
-     * For example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of this resource.
-     * For example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of this resource.
-     * For example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of this resource.
-     * For example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - *
-     * The project that this resource belongs to, in the form of
-     * `projects/{project_number}`.
-     * 
- * - * string project = 3; - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * `projects/{project_number}`.
-     * 
- * - * string project = 3; - * @return The bytes for project. - */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * `projects/{project_number}`.
-     * 
- * - * string project = 3; - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - project_ = value; - onChanged(); - return this; - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * `projects/{project_number}`.
-     * 
- * - * string project = 3; - * @return This builder for chaining. - */ - public Builder clearProject() { - - project_ = getDefaultInstance().getProject(); - onChanged(); - return this; - } - /** - *
-     * The project that this resource belongs to, in the form of
-     * `projects/{project_number}`.
-     * 
- * - * string project = 3; - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - project_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - *
-     * The display name of this resource.
-     * 
- * - * string display_name = 4; - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The display name of this resource.
-     * 
- * - * string display_name = 4; - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString - getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The display name of this resource.
-     * 
- * - * string display_name = 4; - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; - onChanged(); - return this; - } - /** - *
-     * The display name of this resource.
-     * 
- * - * string display_name = 4; - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - *
-     * The display name of this resource.
-     * 
- * - * string display_name = 4; - * @param value The bytes for displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - displayName_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes.
-     * 
- * - * string description = 5; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes.
-     * 
- * - * string description = 5; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes.
-     * 
- * - * string description = 5; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes.
-     * 
- * - * string description = 5; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-     * One or more paragraphs of text description of this resource. Maximum length
-     * could be up to 1M bytes.
-     * 
- * - * string description = 5; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAdditionalAttributesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - additionalAttributes_ = new com.google.protobuf.LazyStringArrayList(additionalAttributes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @return A list containing the additionalAttributes. - */ - public com.google.protobuf.ProtocolStringList - getAdditionalAttributesList() { - return additionalAttributes_.getUnmodifiableView(); - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @return The count of additionalAttributes. - */ - public int getAdditionalAttributesCount() { - return additionalAttributes_.size(); - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @param index The index of the element to return. - * @return The additionalAttributes at the given index. - */ - public java.lang.String getAdditionalAttributes(int index) { - return additionalAttributes_.get(index); - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @param index The index of the value to return. - * @return The bytes of the additionalAttributes at the given index. - */ - public com.google.protobuf.ByteString - getAdditionalAttributesBytes(int index) { - return additionalAttributes_.getByteString(index); - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @param index The index to set the value at. - * @param value The additionalAttributes to set. - * @return This builder for chaining. - */ - public Builder setAdditionalAttributes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalAttributesIsMutable(); - additionalAttributes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @param value The additionalAttributes to add. - * @return This builder for chaining. - */ - public Builder addAdditionalAttributes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalAttributesIsMutable(); - additionalAttributes_.add(value); - onChanged(); - return this; - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @param values The additionalAttributes to add. - * @return This builder for chaining. - */ - public Builder addAllAdditionalAttributes( - java.lang.Iterable values) { - ensureAdditionalAttributesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, additionalAttributes_); - onChanged(); - return this; - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @return This builder for chaining. - */ - public Builder clearAdditionalAttributes() { - additionalAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Additional searchable attributes of this resource.
-     * Informational only. The exact set of attributes is subject to change.
-     * For example: project id, DNS name etc.
-     * 
- * - * repeated string additional_attributes = 10; - * @param value The bytes of the additionalAttributes to add. - * @return This builder for chaining. - */ - public Builder addAdditionalAttributesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAdditionalAttributesIsMutable(); - additionalAttributes_.add(value); - onChanged(); - return this; - } - - private java.lang.Object location_ = ""; - /** - *
-     * Location can be "global", regional like "us-east1", or zonal like
-     * "us-west1-b".
-     * 
- * - * string location = 11; - * @return The location. - */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Location can be "global", regional like "us-east1", or zonal like
-     * "us-west1-b".
-     * 
- * - * string location = 11; - * @return The bytes for location. - */ - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Location can be "global", regional like "us-east1", or zonal like
-     * "us-west1-b".
-     * 
- * - * string location = 11; - * @param value The location to set. - * @return This builder for chaining. - */ - public Builder setLocation( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - location_ = value; - onChanged(); - return this; - } - /** - *
-     * Location can be "global", regional like "us-east1", or zonal like
-     * "us-west1-b".
-     * 
- * - * string location = 11; - * @return This builder for chaining. - */ - public Builder clearLocation() { - - location_ = getDefaultInstance().getLocation(); - onChanged(); - return this; - } - /** - *
-     * Location can be "global", regional like "us-east1", or zonal like
-     * "us-west1-b".
-     * 
- * - * string location = 11; - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - location_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> labels_; - private com.google.protobuf.MapField - internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged();; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField( - LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * map<string, string> labels = 12; - */ - - @java.lang.Override - public boolean containsLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetLabels().getMap().containsKey(key); - } - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * map<string, string> labels = 12; - */ - @java.lang.Override - - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * map<string, string> labels = 12; - */ - @java.lang.Override - - public java.lang.String getLabelsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * map<string, string> labels = 12; - */ - @java.lang.Override - - public java.lang.String getLabelsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap() - .clear(); - return this; - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * map<string, string> labels = 12; - */ - - public Builder removeLabels( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableLabels().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * map<string, string> labels = 12; - */ - public Builder putLabels( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableLabels().getMutableMap() - .put(key, value); - return this; - } - /** - *
-     * Labels associated with this resource. See [Labelling and grouping GCP
-     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * map<string, string> labels = 12; - */ - - public Builder putAllLabels( - java.util.Map values) { - internalGetMutableLabels().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.LazyStringList networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureNetworkTagsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); - bitField0_ |= 0x00000004; - } - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @return A list containing the networkTags. - */ - public com.google.protobuf.ProtocolStringList - getNetworkTagsList() { - return networkTags_.getUnmodifiableView(); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @return The count of networkTags. - */ - public int getNetworkTagsCount() { - return networkTags_.size(); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - public java.lang.String getNetworkTags(int index) { - return networkTags_.get(index); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - public com.google.protobuf.ByteString - getNetworkTagsBytes(int index) { - return networkTags_.getByteString(index); - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @param index The index to set the value at. - * @param value The networkTags to set. - * @return This builder for chaining. - */ - public Builder setNetworkTags( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworkTagsIsMutable(); - networkTags_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @param value The networkTags to add. - * @return This builder for chaining. - */ - public Builder addNetworkTags( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNetworkTagsIsMutable(); - networkTags_.add(value); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @param values The networkTags to add. - * @return This builder for chaining. - */ - public Builder addAllNetworkTags( - java.lang.Iterable values) { - ensureNetworkTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, networkTags_); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @return This builder for chaining. - */ - public Builder clearNetworkTags() { - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * Network tags associated with this resource. Like labels, network tags are a
-     * type of annotations used to group GCP resources. See [Labelling GCP
-     * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-     * for more information.
-     * 
- * - * repeated string network_tags = 13; - * @param value The bytes of the networkTags to add. - * @return This builder for chaining. - */ - public Builder addNetworkTagsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureNetworkTagsIsMutable(); - networkTags_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p1beta1.StandardResourceMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.StandardResourceMetadata) - private static final com.google.cloud.asset.v1p1beta1.StandardResourceMetadata DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.StandardResourceMetadata(); - } - - public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StandardResourceMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StandardResourceMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java deleted file mode 100644 index 5a4547c2da3f..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java +++ /dev/null @@ -1,313 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p1beta1/assets.proto - -package com.google.cloud.asset.v1p1beta1; - -public interface StandardResourceMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p1beta1.StandardResourceMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The full resource name. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The full resource name. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The type of this resource.
-   * For example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of this resource.
-   * For example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * The project that this resource belongs to, in the form of
-   * `projects/{project_number}`.
-   * 
- * - * string project = 3; - * @return The project. - */ - java.lang.String getProject(); - /** - *
-   * The project that this resource belongs to, in the form of
-   * `projects/{project_number}`.
-   * 
- * - * string project = 3; - * @return The bytes for project. - */ - com.google.protobuf.ByteString - getProjectBytes(); - - /** - *
-   * The display name of this resource.
-   * 
- * - * string display_name = 4; - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - *
-   * The display name of this resource.
-   * 
- * - * string display_name = 4; - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString - getDisplayNameBytes(); - - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes.
-   * 
- * - * string description = 5; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-   * One or more paragraphs of text description of this resource. Maximum length
-   * could be up to 1M bytes.
-   * 
- * - * string description = 5; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @return A list containing the additionalAttributes. - */ - java.util.List - getAdditionalAttributesList(); - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @return The count of additionalAttributes. - */ - int getAdditionalAttributesCount(); - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @param index The index of the element to return. - * @return The additionalAttributes at the given index. - */ - java.lang.String getAdditionalAttributes(int index); - /** - *
-   * Additional searchable attributes of this resource.
-   * Informational only. The exact set of attributes is subject to change.
-   * For example: project id, DNS name etc.
-   * 
- * - * repeated string additional_attributes = 10; - * @param index The index of the value to return. - * @return The bytes of the additionalAttributes at the given index. - */ - com.google.protobuf.ByteString - getAdditionalAttributesBytes(int index); - - /** - *
-   * Location can be "global", regional like "us-east1", or zonal like
-   * "us-west1-b".
-   * 
- * - * string location = 11; - * @return The location. - */ - java.lang.String getLocation(); - /** - *
-   * Location can be "global", regional like "us-east1", or zonal like
-   * "us-west1-b".
-   * 
- * - * string location = 11; - * @return The bytes for location. - */ - com.google.protobuf.ByteString - getLocationBytes(); - - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - int getLabelsCount(); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - boolean containsLabels( - java.lang.String key); - /** - * Use {@link #getLabelsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getLabels(); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - java.util.Map - getLabelsMap(); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - - /* nullable */ -java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-   * Labels associated with this resource. See [Labelling and grouping GCP
-   * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * map<string, string> labels = 12; - */ - - java.lang.String getLabelsOrThrow( - java.lang.String key); - - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @return A list containing the networkTags. - */ - java.util.List - getNetworkTagsList(); - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @return The count of networkTags. - */ - int getNetworkTagsCount(); - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @param index The index of the element to return. - * @return The networkTags at the given index. - */ - java.lang.String getNetworkTags(int index); - /** - *
-   * Network tags associated with this resource. Like labels, network tags are a
-   * type of annotations used to group GCP resources. See [Labelling GCP
-   * resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
-   * for more information.
-   * 
- * - * repeated string network_tags = 13; - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. - */ - com.google.protobuf.ByteString - getNetworkTagsBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto deleted file mode 100644 index d5a0d8c41b7f..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1p1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/cloud/asset/v1p1beta1/assets.proto"; - -option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetServiceProto"; -option java_package = "com.google.cloud.asset.v1p1beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1"; - -// Asset service definition. -service AssetService { - option (google.api.default_host) = "cloudasset.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Searches all the resources under a given accessible CRM scope - // (project/folder/organization). This RPC gives callers - // especially admins the ability to search all the resources under a scope, - // even if they don't have .get permission of all the resources. Callers - // should have cloud.assets.SearchAllResources permission on the requested - // scope, otherwise it will be rejected. - rpc SearchAllResources(SearchAllResourcesRequest) returns (SearchAllResourcesResponse) { - option (google.api.http) = { - get: "/v1p1beta1/{scope=*/*}/resources:searchAll" - }; - option (google.api.method_signature) = "scope,query,asset_types"; - } - - // Searches all the IAM policies under a given accessible CRM scope - // (project/folder/organization). This RPC gives callers - // especially admins the ability to search all the IAM policies under a scope, - // even if they don't have .getIamPolicy permission of all the IAM policies. - // Callers should have cloud.assets.SearchAllIamPolicies permission on the - // requested scope, otherwise it will be rejected. - rpc SearchAllIamPolicies(SearchAllIamPoliciesRequest) returns (SearchAllIamPoliciesResponse) { - option (google.api.http) = { - get: "/v1p1beta1/{scope=*/*}/iamPolicies:searchAll" - }; - option (google.api.method_signature) = "scope,query"; - } -} - -// Search all resources request. -message SearchAllResourcesRequest { - // Required. The relative name of an asset. The search is limited to the resources - // within the `scope`. The allowed value must be: - // * Organization number (such as "organizations/123") - // * Folder number(such as "folders/1234") - // * Project number (such as "projects/12345") - // * Project id (such as "projects/abc") - string scope = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The query statement. - string query = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of asset types that this request searches for. If empty, it will - // search all the supported asset types. - repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page size for search result pagination. Page size is capped at 500 even - // if a larger value is given. If set to zero, server will pick an appropriate - // default. Returned results may be fewer than requested. When this happens, - // there could be more results as long as `next_page_token` is returned. - int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If present, then retrieve the next batch of results from the preceding call - // to this method. `page_token` must be the value of `next_page_token` from - // the previous response. The values of all other method parameters, must be - // identical to those in the previous call. - string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A comma separated list of fields specifying the sorting order of the - // results. The default order is ascending. Add " desc" after the field name - // to indicate descending order. Redundant space characters are ignored. For - // example, " foo , bar desc ". - string order_by = 10 [(google.api.field_behavior) = OPTIONAL]; -} - -// Search all resources response. -message SearchAllResourcesResponse { - // A list of resource that match the search query. - repeated StandardResourceMetadata results = 1; - - // If there are more results than those appearing in this response, then - // `next_page_token` is included. To get the next set of results, call this - // method again using the value of `next_page_token` as `page_token`. - string next_page_token = 2; -} - -// Search all IAM policies request. -message SearchAllIamPoliciesRequest { - // Required. The relative name of an asset. The search is limited to the resources - // within the `scope`. The allowed value must be: - // * Organization number (such as "organizations/123") - // * Folder number(such as "folders/1234") - // * Project number (such as "projects/12345") - // * Project id (such as "projects/abc") - string scope = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The query statement. - // Examples: - // * "policy:myuser@mydomain.com" - // * "policy:(myuser@mydomain.com viewer)" - string query = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The page size for search result pagination. Page size is capped at 500 even - // if a larger value is given. If set to zero, server will pick an appropriate - // default. Returned results may be fewer than requested. When this happens, - // there could be more results as long as `next_page_token` is returned. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If present, retrieve the next batch of results from the preceding call to - // this method. `page_token` must be the value of `next_page_token` from the - // previous response. The values of all other method parameters must be - // identical to those in the previous call. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Search all IAM policies response. -message SearchAllIamPoliciesResponse { - // A list of IamPolicy that match the search query. Related information such - // as the associated resource is returned along with the policy. - repeated IamPolicySearchResult results = 1; - - // Set if there are more results than those appearing in this response; to get - // the next set of results, call this method again, using this value as the - // `page_token`. - string next_page_token = 2; -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto b/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto deleted file mode 100644 index c0ac1403acc8..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1p1beta1; - -import "google/iam/v1/policy.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetProto"; -option java_package = "com.google.cloud.asset.v1p1beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1"; - -// The standard metadata of a cloud resource. -message StandardResourceMetadata { - // The full resource name. For example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string name = 1; - - // The type of this resource. - // For example: "compute.googleapis.com/Disk". - string asset_type = 2; - - // The project that this resource belongs to, in the form of - // `projects/{project_number}`. - string project = 3; - - // The display name of this resource. - string display_name = 4; - - // One or more paragraphs of text description of this resource. Maximum length - // could be up to 1M bytes. - string description = 5; - - // Additional searchable attributes of this resource. - // Informational only. The exact set of attributes is subject to change. - // For example: project id, DNS name etc. - repeated string additional_attributes = 10; - - // Location can be "global", regional like "us-east1", or zonal like - // "us-west1-b". - string location = 11; - - // Labels associated with this resource. See [Labelling and grouping GCP - // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - // for more information. - map labels = 12; - - // Network tags associated with this resource. Like labels, network tags are a - // type of annotations used to group GCP resources. See [Labelling GCP - // resources](lhttps://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - // for more information. - repeated string network_tags = 13; -} - -// The result for a IAM Policy search. -message IamPolicySearchResult { - // Explanation about the IAM policy search result. - message Explanation { - // The map from roles to their included permission matching the permission - // query (e.g. containing `policy.role.permissions:`). A sample role string: - // "roles/compute.instanceAdmin". The roles can also be found in the - // returned `policy` bindings. Note that the map is populated only if - // requesting with a permission query. - map matched_permissions = 1; - } - - // The [full resource - // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // of the resource associated with this IAM policy. - string resource = 1; - - // The project that the associated GCP resource belongs to, in the form of - // `projects/{project_number}`. If an IAM policy is set on a resource (like VM - // instance, Cloud Storage bucket), the project field will indicate the - // project that contains the resource. If an IAM policy is set on a folder or - // orgnization, the project field will be empty. - string project = 3; - - // The IAM policy directly set on the given resource. Note that the original - // IAM policy can contain multiple bindings. This only contains the bindings - // that match the given query. For queries that don't contain a constrain on - // policies (e.g. an empty query), this contains all the bindings. - google.iam.v1.Policy policy = 4; - - // Explanation about the IAM policy search result. It contains additional - // information to explain why the search result matches the query. - Explanation explanation = 5; -} - -// IAM permissions -message Permissions { - // A list of permissions. A sample permission string: "compute.disk.get". - repeated string permissions = 1; -} diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index d664b4f21204..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; -import com.google.cloud.asset.v1p1beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 54206f44f64e..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index f13fa28f032b..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_create_setendpoint_sync] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; -import com.google.cloud.asset.v1p1beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java deleted file mode 100644 index 5b156a82d453..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPolicies.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; - -public class AsyncSearchAllIamPolicies { - - public static void main(String[] args) throws Exception { - asyncSearchAllIamPolicies(); - } - - public static void asyncSearchAllIamPolicies() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request); - // Do something. - for (IamPolicySearchResult element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java deleted file mode 100644 index d31d83bf532c..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/AsyncSearchAllIamPoliciesPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_paged_async] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse; -import com.google.common.base.Strings; - -public class AsyncSearchAllIamPoliciesPaged { - - public static void main(String[] args) throws Exception { - asyncSearchAllIamPoliciesPaged(); - } - - public static void asyncSearchAllIamPoliciesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - SearchAllIamPoliciesResponse response = - assetServiceClient.searchAllIamPoliciesCallable().call(request); - for (IamPolicySearchResult element : response.getResultsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_paged_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java deleted file mode 100644 index ff47d95f54dc..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPolicies.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_sync] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; -import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest; - -public class SyncSearchAllIamPolicies { - - public static void main(String[] args) throws Exception { - syncSearchAllIamPolicies(); - } - - public static void syncSearchAllIamPolicies() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllIamPoliciesRequest request = - SearchAllIamPoliciesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (IamPolicySearchResult element : - assetServiceClient.searchAllIamPolicies(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java deleted file mode 100644 index ccabf3236e1a..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchalliampolicies/SyncSearchAllIamPoliciesStringString.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.IamPolicySearchResult; - -public class SyncSearchAllIamPoliciesStringString { - - public static void main(String[] args) throws Exception { - syncSearchAllIamPoliciesStringString(); - } - - public static void syncSearchAllIamPoliciesStringString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String scope = "scope109264468"; - String query = "query107944136"; - for (IamPolicySearchResult element : - assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchalliampolicies_stringstring_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java deleted file mode 100644 index e0bfd0a4922f..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResources.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; -import java.util.ArrayList; - -public class AsyncSearchAllResources { - - public static void main(String[] args) throws Exception { - asyncSearchAllResources(); - } - - public static void asyncSearchAllResources() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .addAllAssetTypes(new ArrayList()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .build(); - ApiFuture future = - assetServiceClient.searchAllResourcesPagedCallable().futureCall(request); - // Do something. - for (StandardResourceMetadata element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java deleted file mode 100644 index 16da799bdf75..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/AsyncSearchAllResourcesPaged.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_paged_async] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse; -import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; -import com.google.common.base.Strings; -import java.util.ArrayList; - -public class AsyncSearchAllResourcesPaged { - - public static void main(String[] args) throws Exception { - asyncSearchAllResourcesPaged(); - } - - public static void asyncSearchAllResourcesPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .addAllAssetTypes(new ArrayList()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .build(); - while (true) { - SearchAllResourcesResponse response = - assetServiceClient.searchAllResourcesCallable().call(request); - for (StandardResourceMetadata element : response.getResultsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_paged_async] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java deleted file mode 100644 index 8d17454dfdb3..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResources.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_sync] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest; -import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; -import java.util.ArrayList; - -public class SyncSearchAllResources { - - public static void main(String[] args) throws Exception { - syncSearchAllResources(); - } - - public static void syncSearchAllResources() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - SearchAllResourcesRequest request = - SearchAllResourcesRequest.newBuilder() - .setScope("scope109264468") - .setQuery("query107944136") - .addAllAssetTypes(new ArrayList()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setOrderBy("orderBy-1207110587") - .build(); - for (StandardResourceMetadata element : - assetServiceClient.searchAllResources(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java deleted file mode 100644 index 38fb49c54e8b..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetserviceclient/searchallresources/SyncSearchAllResourcesStringStringListstring.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] -import com.google.cloud.asset.v1p1beta1.AssetServiceClient; -import com.google.cloud.asset.v1p1beta1.StandardResourceMetadata; -import java.util.ArrayList; -import java.util.List; - -public class SyncSearchAllResourcesStringStringListstring { - - public static void main(String[] args) throws Exception { - syncSearchAllResourcesStringStringListstring(); - } - - public static void syncSearchAllResourcesStringStringListstring() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String scope = "scope109264468"; - String query = "query107944136"; - List assetTypes = new ArrayList<>(); - for (StandardResourceMetadata element : - assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p1beta1_generated_assetserviceclient_searchallresources_stringstringliststring_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java deleted file mode 100644 index 8bac130fb9cc..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/assetservicesettings/searchallresources/SyncSearchAllResources.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.samples; - -// [START asset_v1p1beta1_generated_assetservicesettings_searchallresources_sync] -import com.google.cloud.asset.v1p1beta1.AssetServiceSettings; -import java.time.Duration; - -public class SyncSearchAllResources { - - public static void main(String[] args) throws Exception { - syncSearchAllResources(); - } - - public static void syncSearchAllResources() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); - assetServiceSettingsBuilder - .searchAllResourcesSettings() - .setRetrySettings( - assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1p1beta1_generated_assetservicesettings_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java b/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java deleted file mode 100644 index 78aec7d232ed..000000000000 --- a/owl-bot-staging/java-asset/v1p1beta1/samples/snippets/generated/com/google/cloud/asset/v1p1beta1/stub/assetservicestubsettings/searchallresources/SyncSearchAllResources.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.v1p1beta1.stub.samples; - -// [START asset_v1p1beta1_generated_assetservicestubsettings_searchallresources_sync] -import com.google.cloud.asset.v1p1beta1.stub.AssetServiceStubSettings; -import java.time.Duration; - -public class SyncSearchAllResources { - - public static void main(String[] args) throws Exception { - syncSearchAllResources(); - } - - public static void syncSearchAllResources() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceStubSettings.Builder assetServiceSettingsBuilder = - AssetServiceStubSettings.newBuilder(); - assetServiceSettingsBuilder - .searchAllResourcesSettings() - .setRetrySettings( - assetServiceSettingsBuilder.searchAllResourcesSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1p1beta1_generated_assetservicestubsettings_searchallresources_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java deleted file mode 100644 index 156915aa901c..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java +++ /dev/null @@ -1,677 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStub; -import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Asset service definition. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   String parent = "parent-995424086";
- *   Feed response = assetServiceClient.createFeed(parent);
- * }
- * }
- * - *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of AssetServiceSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceClient implements BackgroundResource { - private final AssetServiceSettings settings; - private final AssetServiceStub stub; - - /** Constructs an instance of AssetServiceClient with default settings. */ - public static final AssetServiceClient create() throws IOException { - return create(AssetServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { - return new AssetServiceClient(settings); - } - - /** - * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(AssetServiceSettings). - */ - public static final AssetServiceClient create(AssetServiceStub stub) { - return new AssetServiceClient(stub); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected AssetServiceClient(AssetServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected AssetServiceClient(AssetServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final AssetServiceSettings getSettings() { - return settings; - } - - public AssetServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a feed in a parent project/folder/organization to listen to its asset updates. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "parent-995424086";
-   *   Feed response = assetServiceClient.createFeed(parent);
-   * }
-   * }
- * - * @param parent Required. The name of the project/folder/organization where this feed should be - * created in. It can only be an organization number (such as "organizations/123"), a folder - * number (such as "folders/123"), a project ID (such as "projects/my-project-id")", or a - * project number (such as "projects/12345"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed createFeed(String parent) { - CreateFeedRequest request = CreateFeedRequest.newBuilder().setParent(parent).build(); - return createFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a feed in a parent project/folder/organization to listen to its asset updates. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   CreateFeedRequest request =
-   *       CreateFeedRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setFeedId("feedId-1278410919")
-   *           .setFeed(Feed.newBuilder().build())
-   *           .build();
-   *   Feed response = assetServiceClient.createFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed createFeed(CreateFeedRequest request) { - return createFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a feed in a parent project/folder/organization to listen to its asset updates. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   CreateFeedRequest request =
-   *       CreateFeedRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setFeedId("feedId-1278410919")
-   *           .setFeed(Feed.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request);
-   *   // Do something.
-   *   Feed response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createFeedCallable() { - return stub.createFeedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   Feed response = assetServiceClient.getFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the Feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed getFeed(FeedName name) { - GetFeedRequest request = - GetFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
-   *   Feed response = assetServiceClient.getFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the Feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed getFeed(String name) { - GetFeedRequest request = GetFeedRequest.newBuilder().setName(name).build(); - return getFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   GetFeedRequest request =
-   *       GetFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   Feed response = assetServiceClient.getFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed getFeed(GetFeedRequest request) { - return getFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details about an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   GetFeedRequest request =
-   *       GetFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request);
-   *   // Do something.
-   *   Feed response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getFeedCallable() { - return stub.getFeedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all asset feeds in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String parent = "parent-995424086";
-   *   ListFeedsResponse response = assetServiceClient.listFeeds(parent);
-   * }
-   * }
- * - * @param parent Required. The parent project/folder/organization whose feeds are to be listed. It - * can only be using project/folder/organization number (such as "folders/12345")", or a - * project ID (such as "projects/my-project-id"). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListFeedsResponse listFeeds(String parent) { - ListFeedsRequest request = ListFeedsRequest.newBuilder().setParent(parent).build(); - return listFeeds(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all asset feeds in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListFeedsRequest request =
-   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
-   *   ListFeedsResponse response = assetServiceClient.listFeeds(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListFeedsResponse listFeeds(ListFeedsRequest request) { - return listFeedsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists all asset feeds in a parent project/folder/organization. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListFeedsRequest request =
-   *       ListFeedsRequest.newBuilder().setParent("parent-995424086").build();
-   *   ApiFuture future =
-   *       assetServiceClient.listFeedsCallable().futureCall(request);
-   *   // Do something.
-   *   ListFeedsResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable listFeedsCallable() { - return stub.listFeedsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an asset feed configuration. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   Feed feed = Feed.newBuilder().build();
-   *   Feed response = assetServiceClient.updateFeed(feed);
-   * }
-   * }
- * - * @param feed Required. The new values of feed details. It must match an existing feed and the - * field `name` must be in the format of: projects/project_number/feeds/feed_id or - * folders/folder_number/feeds/feed_id or organizations/organization_number/feeds/feed_id. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed updateFeed(Feed feed) { - UpdateFeedRequest request = UpdateFeedRequest.newBuilder().setFeed(feed).build(); - return updateFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an asset feed configuration. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   UpdateFeedRequest request =
-   *       UpdateFeedRequest.newBuilder()
-   *           .setFeed(Feed.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Feed response = assetServiceClient.updateFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Feed updateFeed(UpdateFeedRequest request) { - return updateFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an asset feed configuration. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   UpdateFeedRequest request =
-   *       UpdateFeedRequest.newBuilder()
-   *           .setFeed(Feed.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request);
-   *   // Do something.
-   *   Feed response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateFeedCallable() { - return stub.updateFeedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   assetServiceClient.deleteFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(FeedName name) { - DeleteFeedRequest request = - DeleteFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
-   *   assetServiceClient.deleteFeed(name);
-   * }
-   * }
- * - * @param name Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(String name) { - DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); - deleteFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   DeleteFeedRequest request =
-   *       DeleteFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   assetServiceClient.deleteFeed(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(DeleteFeedRequest request) { - deleteFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an asset feed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   DeleteFeedRequest request =
-   *       DeleteFeedRequest.newBuilder()
-   *           .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteFeedCallable() { - return stub.deleteFeedCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java deleted file mode 100644 index 48de67a431ff..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceSettings.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createFeed to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .createFeedSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to createFeed. */ - public UnaryCallSettings createFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).createFeedSettings(); - } - - /** Returns the object with the settings used for calls to getFeed. */ - public UnaryCallSettings getFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).getFeedSettings(); - } - - /** Returns the object with the settings used for calls to listFeeds. */ - public UnaryCallSettings listFeedsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).listFeedsSettings(); - } - - /** Returns the object with the settings used for calls to updateFeed. */ - public UnaryCallSettings updateFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).updateFeedSettings(); - } - - /** Returns the object with the settings used for calls to deleteFeed. */ - public UnaryCallSettings deleteFeedSettings() { - return ((AssetServiceStubSettings) getStubSettings()).deleteFeedSettings(); - } - - public static final AssetServiceSettings create(AssetServiceStubSettings stub) - throws IOException { - return new AssetServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AssetServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AssetServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AssetServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AssetServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AssetServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(AssetServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(AssetServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AssetServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(AssetServiceStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); - } - - public AssetServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AssetServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createFeed. */ - public UnaryCallSettings.Builder createFeedSettings() { - return getStubSettingsBuilder().createFeedSettings(); - } - - /** Returns the builder for the settings used for calls to getFeed. */ - public UnaryCallSettings.Builder getFeedSettings() { - return getStubSettingsBuilder().getFeedSettings(); - } - - /** Returns the builder for the settings used for calls to listFeeds. */ - public UnaryCallSettings.Builder listFeedsSettings() { - return getStubSettingsBuilder().listFeedsSettings(); - } - - /** Returns the builder for the settings used for calls to updateFeed. */ - public UnaryCallSettings.Builder updateFeedSettings() { - return getStubSettingsBuilder().updateFeedSettings(); - } - - /** Returns the builder for the settings used for calls to deleteFeed. */ - public UnaryCallSettings.Builder deleteFeedSettings() { - return getStubSettingsBuilder().deleteFeedSettings(); - } - - @Override - public AssetServiceSettings build() throws IOException { - return new AssetServiceSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json deleted file mode 100644 index caeee32252e5..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.asset.v1p2beta1", - "libraryPackage": "com.google.cloud.asset.v1p2beta1", - "services": { - "AssetService": { - "clients": { - "grpc": { - "libraryClient": "AssetServiceClient", - "rpcs": { - "CreateFeed": { - "methods": ["createFeed", "createFeed", "createFeedCallable"] - }, - "DeleteFeed": { - "methods": ["deleteFeed", "deleteFeed", "deleteFeed", "deleteFeedCallable"] - }, - "GetFeed": { - "methods": ["getFeed", "getFeed", "getFeed", "getFeedCallable"] - }, - "ListFeeds": { - "methods": ["listFeeds", "listFeeds", "listFeedsCallable"] - }, - "UpdateFeed": { - "methods": ["updateFeed", "updateFeed", "updateFeedCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java deleted file mode 100644 index 3c42b5875006..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/package-info.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= AssetServiceClient ======================= - * - *

Service Description: Asset service definition. - * - *

Sample for AssetServiceClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   String parent = "parent-995424086";
- *   Feed response = assetServiceClient.createFeed(parent);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.asset.v1p2beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java deleted file mode 100644 index 992bc61171ff..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; -import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.GetFeedRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; -import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class AssetServiceStub implements BackgroundResource { - - public UnaryCallable createFeedCallable() { - throw new UnsupportedOperationException("Not implemented: createFeedCallable()"); - } - - public UnaryCallable getFeedCallable() { - throw new UnsupportedOperationException("Not implemented: getFeedCallable()"); - } - - public UnaryCallable listFeedsCallable() { - throw new UnsupportedOperationException("Not implemented: listFeedsCallable()"); - } - - public UnaryCallable updateFeedCallable() { - throw new UnsupportedOperationException("Not implemented: updateFeedCallable()"); - } - - public UnaryCallable deleteFeedCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFeedCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java deleted file mode 100644 index 987c1ebb873b..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/AssetServiceStubSettings.java +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; -import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.GetFeedRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; -import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of createFeed to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
- *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .createFeedSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings createFeedSettings; - private final UnaryCallSettings getFeedSettings; - private final UnaryCallSettings listFeedsSettings; - private final UnaryCallSettings updateFeedSettings; - private final UnaryCallSettings deleteFeedSettings; - - /** Returns the object with the settings used for calls to createFeed. */ - public UnaryCallSettings createFeedSettings() { - return createFeedSettings; - } - - /** Returns the object with the settings used for calls to getFeed. */ - public UnaryCallSettings getFeedSettings() { - return getFeedSettings; - } - - /** Returns the object with the settings used for calls to listFeeds. */ - public UnaryCallSettings listFeedsSettings() { - return listFeedsSettings; - } - - /** Returns the object with the settings used for calls to updateFeed. */ - public UnaryCallSettings updateFeedSettings() { - return updateFeedSettings; - } - - /** Returns the object with the settings used for calls to deleteFeed. */ - public UnaryCallSettings deleteFeedSettings() { - return deleteFeedSettings; - } - - public AssetServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAssetServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonAssetServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "cloudasset.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "cloudasset.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - createFeedSettings = settingsBuilder.createFeedSettings().build(); - getFeedSettings = settingsBuilder.getFeedSettings().build(); - listFeedsSettings = settingsBuilder.listFeedsSettings().build(); - updateFeedSettings = settingsBuilder.updateFeedSettings().build(); - deleteFeedSettings = settingsBuilder.deleteFeedSettings().build(); - } - - /** Builder for AssetServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder createFeedSettings; - private final UnaryCallSettings.Builder getFeedSettings; - private final UnaryCallSettings.Builder listFeedsSettings; - private final UnaryCallSettings.Builder updateFeedSettings; - private final UnaryCallSettings.Builder deleteFeedSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("no_retry_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - createFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listFeedsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createFeedSettings, - getFeedSettings, - listFeedsSettings, - updateFeedSettings, - deleteFeedSettings); - initDefaults(this); - } - - protected Builder(AssetServiceStubSettings settings) { - super(settings); - - createFeedSettings = settings.createFeedSettings.toBuilder(); - getFeedSettings = settings.getFeedSettings.toBuilder(); - listFeedsSettings = settings.listFeedsSettings.toBuilder(); - updateFeedSettings = settings.updateFeedSettings.toBuilder(); - deleteFeedSettings = settings.deleteFeedSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createFeedSettings, - getFeedSettings, - listFeedsSettings, - updateFeedSettings, - deleteFeedSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .createFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .getFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .listFeedsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - builder - .updateFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); - - builder - .deleteFeedSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to createFeed. */ - public UnaryCallSettings.Builder createFeedSettings() { - return createFeedSettings; - } - - /** Returns the builder for the settings used for calls to getFeed. */ - public UnaryCallSettings.Builder getFeedSettings() { - return getFeedSettings; - } - - /** Returns the builder for the settings used for calls to listFeeds. */ - public UnaryCallSettings.Builder listFeedsSettings() { - return listFeedsSettings; - } - - /** Returns the builder for the settings used for calls to updateFeed. */ - public UnaryCallSettings.Builder updateFeedSettings() { - return updateFeedSettings; - } - - /** Returns the builder for the settings used for calls to deleteFeed. */ - public UnaryCallSettings.Builder deleteFeedSettings() { - return deleteFeedSettings; - } - - @Override - public AssetServiceStubSettings build() throws IOException { - return new AssetServiceStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java deleted file mode 100644 index dcacae98a2f9..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java deleted file mode 100644 index 4c74edb92139..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; -import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.GetFeedRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; -import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceStub extends AssetServiceStub { - private static final MethodDescriptor createFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/CreateFeed") - .setRequestMarshaller(ProtoUtils.marshaller(CreateFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/GetFeed") - .setRequestMarshaller(ProtoUtils.marshaller(GetFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listFeedsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/ListFeeds") - .setRequestMarshaller(ProtoUtils.marshaller(ListFeedsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListFeedsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updateFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/UpdateFeed") - .setRequestMarshaller(ProtoUtils.marshaller(UpdateFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteFeedMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/DeleteFeed") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable createFeedCallable; - private final UnaryCallable getFeedCallable; - private final UnaryCallable listFeedsCallable; - private final UnaryCallable updateFeedCallable; - private final UnaryCallable deleteFeedCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { - return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAssetServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAssetServiceStub( - AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings createFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listFeedsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listFeedsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings updateFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("feed.name", String.valueOf(request.getFeed().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteFeedTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteFeedMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.createFeedCallable = - callableFactory.createUnaryCallable( - createFeedTransportSettings, settings.createFeedSettings(), clientContext); - this.getFeedCallable = - callableFactory.createUnaryCallable( - getFeedTransportSettings, settings.getFeedSettings(), clientContext); - this.listFeedsCallable = - callableFactory.createUnaryCallable( - listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); - this.updateFeedCallable = - callableFactory.createUnaryCallable( - updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); - this.deleteFeedCallable = - callableFactory.createUnaryCallable( - deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable createFeedCallable() { - return createFeedCallable; - } - - @Override - public UnaryCallable getFeedCallable() { - return getFeedCallable; - } - - @Override - public UnaryCallable listFeedsCallable() { - return listFeedsCallable; - } - - @Override - public UnaryCallable updateFeedCallable() { - return updateFeedCallable; - } - - @Override - public UnaryCallable deleteFeedCallable() { - return deleteFeedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java deleted file mode 100644 index a21066222390..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonAssetServiceCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java deleted file mode 100644 index f307fcb23ebe..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/HttpJsonAssetServiceStub.java +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; -import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.GetFeedRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; -import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonAssetServiceStub extends AssetServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor createFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/CreateFeed") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p2beta1/{parent=*/*}/feeds", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Feed.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor getFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/GetFeed") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p2beta1/{name=*/*/feeds/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Feed.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listFeedsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/ListFeeds") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p2beta1/{parent=*/*}/feeds", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListFeedsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor updateFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/UpdateFeed") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p2beta1/{feed.name=*/*/feeds/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "feed.name", request.getFeed().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Feed.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor deleteFeedMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1p2beta1.AssetService/DeleteFeed") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p2beta1/{name=*/*/feeds/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable createFeedCallable; - private final UnaryCallable getFeedCallable; - private final UnaryCallable listFeedsCallable; - private final UnaryCallable updateFeedCallable; - private final UnaryCallable deleteFeedCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonAssetServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonAssetServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings createFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings listFeedsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listFeedsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteFeedTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteFeedMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.createFeedCallable = - callableFactory.createUnaryCallable( - createFeedTransportSettings, settings.createFeedSettings(), clientContext); - this.getFeedCallable = - callableFactory.createUnaryCallable( - getFeedTransportSettings, settings.getFeedSettings(), clientContext); - this.listFeedsCallable = - callableFactory.createUnaryCallable( - listFeedsTransportSettings, settings.listFeedsSettings(), clientContext); - this.updateFeedCallable = - callableFactory.createUnaryCallable( - updateFeedTransportSettings, settings.updateFeedSettings(), clientContext); - this.deleteFeedCallable = - callableFactory.createUnaryCallable( - deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(createFeedMethodDescriptor); - methodDescriptors.add(getFeedMethodDescriptor); - methodDescriptors.add(listFeedsMethodDescriptor); - methodDescriptors.add(updateFeedMethodDescriptor); - methodDescriptors.add(deleteFeedMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable createFeedCallable() { - return createFeedCallable; - } - - @Override - public UnaryCallable getFeedCallable() { - return getFeedCallable; - } - - @Override - public UnaryCallable listFeedsCallable() { - return listFeedsCallable; - } - - @Override - public UnaryCallable updateFeedCallable() { - return updateFeedCallable; - } - - @Override - public UnaryCallable deleteFeedCallable() { - return deleteFeedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java deleted file mode 100644 index 272ec68dcb61..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientHttpJsonTest.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.asset.v1p2beta1.stub.HttpJsonAssetServiceStub; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonAssetServiceStub.getMethodDescriptors(), - AssetServiceSettings.getDefaultEndpoint()); - AssetServiceSettings settings = - AssetServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void createFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-4715/parent-4715"; - - Feed actualResponse = client.createFeed(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-4715/parent-4715"; - client.createFeed(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest2() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "name-2459/name-2459/feeds/feed-2459"; - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getFeedExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "name-2459/name-2459/feeds/feed-2459"; - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFeedsTest() throws Exception { - ListFeedsResponse expectedResponse = - ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); - mockService.addResponse(expectedResponse); - - String parent = "parent-4715/parent-4715"; - - ListFeedsResponse actualResponse = client.listFeeds(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listFeedsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "parent-4715/parent-4715"; - client.listFeeds(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - Feed feed = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - - Feed actualResponse = client.updateFeed(feed); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Feed feed = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - client.updateFeed(feed); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - client.deleteFeed(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFeedExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "name-2459/name-2459/feeds/feed-2459"; - - client.deleteFeed(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteFeedExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "name-2459/name-2459/feeds/feed-2459"; - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java deleted file mode 100644 index 8215eec90f5a..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientTest { - private static MockAssetService mockAssetService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockAssetService = new MockAssetService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - AssetServiceSettings settings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void createFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - Feed actualResponse = client.createFeed(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateFeedRequest actualRequest = ((CreateFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - client.createFeed(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getFeedTest2() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - String name = "name3373707"; - - Feed actualResponse = client.getFeed(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetFeedRequest actualRequest = ((GetFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getFeedExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String name = "name3373707"; - client.getFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listFeedsTest() throws Exception { - ListFeedsResponse expectedResponse = - ListFeedsResponse.newBuilder().addAllFeeds(new ArrayList()).build(); - mockAssetService.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListFeedsResponse actualResponse = client.listFeeds(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListFeedsRequest actualRequest = ((ListFeedsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listFeedsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String parent = "parent-995424086"; - client.listFeeds(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateFeedTest() throws Exception { - Feed expectedResponse = - Feed.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .addAllAssetNames(new ArrayList()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setFeedOutputConfig(FeedOutputConfig.newBuilder().build()) - .build(); - mockAssetService.addResponse(expectedResponse); - - Feed feed = Feed.newBuilder().build(); - - Feed actualResponse = client.updateFeed(feed); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateFeedRequest actualRequest = ((UpdateFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(feed, actualRequest.getFeed()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - Feed feed = Feed.newBuilder().build(); - client.updateFeed(feed); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAssetService.addResponse(expectedResponse); - - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - - client.deleteFeed(name); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFeedExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteFeedTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockAssetService.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteFeed(name); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteFeedRequest actualRequest = ((DeleteFeedRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteFeedExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - String name = "name3373707"; - client.deleteFeed(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java deleted file mode 100644 index f35ed351aa9b..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetService implements MockGrpcService { - private final MockAssetServiceImpl serviceImpl; - - public MockAssetService() { - serviceImpl = new MockAssetServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java deleted file mode 100644 index 7a48aaee7390..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.cloud.asset.v1p2beta1.AssetServiceGrpc.AssetServiceImplBase; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetServiceImpl extends AssetServiceImplBase { - private List requests; - private Queue responses; - - public MockAssetServiceImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void createFeed(CreateFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Feed) { - requests.add(request); - responseObserver.onNext(((Feed) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Feed.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getFeed(GetFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Feed) { - requests.add(request); - responseObserver.onNext(((Feed) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Feed.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listFeeds( - ListFeedsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListFeedsResponse) { - requests.add(request); - responseObserver.onNext(((ListFeedsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListFeeds, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListFeedsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateFeed(UpdateFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Feed) { - requests.add(request); - responseObserver.onNext(((Feed) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Feed.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteFeed(DeleteFeedRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteFeed, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java b/owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java deleted file mode 100644 index 696a0aaafec7..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java +++ /dev/null @@ -1,651 +0,0 @@ -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 String SERVICE_NAME = "google.cloud.asset.v1p2beta1.AssetService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor 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 getCreateFeedMethod() { - io.grpc.MethodDescriptor 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 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 getGetFeedMethod() { - io.grpc.MethodDescriptor 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 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 getListFeedsMethod() { - io.grpc.MethodDescriptor 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 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 getUpdateFeedMethod() { - io.grpc.MethodDescriptor 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 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 getDeleteFeedMethod() { - io.grpc.MethodDescriptor 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { - - /** - *
-     * 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.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateFeedMethod(), responseObserver); - } - - /** - *
-     * Gets details about an asset feed.
-     * 
- */ - public void getFeed(com.google.cloud.asset.v1p2beta1.GetFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFeedMethod(), 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.ServerCalls.asyncUnimplementedUnaryCall(getListFeedsMethod(), responseObserver); - } - - /** - *
-     * Updates an asset feed configuration.
-     * 
- */ - public void updateFeed(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateFeedMethod(), responseObserver); - } - - /** - *
-     * Deletes an asset feed.
-     * 
- */ - public void deleteFeed(com.google.cloud.asset.v1p2beta1.DeleteFeedRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteFeedMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - 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>( - this, METHODID_CREATE_FEED))) - .addMethod( - getGetFeedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p2beta1.GetFeedRequest, - com.google.cloud.asset.v1p2beta1.Feed>( - this, METHODID_GET_FEED))) - .addMethod( - getListFeedsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p2beta1.ListFeedsRequest, - com.google.cloud.asset.v1p2beta1.ListFeedsResponse>( - this, METHODID_LIST_FEEDS))) - .addMethod( - getUpdateFeedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest, - com.google.cloud.asset.v1p2beta1.Feed>( - this, METHODID_UPDATE_FEED))) - .addMethod( - getDeleteFeedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest, - com.google.protobuf.Empty>( - this, METHODID_DELETE_FEED))) - .build(); - } - } - - /** - *
-   * 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.StreamObserver responseObserver) { - 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.StreamObserver responseObserver) { - 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.StreamObserver responseObserver) { - 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.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteFeedMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * 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); - } - } - - /** - *
-   * 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 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.ListenableFuture deleteFeed( - 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 AssetServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AssetServiceImplBase 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(); - } - } - } - - private static abstract 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 String methodName; - - AssetServiceMethodDescriptorSupplier(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/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java deleted file mode 100644 index bcb258585f39..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java +++ /dev/null @@ -1,1574 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Cloud asset. This includes all Google Cloud Platform resources,
- * Cloud IAM policies, and other non-GCP assets.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.Asset} - */ -public final class Asset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.Asset) - AssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use Asset.newBuilder() to construct. - private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Asset() { - name_ = ""; - assetType_ = ""; - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Asset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Asset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - com.google.cloud.asset.v1p2beta1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ancestors_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.Asset.class, com.google.cloud.asset.v1p2beta1.Asset.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1p2beta1.Resource resource_; - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - @java.lang.Override - public boolean hasResource() { - return resource_ != null; - } - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - * @return The resource. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Resource getResource() { - return resource_ == null ? com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance() : resource_; - } - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ResourceOrBuilder getResourceOrBuilder() { - return getResource(); - } - - public static final int IAM_POLICY_FIELD_NUMBER = 4; - private com.google.iam.v1.Policy iamPolicy_; - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - @java.lang.Override - public boolean hasIamPolicy() { - return iamPolicy_ != null; - } - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getIamPolicy() { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - return getIamPolicy(); - } - - public static final int ANCESTORS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList ancestors_; - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_; - } - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - if (resource_ != null) { - output.writeMessage(3, getResource()); - } - if (iamPolicy_ != null) { - output.writeMessage(4, getIamPolicy()); - } - for (int i = 0; i < ancestors_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ancestors_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - if (resource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getResource()); - } - if (iamPolicy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIamPolicy()); - } - { - int dataSize = 0; - for (int i = 0; i < ancestors_.size(); i++) { - dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); - } - size += dataSize; - size += 1 * getAncestorsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.Asset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.Asset other = (com.google.cloud.asset.v1p2beta1.Asset) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (hasResource() != other.hasResource()) return false; - if (hasResource()) { - if (!getResource() - .equals(other.getResource())) return false; - } - if (hasIamPolicy() != other.hasIamPolicy()) return false; - if (hasIamPolicy()) { - if (!getIamPolicy() - .equals(other.getIamPolicy())) return false; - } - if (!getAncestorsList() - .equals(other.getAncestorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (hasResource()) { - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - } - if (hasIamPolicy()) { - hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicy().hashCode(); - } - if (getAncestorsCount() > 0) { - hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAncestorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Asset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.Asset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Cloud asset. This includes all Google Cloud Platform resources,
-   * Cloud IAM policies, and other non-GCP assets.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.Asset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.Asset) - com.google.cloud.asset.v1p2beta1.AssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.Asset.class, com.google.cloud.asset.v1p2beta1.Asset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.Asset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assetType_ = ""; - - if (resourceBuilder_ == null) { - resource_ = null; - } else { - resource_ = null; - resourceBuilder_ = null; - } - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Asset getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Asset build() { - com.google.cloud.asset.v1p2beta1.Asset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Asset buildPartial() { - com.google.cloud.asset.v1p2beta1.Asset result = new com.google.cloud.asset.v1p2beta1.Asset(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.assetType_ = assetType_; - if (resourceBuilder_ == null) { - result.resource_ = resource_; - } else { - result.resource_ = resourceBuilder_.build(); - } - if (iamPolicyBuilder_ == null) { - result.iamPolicy_ = iamPolicy_; - } else { - result.iamPolicy_ = iamPolicyBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ancestors_ = ancestors_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.Asset) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.Asset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Asset other) { - if (other == com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (other.hasResource()) { - mergeResource(other.getResource()); - } - if (other.hasIamPolicy()) { - mergeIamPolicy(other.getIamPolicy()); - } - if (!other.ancestors_.isEmpty()) { - if (ancestors_.isEmpty()) { - ancestors_ = other.ancestors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAncestorsIsMutable(); - ancestors_.addAll(other.ancestors_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.Asset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.Asset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p2beta1.Resource resource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Resource, com.google.cloud.asset.v1p2beta1.Resource.Builder, com.google.cloud.asset.v1p2beta1.ResourceOrBuilder> resourceBuilder_; - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - public boolean hasResource() { - return resourceBuilder_ != null || resource_ != null; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - * @return The resource. - */ - public com.google.cloud.asset.v1p2beta1.Resource getResource() { - if (resourceBuilder_ == null) { - return resource_ == null ? com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance() : resource_; - } else { - return resourceBuilder_.getMessage(); - } - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - public Builder setResource(com.google.cloud.asset.v1p2beta1.Resource value) { - if (resourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - onChanged(); - } else { - resourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - public Builder setResource( - com.google.cloud.asset.v1p2beta1.Resource.Builder builderForValue) { - if (resourceBuilder_ == null) { - resource_ = builderForValue.build(); - onChanged(); - } else { - resourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - public Builder mergeResource(com.google.cloud.asset.v1p2beta1.Resource value) { - if (resourceBuilder_ == null) { - if (resource_ != null) { - resource_ = - com.google.cloud.asset.v1p2beta1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); - } else { - resource_ = value; - } - onChanged(); - } else { - resourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - public Builder clearResource() { - if (resourceBuilder_ == null) { - resource_ = null; - onChanged(); - } else { - resource_ = null; - resourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1p2beta1.Resource.Builder getResourceBuilder() { - - onChanged(); - return getResourceFieldBuilder().getBuilder(); - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1p2beta1.ResourceOrBuilder getResourceOrBuilder() { - if (resourceBuilder_ != null) { - return resourceBuilder_.getMessageOrBuilder(); - } else { - return resource_ == null ? - com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance() : resource_; - } - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Resource, com.google.cloud.asset.v1p2beta1.Resource.Builder, com.google.cloud.asset.v1p2beta1.ResourceOrBuilder> - getResourceFieldBuilder() { - if (resourceBuilder_ == null) { - resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Resource, com.google.cloud.asset.v1p2beta1.Resource.Builder, com.google.cloud.asset.v1p2beta1.ResourceOrBuilder>( - getResource(), - getParentForChildren(), - isClean()); - resource_ = null; - } - return resourceBuilder_; - } - - private com.google.iam.v1.Policy iamPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - public boolean hasIamPolicy() { - return iamPolicyBuilder_ != null || iamPolicy_ != null; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - public com.google.iam.v1.Policy getIamPolicy() { - if (iamPolicyBuilder_ == null) { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } else { - return iamPolicyBuilder_.getMessage(); - } - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - iamPolicy_ = value; - onChanged(); - } else { - iamPolicyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy( - com.google.iam.v1.Policy.Builder builderForValue) { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = builderForValue.build(); - onChanged(); - } else { - iamPolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (iamPolicy_ != null) { - iamPolicy_ = - com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); - } else { - iamPolicy_ = value; - } - onChanged(); - } else { - iamPolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder clearIamPolicy() { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - onChanged(); - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { - - onChanged(); - return getIamPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - if (iamPolicyBuilder_ != null) { - return iamPolicyBuilder_.getMessageOrBuilder(); - } else { - return iamPolicy_ == null ? - com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> - getIamPolicyFieldBuilder() { - if (iamPolicyBuilder_ == null) { - iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( - getIamPolicy(), - getParentForChildren(), - isClean()); - iamPolicy_ = null; - } - return iamPolicyBuilder_; - } - - private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAncestorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_.getUnmodifiableView(); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @param index The index to set the value at. - * @param value The ancestors to set. - * @return This builder for chaining. - */ - public Builder setAncestors( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @param value The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestors( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @param values The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAllAncestors( - java.lang.Iterable values) { - ensureAncestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ancestors_); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @return This builder for chaining. - */ - public Builder clearAncestors() { - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 6; - * @param value The bytes of the ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestorsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.Asset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Asset) - private static final com.google.cloud.asset.v1p2beta1.Asset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.Asset(); - } - - public static com.google.cloud.asset.v1p2beta1.Asset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Asset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Asset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java deleted file mode 100644 index c7aacd76368d..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java +++ /dev/null @@ -1,171 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface AssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.Asset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - boolean hasResource(); - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - * @return The resource. - */ - com.google.cloud.asset.v1p2beta1.Resource getResource(); - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Resource resource = 3; - */ - com.google.cloud.asset.v1p2beta1.ResourceOrBuilder getResourceOrBuilder(); - - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - boolean hasIamPolicy(); - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - com.google.iam.v1.Policy getIamPolicy(); - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); - - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @return A list containing the ancestors. - */ - java.util.List - getAncestorsList(); - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @return The count of ancestors. - */ - int getAncestorsCount(); - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - java.lang.String getAncestors(int index); - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 6; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - com.google.protobuf.ByteString - getAncestorsBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java deleted file mode 100644 index 6e5b09f52b61..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java +++ /dev/null @@ -1,108 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -public final class AssetProto { - private AssetProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/asset/v1p2beta1/assets.pr" + - "oto\022\034google.cloud.asset.v1p2beta1\032\032googl" + - "e/iam/v1/policy.proto\032\034google/protobuf/s" + - "truct.proto\032\037google/protobuf/timestamp.p" + - "roto\"\216\001\n\rTemporalAsset\0228\n\006window\030\001 \001(\0132(" + - ".google.cloud.asset.v1p2beta1.TimeWindow" + - "\022\017\n\007deleted\030\002 \001(\010\0222\n\005asset\030\003 \001(\0132#.googl" + - "e.cloud.asset.v1p2beta1.Asset\"j\n\nTimeWin" + - "dow\022.\n\nstart_time\030\001 \001(\0132\032.google.protobu" + - "f.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google.p" + - "rotobuf.Timestamp\"\241\001\n\005Asset\022\014\n\004name\030\001 \001(" + - "\t\022\022\n\nasset_type\030\002 \001(\t\0228\n\010resource\030\003 \001(\0132" + - "&.google.cloud.asset.v1p2beta1.Resource\022" + - ")\n\niam_policy\030\004 \001(\0132\025.google.iam.v1.Poli" + - "cy\022\021\n\tancestors\030\006 \003(\t\"\240\001\n\010Resource\022\017\n\007ve" + - "rsion\030\001 \001(\t\022\036\n\026discovery_document_uri\030\002 " + - "\001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014resource_" + - "url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006 \001(\0132" + - "\027.google.protobuf.StructB\264\001\n com.google." + - "cloud.asset.v1p2beta1B\nAssetProtoP\001ZAgoo" + - "gle.golang.org/genproto/googleapis/cloud" + - "/asset/v1p2beta1;asset\370\001\001\252\002\034Google.Cloud" + - ".Asset.v1p2beta1\312\002\034Google\\Cloud\\Asset\\V1" + - "p2beta1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor, - new java.lang.String[] { "Window", "Deleted", "Asset", }); - internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor, - new java.lang.String[] { "StartTime", "EndTime", }); - internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p2beta1_Asset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_Asset_descriptor, - new java.lang.String[] { "Name", "AssetType", "Resource", "IamPolicy", "Ancestors", }); - internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor, - new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", }); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java deleted file mode 100644 index 4dac20305692..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java +++ /dev/null @@ -1,245 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public final class AssetServiceProto { - private AssetServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n0google/cloud/asset/v1p2beta1/asset_ser" + - "vice.proto\022\034google.cloud.asset.v1p2beta1" + - "\032\034google/api/annotations.proto\032\027google/a" + - "pi/client.proto\032\037google/api/field_behavi" + - "or.proto\032\031google/api/resource.proto\032)goo" + - "gle/cloud/asset/v1p2beta1/assets.proto\032\033" + - "google/protobuf/empty.proto\032 google/prot" + - "obuf/field_mask.proto\"u\n\021CreateFeedReque" + - "st\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\t" + - "B\003\340A\002\0225\n\004feed\030\003 \001(\0132\".google.cloud.asset" + - ".v1p2beta1.FeedB\003\340A\002\"F\n\016GetFeedRequest\0224" + - "\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset.googlea" + - "pis.com/Feed\"\'\n\020ListFeedsRequest\022\023\n\006pare" + - "nt\030\001 \001(\tB\003\340A\002\"F\n\021ListFeedsResponse\0221\n\005fe" + - "eds\030\001 \003(\0132\".google.cloud.asset.v1p2beta1" + - ".Feed\"\200\001\n\021UpdateFeedRequest\0225\n\004feed\030\001 \001(" + - "\0132\".google.cloud.asset.v1p2beta1.FeedB\003\340" + - "A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobu" + - "f.FieldMaskB\003\340A\002\"I\n\021DeleteFeedRequest\0224\n" + - "\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset.googleap" + - "is.com/Feed\"f\n\014OutputConfig\022G\n\017gcs_desti" + - "nation\030\001 \001(\0132,.google.cloud.asset.v1p2be" + - "ta1.GcsDestinationH\000B\r\n\013destination\"-\n\016G" + - "csDestination\022\r\n\003uri\030\001 \001(\tH\000B\014\n\nobject_u" + - "ri\"\"\n\021PubsubDestination\022\r\n\005topic\030\001 \001(\t\"p" + - "\n\020FeedOutputConfig\022M\n\022pubsub_destination" + - "\030\001 \001(\0132/.google.cloud.asset.v1p2beta1.Pu" + - "bsubDestinationH\000B\r\n\013destination\"\351\002\n\004Fee" + - "d\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013asset_names\030\002 \003(" + - "\t\022\023\n\013asset_types\030\003 \003(\t\022?\n\014content_type\030\004" + - " \001(\0162).google.cloud.asset.v1p2beta1.Cont" + - "entType\022O\n\022feed_output_config\030\005 \001(\0132..go" + - "ogle.cloud.asset.v1p2beta1.FeedOutputCon" + - "figB\003\340A\002:\221\001\352A\215\001\n\036cloudasset.googleapis.c" + - "om/Feed\022\037projects/{project}/feeds/{feed}" + - "\022\035folders/{folder}/feeds/{feed}\022)organiz" + - "ations/{organization}/feeds/{feed} \001*I\n\013" + - "ContentType\022\034\n\030CONTENT_TYPE_UNSPECIFIED\020" + - "\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY\020\0022\277\006\n\014Asse" + - "tService\022\224\001\n\nCreateFeed\022/.google.cloud.a" + - "sset.v1p2beta1.CreateFeedRequest\032\".googl" + - "e.cloud.asset.v1p2beta1.Feed\"1\202\323\344\223\002\"\"\035/v" + - "1p2beta1/{parent=*/*}/feeds:\001*\332A\006parent\022" + - "\211\001\n\007GetFeed\022,.google.cloud.asset.v1p2bet" + - "a1.GetFeedRequest\032\".google.cloud.asset.v" + - "1p2beta1.Feed\",\202\323\344\223\002\037\022\035/v1p2beta1/{name=" + - "*/*/feeds/*}\332A\004name\022\234\001\n\tListFeeds\022..goog" + - "le.cloud.asset.v1p2beta1.ListFeedsReques" + - "t\032/.google.cloud.asset.v1p2beta1.ListFee" + - "dsResponse\".\202\323\344\223\002\037\022\035/v1p2beta1/{parent=*" + - "/*}/feeds\332A\006parent\022\227\001\n\nUpdateFeed\022/.goog" + - "le.cloud.asset.v1p2beta1.UpdateFeedReque" + - "st\032\".google.cloud.asset.v1p2beta1.Feed\"4" + - "\202\323\344\223\002\'2\"/v1p2beta1/{feed.name=*/*/feeds/" + - "*}:\001*\332A\004feed\022\203\001\n\nDeleteFeed\022/.google.clo" + - "ud.asset.v1p2beta1.DeleteFeedRequest\032\026.g" + - "oogle.protobuf.Empty\",\202\323\344\223\002\037*\035/v1p2beta1" + - "/{name=*/*/feeds/*}\332A\004name\032M\312A\031cloudasse" + - "t.googleapis.com\322A.https://www.googleapi" + - "s.com/auth/cloud-platformB\270\001\n com.google" + - ".cloud.asset.v1p2beta1B\021AssetServiceProt" + - "oP\001ZAgoogle.golang.org/genproto/googleap" + - "is/cloud/asset/v1p2beta1;asset\252\002\034Google." + - "Cloud.Asset.V1p2Beta1\312\002\034Google\\Cloud\\Ass" + - "et\\V1p2beta1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.asset.v1p2beta1.AssetProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor, - new java.lang.String[] { "Parent", "FeedId", "Feed", }); - internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor, - new java.lang.String[] { "Parent", }); - internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor, - new java.lang.String[] { "Feeds", }); - internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor, - new java.lang.String[] { "Feed", "UpdateMask", }); - internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor, - new java.lang.String[] { "GcsDestination", "Destination", }); - internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor, - new java.lang.String[] { "Uri", "ObjectUri", }); - internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor, - new java.lang.String[] { "Topic", }); - internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor, - new java.lang.String[] { "PubsubDestination", "Destination", }); - internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor, - new java.lang.String[] { "Name", "AssetNames", "AssetTypes", "ContentType", "FeedOutputConfig", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.asset.v1p2beta1.AssetProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java deleted file mode 100644 index dffdb7a8ca46..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java +++ /dev/null @@ -1,150 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Asset content type.
- * 
- * - * Protobuf enum {@code google.cloud.asset.v1p2beta1.ContentType} - */ -public enum ContentType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - CONTENT_TYPE_UNSPECIFIED(0), - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - RESOURCE(1), - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - IAM_POLICY(2), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - public static final int RESOURCE_VALUE = 1; - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - public static final int IAM_POLICY_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContentType forNumber(int value) { - switch (value) { - case 0: return CONTENT_TYPE_UNSPECIFIED; - case 1: return RESOURCE; - case 2: return IAM_POLICY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ContentType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContentType findValueByNumber(int number) { - return ContentType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); - } - - private static final ContentType[] VALUES = values(); - - public static ContentType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContentType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p2beta1.ContentType) -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java deleted file mode 100644 index d71caa2b7eaf..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java +++ /dev/null @@ -1,1080 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Create asset feed request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.CreateFeedRequest} - */ -public final class CreateFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.CreateFeedRequest) - CreateFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateFeedRequest.newBuilder() to construct. - private CreateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateFeedRequest() { - parent_ = ""; - feedId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - feedId_ = s; - break; - } - case 26: { - com.google.cloud.asset.v1p2beta1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.CreateFeedRequest.class, com.google.cloud.asset.v1p2beta1.CreateFeedRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEED_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object feedId_; - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedId. - */ - @java.lang.Override - public java.lang.String getFeedId() { - java.lang.Object ref = feedId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - feedId_ = s; - return s; - } - } - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for feedId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFeedIdBytes() { - java.lang.Object ref = feedId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - feedId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEED_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1p2beta1.Feed feed_; - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be generated
-   * in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - @java.lang.Override - public boolean hasFeed() { - return feed_ != null; - } - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be generated
-   * in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Feed getFeed() { - return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; - } - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be generated
-   * in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { - return getFeed(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, feedId_); - } - if (feed_ != null) { - output.writeMessage(3, getFeed()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, feedId_); - } - if (feed_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getFeed()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.CreateFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.CreateFeedRequest other = (com.google.cloud.asset.v1p2beta1.CreateFeedRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!getFeedId() - .equals(other.getFeedId())) return false; - if (hasFeed() != other.hasFeed()) return false; - if (hasFeed()) { - if (!getFeed() - .equals(other.getFeed())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FEED_ID_FIELD_NUMBER; - hash = (53 * hash) + getFeedId().hashCode(); - if (hasFeed()) { - hash = (37 * hash) + FEED_FIELD_NUMBER; - hash = (53 * hash) + getFeed().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.CreateFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Create asset feed request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.CreateFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.CreateFeedRequest) - com.google.cloud.asset.v1p2beta1.CreateFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.CreateFeedRequest.class, com.google.cloud.asset.v1p2beta1.CreateFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.CreateFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - feedId_ = ""; - - if (feedBuilder_ == null) { - feed_ = null; - } else { - feed_ = null; - feedBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_CreateFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.CreateFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.CreateFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.CreateFeedRequest build() { - com.google.cloud.asset.v1p2beta1.CreateFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.CreateFeedRequest buildPartial() { - com.google.cloud.asset.v1p2beta1.CreateFeedRequest result = new com.google.cloud.asset.v1p2beta1.CreateFeedRequest(this); - result.parent_ = parent_; - result.feedId_ = feedId_; - if (feedBuilder_ == null) { - result.feed_ = feed_; - } else { - result.feed_ = feedBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.CreateFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.CreateFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.CreateFeedRequest other) { - if (other == com.google.cloud.asset.v1p2beta1.CreateFeedRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFeedId().isEmpty()) { - feedId_ = other.feedId_; - onChanged(); - } - if (other.hasFeed()) { - mergeFeed(other.getFeed()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.CreateFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.CreateFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the project/folder/organization where this feed
-     * should be created in. It can only be an organization number (such as
-     * "organizations/123"), a folder number (such as "folders/123"), a project ID
-     * (such as "projects/my-project-id")", or a project number (such as
-     * "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private java.lang.Object feedId_ = ""; - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedId. - */ - public java.lang.String getFeedId() { - java.lang.Object ref = feedId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - feedId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for feedId. - */ - public com.google.protobuf.ByteString - getFeedIdBytes() { - java.lang.Object ref = feedId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - feedId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The feedId to set. - * @return This builder for chaining. - */ - public Builder setFeedId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - feedId_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearFeedId() { - - feedId_ = getDefaultInstance().getFeedId(); - onChanged(); - return this; - } - /** - *
-     * Required. This is the client-assigned asset feed identifier and it needs to
-     * be unique under a specific parent project/folder/organization.
-     * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for feedId to set. - * @return This builder for chaining. - */ - public Builder setFeedIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - feedId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p2beta1.Feed feed_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> feedBuilder_; - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - public boolean hasFeed() { - return feedBuilder_ != null || feed_ != null; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - public com.google.cloud.asset.v1p2beta1.Feed getFeed() { - if (feedBuilder_ == null) { - return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; - } else { - return feedBuilder_.getMessage(); - } - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { - if (feedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - feed_ = value; - onChanged(); - } else { - feedBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed( - com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { - if (feedBuilder_ == null) { - feed_ = builderForValue.build(); - onChanged(); - } else { - feedBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { - if (feedBuilder_ == null) { - if (feed_ != null) { - feed_ = - com.google.cloud.asset.v1p2beta1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); - } else { - feed_ = value; - } - onChanged(); - } else { - feedBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFeed() { - if (feedBuilder_ == null) { - feed_ = null; - onChanged(); - } else { - feed_ = null; - feedBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { - - onChanged(); - return getFeedFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { - if (feedBuilder_ != null) { - return feedBuilder_.getMessageOrBuilder(); - } else { - return feed_ == null ? - com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; - } - } - /** - *
-     * Required. The feed details. The field `name` must be empty and it will be generated
-     * in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> - getFeedFieldBuilder() { - if (feedBuilder_ == null) { - feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder>( - getFeed(), - getParentForChildren(), - isClean()); - feed_ = null; - } - return feedBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.CreateFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.CreateFeedRequest) - private static final com.google.cloud.asset.v1p2beta1.CreateFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.CreateFeedRequest(); - } - - public static com.google.cloud.asset.v1p2beta1.CreateFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.CreateFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java deleted file mode 100644 index c8fc925433a5..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequestOrBuilder.java +++ /dev/null @@ -1,98 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface CreateFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.CreateFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The name of the project/folder/organization where this feed
-   * should be created in. It can only be an organization number (such as
-   * "organizations/123"), a folder number (such as "folders/123"), a project ID
-   * (such as "projects/my-project-id")", or a project number (such as
-   * "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedId. - */ - java.lang.String getFeedId(); - /** - *
-   * Required. This is the client-assigned asset feed identifier and it needs to
-   * be unique under a specific parent project/folder/organization.
-   * 
- * - * string feed_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for feedId. - */ - com.google.protobuf.ByteString - getFeedIdBytes(); - - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be generated
-   * in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - boolean hasFeed(); - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be generated
-   * in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - com.google.cloud.asset.v1p2beta1.Feed getFeed(); - /** - *
-   * Required. The feed details. The field `name` must be empty and it will be generated
-   * in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java deleted file mode 100644 index a1f0cd948ce0..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequest.java +++ /dev/null @@ -1,608 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - * Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} - */ -public final class DeleteFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.DeleteFeedRequest) - DeleteFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteFeedRequest.newBuilder() to construct. - private DeleteFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteFeedRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DeleteFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.class, com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.DeleteFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest other = (com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.DeleteFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code google.cloud.asset.v1p2beta1.DeleteFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.DeleteFeedRequest) - com.google.cloud.asset.v1p2beta1.DeleteFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.class, com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_DeleteFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest build() { - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest buildPartial() { - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest result = new com.google.cloud.asset.v1p2beta1.DeleteFeedRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.DeleteFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.DeleteFeedRequest other) { - if (other == com.google.cloud.asset.v1p2beta1.DeleteFeedRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.DeleteFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.DeleteFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.DeleteFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.DeleteFeedRequest) - private static final com.google.cloud.asset.v1p2beta1.DeleteFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.DeleteFeedRequest(); - } - - public static com.google.cloud.asset.v1p2beta1.DeleteFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.DeleteFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java deleted file mode 100644 index 7e01ca30edd5..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/DeleteFeedRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface DeleteFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.DeleteFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java deleted file mode 100644 index 3b05f4e0d247..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java +++ /dev/null @@ -1,1677 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * An asset feed used to export asset updates to a destinations.
- * An asset feed filter controls what updates are exported.
- * The asset feed must be created within a project, organization, or
- * folder. Supported destinations are:
- * Cloud Pub/Sub topics.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.Feed} - */ -public final class Feed extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.Feed) - FeedOrBuilder { -private static final long serialVersionUID = 0L; - // Use Feed.newBuilder() to construct. - private Feed(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Feed() { - name_ = ""; - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Feed(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Feed( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetNames_.add(s); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - assetTypes_.add(s); - break; - } - case 32: { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: { - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder subBuilder = null; - if (feedOutputConfig_ != null) { - subBuilder = feedOutputConfig_.toBuilder(); - } - feedOutputConfig_ = input.readMessage(com.google.cloud.asset.v1p2beta1.FeedOutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feedOutputConfig_); - feedOutputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.Feed.class, com.google.cloud.asset.v1p2beta1.Feed.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList assetNames_; - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList - getAssetNamesList() { - return assetNames_; - } - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString - getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 4; - private int contentType_; - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p2beta1.ContentType result = com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; - } - - public static final int FEED_OUTPUT_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1p2beta1.FeedOutputConfig feedOutputConfig_; - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feedOutputConfig field is set. - */ - @java.lang.Override - public boolean hasFeedOutputConfig() { - return feedOutputConfig_ != null; - } - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedOutputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() { - return feedOutputConfig_ == null ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; - } - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { - return getFeedOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < assetNames_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetNames_.getRaw(i)); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (contentType_ != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, contentType_); - } - if (feedOutputConfig_ != null) { - output.writeMessage(5, getFeedOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - { - int dataSize = 0; - for (int i = 0; i < assetNames_.size(); i++) { - dataSize += computeStringSizeNoTag(assetNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetNamesList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (contentType_ != com.google.cloud.asset.v1p2beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, contentType_); - } - if (feedOutputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getFeedOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.Feed)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.Feed other = (com.google.cloud.asset.v1p2beta1.Feed) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getAssetNamesList() - .equals(other.getAssetNamesList())) return false; - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (contentType_ != other.contentType_) return false; - if (hasFeedOutputConfig() != other.hasFeedOutputConfig()) return false; - if (hasFeedOutputConfig()) { - if (!getFeedOutputConfig() - .equals(other.getFeedOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (getAssetNamesCount() > 0) { - hash = (37 * hash) + ASSET_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getAssetNamesList().hashCode(); - } - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - if (hasFeedOutputConfig()) { - hash = (37 * hash) + FEED_OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getFeedOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Feed parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.Feed prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An asset feed used to export asset updates to a destinations.
-   * An asset feed filter controls what updates are exported.
-   * The asset feed must be created within a project, organization, or
-   * folder. Supported destinations are:
-   * Cloud Pub/Sub topics.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.Feed} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.Feed) - com.google.cloud.asset.v1p2beta1.FeedOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.Feed.class, com.google.cloud.asset.v1p2beta1.Feed.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.Feed.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - contentType_ = 0; - - if (feedOutputConfigBuilder_ == null) { - feedOutputConfig_ = null; - } else { - feedOutputConfig_ = null; - feedOutputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_Feed_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Feed getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Feed build() { - com.google.cloud.asset.v1p2beta1.Feed result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Feed buildPartial() { - com.google.cloud.asset.v1p2beta1.Feed result = new com.google.cloud.asset.v1p2beta1.Feed(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (((bitField0_ & 0x00000001) != 0)) { - assetNames_ = assetNames_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetNames_ = assetNames_; - if (((bitField0_ & 0x00000002) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.assetTypes_ = assetTypes_; - result.contentType_ = contentType_; - if (feedOutputConfigBuilder_ == null) { - result.feedOutputConfig_ = feedOutputConfig_; - } else { - result.feedOutputConfig_ = feedOutputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.Feed) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.Feed)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Feed other) { - if (other == com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.assetNames_.isEmpty()) { - if (assetNames_.isEmpty()) { - assetNames_ = other.assetNames_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetNamesIsMutable(); - assetNames_.addAll(other.assetNames_); - } - onChanged(); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.hasFeedOutputConfig()) { - mergeFeedOutputConfig(other.getFeedOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.Feed parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.Feed) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The format will be
-     * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-     * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-     * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-     * The client-assigned feed identifier must be unique within the parent
-     * project/folder/organization.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetNamesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetNames_ = new com.google.protobuf.LazyStringArrayList(assetNames_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - public com.google.protobuf.ProtocolStringList - getAssetNamesList() { - return assetNames_.getUnmodifiableView(); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - public int getAssetNamesCount() { - return assetNames_.size(); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - public java.lang.String getAssetNames(int index) { - return assetNames_.get(index); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - public com.google.protobuf.ByteString - getAssetNamesBytes(int index) { - return assetNames_.getByteString(index); - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @param index The index to set the value at. - * @param value The assetNames to set. - * @return This builder for chaining. - */ - public Builder setAssetNames( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @param value The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNames( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @param values The assetNames to add. - * @return This builder for chaining. - */ - public Builder addAllAssetNames( - java.lang.Iterable values) { - ensureAssetNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetNames_); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @return This builder for chaining. - */ - public Builder clearAssetNames() { - assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of the full names of the assets to receive updates. You must specify
-     * either or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed. For
-     * example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more info.
-     * 
- * - * repeated string asset_names = 2; - * @param value The bytes of the assetNames to add. - * @return This builder for chaining. - */ - public Builder addAssetNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetNamesIsMutable(); - assetNames_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A list of types of the assets to receive updates. You must specify either
-     * or both of asset_names and asset_types. Only asset updates matching
-     * specified asset_names and asset_types are exported to the feed.
-     * For example:
-     * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - - contentType_ = value; - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p2beta1.ContentType result = com.google.cloud.asset.v1p2beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p2beta1.ContentType.UNRECOGNIZED : result; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1p2beta1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name and
-     * type will be returned.
-     * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p2beta1.FeedOutputConfig feedOutputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.FeedOutputConfig, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder, com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder> feedOutputConfigBuilder_; - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feedOutputConfig field is set. - */ - public boolean hasFeedOutputConfig() { - return feedOutputConfigBuilder_ != null || feedOutputConfig_ != null; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedOutputConfig. - */ - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig() { - if (feedOutputConfigBuilder_ == null) { - return feedOutputConfig_ == null ? com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; - } else { - return feedOutputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) { - if (feedOutputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - feedOutputConfig_ = value; - onChanged(); - } else { - feedOutputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeedOutputConfig( - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder builderForValue) { - if (feedOutputConfigBuilder_ == null) { - feedOutputConfig_ = builderForValue.build(); - onChanged(); - } else { - feedOutputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeFeedOutputConfig(com.google.cloud.asset.v1p2beta1.FeedOutputConfig value) { - if (feedOutputConfigBuilder_ == null) { - if (feedOutputConfig_ != null) { - feedOutputConfig_ = - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.newBuilder(feedOutputConfig_).mergeFrom(value).buildPartial(); - } else { - feedOutputConfig_ = value; - } - onChanged(); - } else { - feedOutputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFeedOutputConfig() { - if (feedOutputConfigBuilder_ == null) { - feedOutputConfig_ = null; - onChanged(); - } else { - feedOutputConfig_ = null; - feedOutputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder getFeedOutputConfigBuilder() { - - onChanged(); - return getFeedOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder() { - if (feedOutputConfigBuilder_ != null) { - return feedOutputConfigBuilder_.getMessageOrBuilder(); - } else { - return feedOutputConfig_ == null ? - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance() : feedOutputConfig_; - } - } - /** - *
-     * Required. Feed output configuration defining where the asset updates are
-     * published to.
-     * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.FeedOutputConfig, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder, com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder> - getFeedOutputConfigFieldBuilder() { - if (feedOutputConfigBuilder_ == null) { - feedOutputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.FeedOutputConfig, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder, com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder>( - getFeedOutputConfig(), - getParentForChildren(), - isClean()); - feedOutputConfig_ = null; - } - return feedOutputConfigBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.Feed) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Feed) - private static final com.google.cloud.asset.v1p2beta1.Feed DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.Feed(); - } - - public static com.google.cloud.asset.v1p2beta1.Feed getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Feed parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Feed(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Feed getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java deleted file mode 100644 index 1c7c622a2f33..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class FeedName implements ResourceName { - private static final PathTemplate PROJECT_FEED = - PathTemplate.createWithoutUrlEncoding("projects/{project}/feeds/{feed}"); - private static final PathTemplate FOLDER_FEED = - PathTemplate.createWithoutUrlEncoding("folders/{folder}/feeds/{feed}"); - private static final PathTemplate ORGANIZATION_FEED = - PathTemplate.createWithoutUrlEncoding("organizations/{organization}/feeds/{feed}"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String feed; - private final String folder; - private final String organization; - - @Deprecated - protected FeedName() { - project = null; - feed = null; - folder = null; - organization = null; - } - - private FeedName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - feed = Preconditions.checkNotNull(builder.getFeed()); - folder = null; - organization = null; - pathTemplate = PROJECT_FEED; - } - - private FeedName(FolderFeedBuilder builder) { - folder = Preconditions.checkNotNull(builder.getFolder()); - feed = Preconditions.checkNotNull(builder.getFeed()); - project = null; - organization = null; - pathTemplate = FOLDER_FEED; - } - - private FeedName(OrganizationFeedBuilder builder) { - organization = Preconditions.checkNotNull(builder.getOrganization()); - feed = Preconditions.checkNotNull(builder.getFeed()); - project = null; - folder = null; - pathTemplate = ORGANIZATION_FEED; - } - - public String getProject() { - return project; - } - - public String getFeed() { - return feed; - } - - public String getFolder() { - return folder; - } - - public String getOrganization() { - return organization; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectFeedBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static FolderFeedBuilder newFolderFeedBuilder() { - return new FolderFeedBuilder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static OrganizationFeedBuilder newOrganizationFeedBuilder() { - return new OrganizationFeedBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static FeedName of(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FeedName ofProjectFeedName(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FeedName ofFolderFeedName(String folder, String feed) { - return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static FeedName ofOrganizationFeedName(String organization, String feed) { - return newOrganizationFeedBuilder().setOrganization(organization).setFeed(feed).build(); - } - - public static String format(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectFeedName(String project, String feed) { - return newBuilder().setProject(project).setFeed(feed).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatFolderFeedName(String folder, String feed) { - return newFolderFeedBuilder().setFolder(folder).setFeed(feed).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatOrganizationFeedName(String organization, String feed) { - return newOrganizationFeedBuilder() - .setOrganization(organization) - .setFeed(feed) - .build() - .toString(); - } - - public static FeedName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT_FEED.matches(formattedString)) { - Map matchMap = PROJECT_FEED.match(formattedString); - return ofProjectFeedName(matchMap.get("project"), matchMap.get("feed")); - } else if (FOLDER_FEED.matches(formattedString)) { - Map matchMap = FOLDER_FEED.match(formattedString); - return ofFolderFeedName(matchMap.get("folder"), matchMap.get("feed")); - } else if (ORGANIZATION_FEED.matches(formattedString)) { - Map matchMap = ORGANIZATION_FEED.match(formattedString); - return ofOrganizationFeedName(matchMap.get("organization"), matchMap.get("feed")); - } - throw new ValidationException("FeedName.parse: formattedString not in valid format"); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (FeedName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_FEED.matches(formattedString) - || FOLDER_FEED.matches(formattedString) - || ORGANIZATION_FEED.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (feed != null) { - fieldMapBuilder.put("feed", feed); - } - if (folder != null) { - fieldMapBuilder.put("folder", folder); - } - if (organization != null) { - fieldMapBuilder.put("organization", organization); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - FeedName that = ((FeedName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.feed, that.feed) - && Objects.equals(this.folder, that.folder) - && Objects.equals(this.organization, that.organization); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(feed); - h *= 1000003; - h ^= Objects.hashCode(folder); - h *= 1000003; - h ^= Objects.hashCode(organization); - return h; - } - - /** Builder for projects/{project}/feeds/{feed}. */ - public static class Builder { - private String project; - private String feed; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getFeed() { - return feed; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setFeed(String feed) { - this.feed = feed; - return this; - } - - private Builder(FeedName feedName) { - Preconditions.checkArgument( - Objects.equals(feedName.pathTemplate, PROJECT_FEED), - "toBuilder is only supported when FeedName has the pattern of projects/{project}/feeds/{feed}"); - this.project = feedName.project; - this.feed = feedName.feed; - } - - public FeedName build() { - return new FeedName(this); - } - } - - /** Builder for folders/{folder}/feeds/{feed}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class FolderFeedBuilder { - private String folder; - private String feed; - - protected FolderFeedBuilder() {} - - public String getFolder() { - return folder; - } - - public String getFeed() { - return feed; - } - - public FolderFeedBuilder setFolder(String folder) { - this.folder = folder; - return this; - } - - public FolderFeedBuilder setFeed(String feed) { - this.feed = feed; - return this; - } - - public FeedName build() { - return new FeedName(this); - } - } - - /** Builder for organizations/{organization}/feeds/{feed}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class OrganizationFeedBuilder { - private String organization; - private String feed; - - protected OrganizationFeedBuilder() {} - - public String getOrganization() { - return organization; - } - - public String getFeed() { - return feed; - } - - public OrganizationFeedBuilder setOrganization(String organization) { - this.organization = organization; - return this; - } - - public OrganizationFeedBuilder setFeed(String feed) { - this.feed = feed; - return this; - } - - public FeedName build() { - return new FeedName(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java deleted file mode 100644 index 66d4f439178e..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOrBuilder.java +++ /dev/null @@ -1,224 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface FeedOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.Feed) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The format will be
-   * projects/{project_number}/feeds/{client-assigned_feed_identifier} or
-   * folders/{folder_number}/feeds/{client-assigned_feed_identifier} or
-   * organizations/{organization_number}/feeds/{client-assigned_feed_identifier}
-   * The client-assigned feed identifier must be unique within the parent
-   * project/folder/organization.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @return A list containing the assetNames. - */ - java.util.List - getAssetNamesList(); - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @return The count of assetNames. - */ - int getAssetNamesCount(); - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the element to return. - * @return The assetNames at the given index. - */ - java.lang.String getAssetNames(int index); - /** - *
-   * A list of the full names of the assets to receive updates. You must specify
-   * either or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed. For
-   * example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more info.
-   * 
- * - * repeated string asset_names = 2; - * @param index The index of the value to return. - * @return The bytes of the assetNames at the given index. - */ - com.google.protobuf.ByteString - getAssetNamesBytes(int index); - - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * A list of types of the assets to receive updates. You must specify either
-   * or both of asset_names and asset_types. Only asset updates matching
-   * specified asset_names and asset_types are exported to the feed.
-   * For example:
-   * "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - *
-   * Asset content type. If not specified, no content but the asset name and
-   * type will be returned.
-   * 
- * - * .google.cloud.asset.v1p2beta1.ContentType content_type = 4; - * @return The contentType. - */ - com.google.cloud.asset.v1p2beta1.ContentType getContentType(); - - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feedOutputConfig field is set. - */ - boolean hasFeedOutputConfig(); - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The feedOutputConfig. - */ - com.google.cloud.asset.v1p2beta1.FeedOutputConfig getFeedOutputConfig(); - /** - *
-   * Required. Feed output configuration defining where the asset updates are
-   * published to.
-   * 
- * - * .google.cloud.asset.v1p2beta1.FeedOutputConfig feed_output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder getFeedOutputConfigOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java deleted file mode 100644 index 4eb85f514ded..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java +++ /dev/null @@ -1,761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Output configuration for asset feed destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.FeedOutputConfig} - */ -public final class FeedOutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.FeedOutputConfig) - FeedOutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use FeedOutputConfig.newBuilder() to construct. - private FeedOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private FeedOutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new FeedOutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FeedOutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1p2beta1.PubsubDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.class, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - public enum DestinationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PUBSUB_DESTINATION(1), - DESTINATION_NOT_SET(0); - private final int value; - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: return PUBSUB_DESTINATION; - case 0: return DESTINATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public static final int PUBSUB_DESTINATION_FIELD_NUMBER = 1; - /** - *
-   * Destination on Cloud Pubsub.
-   * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - * @return Whether the pubsubDestination field is set. - */ - @java.lang.Override - public boolean hasPubsubDestination() { - return destinationCase_ == 1; - } - /** - *
-   * Destination on Cloud Pubsub.
-   * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - * @return The pubsubDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestination getPubsubDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); - } - /** - *
-   * Destination on Cloud Pubsub.
-   * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.FeedOutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.FeedOutputConfig other = (com.google.cloud.asset.v1p2beta1.FeedOutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getPubsubDestination() - .equals(other.getPubsubDestination())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + PUBSUB_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getPubsubDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.FeedOutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output configuration for asset feed destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.FeedOutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.FeedOutputConfig) - com.google.cloud.asset.v1p2beta1.FeedOutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.FeedOutputConfig.class, com.google.cloud.asset.v1p2beta1.FeedOutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.FeedOutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_FeedOutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig build() { - com.google.cloud.asset.v1p2beta1.FeedOutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig buildPartial() { - com.google.cloud.asset.v1p2beta1.FeedOutputConfig result = new com.google.cloud.asset.v1p2beta1.FeedOutputConfig(this); - if (destinationCase_ == 1) { - if (pubsubDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = pubsubDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.FeedOutputConfig) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.FeedOutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.FeedOutputConfig other) { - if (other == com.google.cloud.asset.v1p2beta1.FeedOutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case PUBSUB_DESTINATION: { - mergePubsubDestination(other.getPubsubDestination()); - break; - } - case DESTINATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.FeedOutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.FeedOutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int destinationCase_ = 0; - private java.lang.Object destination_; - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.PubsubDestination, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder, com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder> pubsubDestinationBuilder_; - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - * @return Whether the pubsubDestination field is set. - */ - @java.lang.Override - public boolean hasPubsubDestination() { - return destinationCase_ == 1; - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - * @return The pubsubDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestination getPubsubDestination() { - if (pubsubDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return pubsubDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - public Builder setPubsubDestination(com.google.cloud.asset.v1p2beta1.PubsubDestination value) { - if (pubsubDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - pubsubDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - public Builder setPubsubDestination( - com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder builderForValue) { - if (pubsubDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - pubsubDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - public Builder mergePubsubDestination(com.google.cloud.asset.v1p2beta1.PubsubDestination value) { - if (pubsubDestinationBuilder_ == null) { - if (destinationCase_ == 1 && - destination_ != com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1p2beta1.PubsubDestination.newBuilder((com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - pubsubDestinationBuilder_.mergeFrom(value); - } else { - pubsubDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - public Builder clearPubsubDestination() { - if (pubsubDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - pubsubDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - public com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder getPubsubDestinationBuilder() { - return getPubsubDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder() { - if ((destinationCase_ == 1) && (pubsubDestinationBuilder_ != null)) { - return pubsubDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Pubsub.
-     * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.PubsubDestination, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder, com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder> - getPubsubDestinationFieldBuilder() { - if (pubsubDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); - } - pubsubDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.PubsubDestination, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder, com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder>( - (com.google.cloud.asset.v1p2beta1.PubsubDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged();; - return pubsubDestinationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.FeedOutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.FeedOutputConfig) - private static final com.google.cloud.asset.v1p2beta1.FeedOutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.FeedOutputConfig(); - } - - public static com.google.cloud.asset.v1p2beta1.FeedOutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FeedOutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FeedOutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java deleted file mode 100644 index be3215779213..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfigOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface FeedOutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.FeedOutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Destination on Cloud Pubsub.
-   * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - * @return Whether the pubsubDestination field is set. - */ - boolean hasPubsubDestination(); - /** - *
-   * Destination on Cloud Pubsub.
-   * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - * @return The pubsubDestination. - */ - com.google.cloud.asset.v1p2beta1.PubsubDestination getPubsubDestination(); - /** - *
-   * Destination on Cloud Pubsub.
-   * 
- * - * .google.cloud.asset.v1p2beta1.PubsubDestination pubsub_destination = 1; - */ - com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder getPubsubDestinationOrBuilder(); - - public com.google.cloud.asset.v1p2beta1.FeedOutputConfig.DestinationCase getDestinationCase(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java deleted file mode 100644 index 976185abc7be..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestination.java +++ /dev/null @@ -1,750 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * A Cloud Storage location.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.GcsDestination} - */ -public final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.GcsDestination) - GcsDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 1; - objectUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.GcsDestination.class, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder.class); - } - - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - public enum ObjectUriCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - URI(1), - OBJECTURI_NOT_SET(0); - private final int value; - private ObjectUriCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ObjectUriCase valueOf(int value) { - return forNumber(value); - } - - public static ObjectUriCase forNumber(int value) { - switch (value) { - case 1: return URI; - case 0: return OBJECTURI_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ObjectUriCase - getObjectUriCase() { - return ObjectUriCase.forNumber( - objectUriCase_); - } - - public static final int URI_FIELD_NUMBER = 1; - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - public boolean hasUri() { - return objectUriCase_ == 1; - } - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 1) { - objectUri_ = s; - } - return s; - } - } - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (objectUriCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (objectUriCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.GcsDestination other = (com.google.cloud.asset.v1p2beta1.GcsDestination) obj; - - if (!getObjectUriCase().equals(other.getObjectUriCase())) return false; - switch (objectUriCase_) { - case 1: - if (!getUri() - .equals(other.getUri())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (objectUriCase_) { - case 1: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Cloud Storage location.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.GcsDestination) - com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.GcsDestination.class, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - objectUriCase_ = 0; - objectUri_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestination build() { - com.google.cloud.asset.v1p2beta1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestination buildPartial() { - com.google.cloud.asset.v1p2beta1.GcsDestination result = new com.google.cloud.asset.v1p2beta1.GcsDestination(this); - if (objectUriCase_ == 1) { - result.objectUri_ = objectUri_; - } - result.objectUriCase_ = objectUriCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.GcsDestination) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.GcsDestination other) { - if (other == com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance()) return this; - switch (other.getObjectUriCase()) { - case URI: { - objectUriCase_ = 1; - objectUri_ = other.objectUri_; - onChanged(); - break; - } - case OBJECTURI_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - public ObjectUriCase - getObjectUriCase() { - return ObjectUriCase.forNumber( - objectUriCase_); - } - - public Builder clearObjectUri() { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - return this; - } - - - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - @java.lang.Override - public boolean hasUri() { - return objectUriCase_ == 1; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 1) { - objectUri_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectUriCase_ = 1; - objectUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - if (objectUriCase_ == 1) { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectUriCase_ = 1; - objectUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.GcsDestination) - private static final com.google.cloud.asset.v1p2beta1.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.GcsDestination(); - } - - public static com.google.cloud.asset.v1p2beta1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java deleted file mode 100644 index 083a2c545a11..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - boolean hasUri(); - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - public com.google.cloud.asset.v1p2beta1.GcsDestination.ObjectUriCase getObjectUriCase(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java deleted file mode 100644 index e5959c1a559d..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequest.java +++ /dev/null @@ -1,616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Get asset feed request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.GetFeedRequest} - */ -public final class GetFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.GetFeedRequest) - GetFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetFeedRequest.newBuilder() to construct. - private GetFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetFeedRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GetFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.GetFeedRequest.class, com.google.cloud.asset.v1p2beta1.GetFeedRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.GetFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.GetFeedRequest other = (com.google.cloud.asset.v1p2beta1.GetFeedRequest) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.GetFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Get asset feed request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.GetFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.GetFeedRequest) - com.google.cloud.asset.v1p2beta1.GetFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.GetFeedRequest.class, com.google.cloud.asset.v1p2beta1.GetFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.GetFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_GetFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GetFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.GetFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GetFeedRequest build() { - com.google.cloud.asset.v1p2beta1.GetFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GetFeedRequest buildPartial() { - com.google.cloud.asset.v1p2beta1.GetFeedRequest result = new com.google.cloud.asset.v1p2beta1.GetFeedRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.GetFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.GetFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.GetFeedRequest other) { - if (other == com.google.cloud.asset.v1p2beta1.GetFeedRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.GetFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.GetFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * Required. The name of the Feed and it must be in the format of:
-     * projects/project_number/feeds/feed_id
-     * folders/folder_number/feeds/feed_id
-     * organizations/organization_number/feeds/feed_id
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.GetFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.GetFeedRequest) - private static final com.google.cloud.asset.v1p2beta1.GetFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.GetFeedRequest(); - } - - public static com.google.cloud.asset.v1p2beta1.GetFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GetFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java deleted file mode 100644 index 1e57a7098971..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/GetFeedRequestOrBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface GetFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.GetFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * Required. The name of the Feed and it must be in the format of:
-   * projects/project_number/feeds/feed_id
-   * folders/folder_number/feeds/feed_id
-   * organizations/organization_number/feeds/feed_id
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java deleted file mode 100644 index ce368c5c9d6a..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequest.java +++ /dev/null @@ -1,609 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * List asset feeds request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsRequest} - */ -public final class ListFeedsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.ListFeedsRequest) - ListFeedsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListFeedsRequest.newBuilder() to construct. - private ListFeedsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListFeedsRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListFeedsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListFeedsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ListFeedsRequest.class, com.google.cloud.asset.v1p2beta1.ListFeedsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.ListFeedsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.ListFeedsRequest other = (com.google.cloud.asset.v1p2beta1.ListFeedsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.ListFeedsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * List asset feeds request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.ListFeedsRequest) - com.google.cloud.asset.v1p2beta1.ListFeedsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ListFeedsRequest.class, com.google.cloud.asset.v1p2beta1.ListFeedsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.ListFeedsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.ListFeedsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsRequest build() { - com.google.cloud.asset.v1p2beta1.ListFeedsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsRequest buildPartial() { - com.google.cloud.asset.v1p2beta1.ListFeedsRequest result = new com.google.cloud.asset.v1p2beta1.ListFeedsRequest(this); - result.parent_ = parent_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.ListFeedsRequest) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.ListFeedsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ListFeedsRequest other) { - if (other == com.google.cloud.asset.v1p2beta1.ListFeedsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.ListFeedsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.ListFeedsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The parent project/folder/organization whose feeds are to be
-     * listed. It can only be using project/folder/organization number (such as
-     * "folders/12345")", or a project ID (such as "projects/my-project-id").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.ListFeedsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ListFeedsRequest) - private static final com.google.cloud.asset.v1p2beta1.ListFeedsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.ListFeedsRequest(); - } - - public static com.google.cloud.asset.v1p2beta1.ListFeedsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFeedsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java deleted file mode 100644 index 65b8118c4c25..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsRequestOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface ListFeedsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.ListFeedsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The parent project/folder/organization whose feeds are to be
-   * listed. It can only be using project/folder/organization number (such as
-   * "folders/12345")", or a project ID (such as "projects/my-project-id").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java deleted file mode 100644 index cd36a48864a8..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java +++ /dev/null @@ -1,864 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} - */ -public final class ListFeedsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.ListFeedsResponse) - ListFeedsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListFeedsResponse.newBuilder() to construct. - private ListFeedsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListFeedsResponse() { - feeds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListFeedsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListFeedsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - feeds_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - feeds_.add( - input.readMessage(com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - feeds_ = java.util.Collections.unmodifiableList(feeds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ListFeedsResponse.class, com.google.cloud.asset.v1p2beta1.ListFeedsResponse.Builder.class); - } - - public static final int FEEDS_FIELD_NUMBER = 1; - private java.util.List feeds_; - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - @java.lang.Override - public java.util.List getFeedsList() { - return feeds_; - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - @java.lang.Override - public java.util.List - getFeedsOrBuilderList() { - return feeds_; - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - @java.lang.Override - public int getFeedsCount() { - return feeds_.size(); - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Feed getFeeds(int index) { - return feeds_.get(index); - } - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedsOrBuilder( - int index) { - return feeds_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < feeds_.size(); i++) { - output.writeMessage(1, feeds_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < feeds_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, feeds_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.ListFeedsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.ListFeedsResponse other = (com.google.cloud.asset.v1p2beta1.ListFeedsResponse) obj; - - if (!getFeedsList() - .equals(other.getFeedsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getFeedsCount() > 0) { - hash = (37 * hash) + FEEDS_FIELD_NUMBER; - hash = (53 * hash) + getFeedsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.ListFeedsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code google.cloud.asset.v1p2beta1.ListFeedsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.ListFeedsResponse) - com.google.cloud.asset.v1p2beta1.ListFeedsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.ListFeedsResponse.class, com.google.cloud.asset.v1p2beta1.ListFeedsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.ListFeedsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFeedsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (feedsBuilder_ == null) { - feeds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - feedsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_ListFeedsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.ListFeedsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsResponse build() { - com.google.cloud.asset.v1p2beta1.ListFeedsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsResponse buildPartial() { - com.google.cloud.asset.v1p2beta1.ListFeedsResponse result = new com.google.cloud.asset.v1p2beta1.ListFeedsResponse(this); - int from_bitField0_ = bitField0_; - if (feedsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - feeds_ = java.util.Collections.unmodifiableList(feeds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.feeds_ = feeds_; - } else { - result.feeds_ = feedsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.ListFeedsResponse) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.ListFeedsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.ListFeedsResponse other) { - if (other == com.google.cloud.asset.v1p2beta1.ListFeedsResponse.getDefaultInstance()) return this; - if (feedsBuilder_ == null) { - if (!other.feeds_.isEmpty()) { - if (feeds_.isEmpty()) { - feeds_ = other.feeds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFeedsIsMutable(); - feeds_.addAll(other.feeds_); - } - onChanged(); - } - } else { - if (!other.feeds_.isEmpty()) { - if (feedsBuilder_.isEmpty()) { - feedsBuilder_.dispose(); - feedsBuilder_ = null; - feeds_ = other.feeds_; - bitField0_ = (bitField0_ & ~0x00000001); - feedsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeedsFieldBuilder() : null; - } else { - feedsBuilder_.addAllMessages(other.feeds_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.ListFeedsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.ListFeedsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List feeds_ = - java.util.Collections.emptyList(); - private void ensureFeedsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - feeds_ = new java.util.ArrayList(feeds_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> feedsBuilder_; - - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public java.util.List getFeedsList() { - if (feedsBuilder_ == null) { - return java.util.Collections.unmodifiableList(feeds_); - } else { - return feedsBuilder_.getMessageList(); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public int getFeedsCount() { - if (feedsBuilder_ == null) { - return feeds_.size(); - } else { - return feedsBuilder_.getCount(); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1p2beta1.Feed getFeeds(int index) { - if (feedsBuilder_ == null) { - return feeds_.get(index); - } else { - return feedsBuilder_.getMessage(index); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder setFeeds( - int index, com.google.cloud.asset.v1p2beta1.Feed value) { - if (feedsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeedsIsMutable(); - feeds_.set(index, value); - onChanged(); - } else { - feedsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder setFeeds( - int index, com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.set(index, builderForValue.build()); - onChanged(); - } else { - feedsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder addFeeds(com.google.cloud.asset.v1p2beta1.Feed value) { - if (feedsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeedsIsMutable(); - feeds_.add(value); - onChanged(); - } else { - feedsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder addFeeds( - int index, com.google.cloud.asset.v1p2beta1.Feed value) { - if (feedsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFeedsIsMutable(); - feeds_.add(index, value); - onChanged(); - } else { - feedsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder addFeeds( - com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.add(builderForValue.build()); - onChanged(); - } else { - feedsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder addFeeds( - int index, com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.add(index, builderForValue.build()); - onChanged(); - } else { - feedsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder addAllFeeds( - java.lang.Iterable values) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, feeds_); - onChanged(); - } else { - feedsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder clearFeeds() { - if (feedsBuilder_ == null) { - feeds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - feedsBuilder_.clear(); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public Builder removeFeeds(int index) { - if (feedsBuilder_ == null) { - ensureFeedsIsMutable(); - feeds_.remove(index); - onChanged(); - } else { - feedsBuilder_.remove(index); - } - return this; - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedsBuilder( - int index) { - return getFeedsFieldBuilder().getBuilder(index); - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedsOrBuilder( - int index) { - if (feedsBuilder_ == null) { - return feeds_.get(index); } else { - return feedsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public java.util.List - getFeedsOrBuilderList() { - if (feedsBuilder_ != null) { - return feedsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(feeds_); - } - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1p2beta1.Feed.Builder addFeedsBuilder() { - return getFeedsFieldBuilder().addBuilder( - com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance()); - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public com.google.cloud.asset.v1p2beta1.Feed.Builder addFeedsBuilder( - int index) { - return getFeedsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance()); - } - /** - *
-     * A list of feeds.
-     * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - public java.util.List - getFeedsBuilderList() { - return getFeedsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> - getFeedsFieldBuilder() { - if (feedsBuilder_ == null) { - feedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder>( - feeds_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - feeds_ = null; - } - return feedsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.ListFeedsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.ListFeedsResponse) - private static final com.google.cloud.asset.v1p2beta1.ListFeedsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.ListFeedsResponse(); - } - - public static com.google.cloud.asset.v1p2beta1.ListFeedsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListFeedsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFeedsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.ListFeedsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java deleted file mode 100644 index b80afe70fd20..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface ListFeedsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.ListFeedsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - java.util.List - getFeedsList(); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - com.google.cloud.asset.v1p2beta1.Feed getFeeds(int index); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - int getFeedsCount(); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - java.util.List - getFeedsOrBuilderList(); - /** - *
-   * A list of feeds.
-   * 
- * - * repeated .google.cloud.asset.v1p2beta1.Feed feeds = 1; - */ - com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java deleted file mode 100644 index 59309fe7068f..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java +++ /dev/null @@ -1,761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Output configuration for export assets destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.OutputConfig} - */ -public final class OutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.OutputConfig) - OutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1p2beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1p2beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1p2beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.OutputConfig.class, com.google.cloud.asset.v1p2beta1.OutputConfig.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - public enum DestinationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_DESTINATION(1), - DESTINATION_NOT_SET(0); - private final int value; - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: return GCS_DESTINATION; - case 0: return DESTINATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.OutputConfig other = (com.google.cloud.asset.v1p2beta1.OutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output configuration for export assets destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.OutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.OutputConfig) - com.google.cloud.asset.v1p2beta1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.OutputConfig.class, com.google.cloud.asset.v1p2beta1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.OutputConfig build() { - com.google.cloud.asset.v1p2beta1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.OutputConfig buildPartial() { - com.google.cloud.asset.v1p2beta1.OutputConfig result = new com.google.cloud.asset.v1p2beta1.OutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.OutputConfig) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.OutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.OutputConfig other) { - if (other == com.google.cloud.asset.v1p2beta1.OutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case GCS_DESTINATION: { - mergeGcsDestination(other.getGcsDestination()); - break; - } - case DESTINATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int destinationCase_ = 0; - private java.lang.Object destination_; - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.GcsDestination, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.asset.v1p2beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.asset.v1p2beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.asset.v1p2beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 && - destination_ != com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1p2beta1.GcsDestination.newBuilder((com.google.cloud.asset.v1p2beta1.GcsDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - gcsDestinationBuilder_.mergeFrom(value); - } else { - gcsDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - gcsDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.asset.v1p2beta1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.GcsDestination, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.asset.v1p2beta1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.GcsDestination, com.google.cloud.asset.v1p2beta1.GcsDestination.Builder, com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder>( - (com.google.cloud.asset.v1p2beta1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged();; - return gcsDestinationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.OutputConfig) - private static final com.google.cloud.asset.v1p2beta1.OutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.OutputConfig(); - } - - public static com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java deleted file mode 100644 index ce0072cbcb16..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface OutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.asset.v1p2beta1.GcsDestination getGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p2beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.asset.v1p2beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - public com.google.cloud.asset.v1p2beta1.OutputConfig.DestinationCase getDestinationCase(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java deleted file mode 100644 index 10650ce965e8..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestination.java +++ /dev/null @@ -1,602 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * A Cloud Pubsub destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.PubsubDestination} - */ -public final class PubsubDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.PubsubDestination) - PubsubDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use PubsubDestination.newBuilder() to construct. - private PubsubDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PubsubDestination() { - topic_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PubsubDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PubsubDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.PubsubDestination.class, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder.class); - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - *
-   * The name of the Cloud Pub/Sub topic to publish to.
-   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The topic. - */ - @java.lang.Override - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } - } - /** - *
-   * The name of the Cloud Pub/Sub topic to publish to.
-   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.PubsubDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.PubsubDestination other = (com.google.cloud.asset.v1p2beta1.PubsubDestination) obj; - - if (!getTopic() - .equals(other.getTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.PubsubDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.PubsubDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Cloud Pubsub destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.PubsubDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.PubsubDestination) - com.google.cloud.asset.v1p2beta1.PubsubDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.PubsubDestination.class, com.google.cloud.asset.v1p2beta1.PubsubDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.PubsubDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - topic_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_PubsubDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestination build() { - com.google.cloud.asset.v1p2beta1.PubsubDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestination buildPartial() { - com.google.cloud.asset.v1p2beta1.PubsubDestination result = new com.google.cloud.asset.v1p2beta1.PubsubDestination(this); - result.topic_ = topic_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.PubsubDestination) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.PubsubDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.PubsubDestination other) { - if (other == com.google.cloud.asset.v1p2beta1.PubsubDestination.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.PubsubDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.PubsubDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object topic_ = ""; - /** - *
-     * The name of the Cloud Pub/Sub topic to publish to.
-     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @return The topic. - */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The name of the Cloud Pub/Sub topic to publish to.
-     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The name of the Cloud Pub/Sub topic to publish to.
-     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @param value The topic to set. - * @return This builder for chaining. - */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - *
-     * The name of the Cloud Pub/Sub topic to publish to.
-     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @return This builder for chaining. - */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - *
-     * The name of the Cloud Pub/Sub topic to publish to.
-     * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-     * 
- * - * string topic = 1; - * @param value The bytes for topic to set. - * @return This builder for chaining. - */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.PubsubDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.PubsubDestination) - private static final com.google.cloud.asset.v1p2beta1.PubsubDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.PubsubDestination(); - } - - public static com.google.cloud.asset.v1p2beta1.PubsubDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PubsubDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PubsubDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.PubsubDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java deleted file mode 100644 index e6d950141c14..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface PubsubDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.PubsubDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The name of the Cloud Pub/Sub topic to publish to.
-   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The topic. - */ - java.lang.String getTopic(); - /** - *
-   * The name of the Cloud Pub/Sub topic to publish to.
-   * For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
-   * 
- * - * string topic = 1; - * @return The bytes for topic. - */ - com.google.protobuf.ByteString - getTopicBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java deleted file mode 100644 index 49979cd20c15..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Resource.java +++ /dev/null @@ -1,1633 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Representation of a cloud resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.Resource} - */ -public final class Resource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.Resource) - ResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Resource.newBuilder() to construct. - private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Resource() { - version_ = ""; - discoveryDocumentUri_ = ""; - discoveryName_ = ""; - resourceUrl_ = ""; - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Resource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Resource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.Resource.class, com.google.cloud.asset.v1p2beta1.Resource.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object discoveryDocumentUri_; - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - @java.lang.Override - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } - } - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object discoveryName_; - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - @java.lang.Override - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } - } - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceUrl_; - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - @java.lang.Override - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } - } - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 6; - private com.google.protobuf.Struct data_; - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - @java.lang.Override - public boolean hasData() { - return data_ != null; - } - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.Struct getData() { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - return getData(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); - } - if (data_ != null) { - output.writeMessage(6, getData()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); - } - if (data_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getData()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.Resource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.Resource other = (com.google.cloud.asset.v1p2beta1.Resource) obj; - - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getDiscoveryDocumentUri() - .equals(other.getDiscoveryDocumentUri())) return false; - if (!getDiscoveryName() - .equals(other.getDiscoveryName())) return false; - if (!getResourceUrl() - .equals(other.getResourceUrl())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (hasData() != other.hasData()) return false; - if (hasData()) { - if (!getData() - .equals(other.getData())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); - hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryName().hashCode(); - hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResourceUrl().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasData()) { - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.Resource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Representation of a cloud resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.Resource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.Resource) - com.google.cloud.asset.v1p2beta1.ResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.Resource.class, com.google.cloud.asset.v1p2beta1.Resource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.Resource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - discoveryDocumentUri_ = ""; - - discoveryName_ = ""; - - resourceUrl_ = ""; - - parent_ = ""; - - if (dataBuilder_ == null) { - data_ = null; - } else { - data_ = null; - dataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_Resource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Resource getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Resource build() { - com.google.cloud.asset.v1p2beta1.Resource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Resource buildPartial() { - com.google.cloud.asset.v1p2beta1.Resource result = new com.google.cloud.asset.v1p2beta1.Resource(this); - result.version_ = version_; - result.discoveryDocumentUri_ = discoveryDocumentUri_; - result.discoveryName_ = discoveryName_; - result.resourceUrl_ = resourceUrl_; - result.parent_ = parent_; - if (dataBuilder_ == null) { - result.data_ = data_; - } else { - result.data_ = dataBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.Resource) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.Resource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.Resource other) { - if (other == com.google.cloud.asset.v1p2beta1.Resource.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getDiscoveryDocumentUri().isEmpty()) { - discoveryDocumentUri_ = other.discoveryDocumentUri_; - onChanged(); - } - if (!other.getDiscoveryName().isEmpty()) { - discoveryName_ = other.discoveryName_; - onChanged(); - } - if (!other.getResourceUrl().isEmpty()) { - resourceUrl_ = other.resourceUrl_; - onChanged(); - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasData()) { - mergeData(other.getData()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.Resource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.Resource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryDocumentUri_ = ""; - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return This builder for chaining. - */ - public Builder clearDiscoveryDocumentUri() { - - discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The bytes for discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryName_ = ""; - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @param value The discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryName_ = value; - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @return This builder for chaining. - */ - public Builder clearDiscoveryName() { - - discoveryName_ = getDefaultInstance().getDiscoveryName(); - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @param value The bytes for discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceUrl_ = ""; - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceUrl_ = value; - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return This builder for chaining. - */ - public Builder clearResourceUrl() { - - resourceUrl_ = getDefaultInstance().getResourceUrl(); - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The bytes for resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceUrl_ = value; - onChanged(); - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Struct data_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - public boolean hasData() { - return dataBuilder_ != null || data_ != null; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - public com.google.protobuf.Struct getData() { - if (dataBuilder_ == null) { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } else { - return dataBuilder_.getMessage(); - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - dataBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData( - com.google.protobuf.Struct.Builder builderForValue) { - if (dataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - dataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder mergeData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (data_ != null) { - data_ = - com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - dataBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder clearData() { - if (dataBuilder_ == null) { - data_ = null; - onChanged(); - } else { - data_ = null; - dataBuilder_ = null; - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.Struct.Builder getDataBuilder() { - - onChanged(); - return getDataFieldBuilder().getBuilder(); - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilder(); - } else { - return data_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : data_; - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getData(), - getParentForChildren(), - isClean()); - data_ = null; - } - return dataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.Resource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.Resource) - private static final com.google.cloud.asset.v1p2beta1.Resource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.Resource(); - } - - public static com.google.cloud.asset.v1p2beta1.Resource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Resource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Resource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java deleted file mode 100644 index 8e45f66a2bb8..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ResourceOrBuilder.java +++ /dev/null @@ -1,175 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface ResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.Resource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - java.lang.String getDiscoveryDocumentUri(); - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes(); - - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - java.lang.String getDiscoveryName(); - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - com.google.protobuf.ByteString - getDiscoveryNameBytes(); - - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - java.lang.String getResourceUrl(); - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - com.google.protobuf.ByteString - getResourceUrlBytes(); - - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - boolean hasData(); - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - com.google.protobuf.Struct getData(); - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - com.google.protobuf.StructOrBuilder getDataOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java deleted file mode 100644 index 0aedc3535e0d..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAsset.java +++ /dev/null @@ -1,984 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Temporal asset. In addition to the asset, the temporal asset includes the
- * status of the asset and valid from and to time of it.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.TemporalAsset} - */ -public final class TemporalAsset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.TemporalAsset) - TemporalAssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use TemporalAsset.newBuilder() to construct. - private TemporalAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TemporalAsset() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TemporalAsset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TemporalAsset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder subBuilder = null; - if (window_ != null) { - subBuilder = window_.toBuilder(); - } - window_ = input.readMessage(com.google.cloud.asset.v1p2beta1.TimeWindow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(window_); - window_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - deleted_ = input.readBool(); - break; - } - case 26: { - com.google.cloud.asset.v1p2beta1.Asset.Builder subBuilder = null; - if (asset_ != null) { - subBuilder = asset_.toBuilder(); - } - asset_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Asset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(asset_); - asset_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.TemporalAsset.class, com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder.class); - } - - public static final int WINDOW_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1p2beta1.TimeWindow window_; - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - * @return Whether the window field is set. - */ - @java.lang.Override - public boolean hasWindow() { - return window_ != null; - } - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - * @return The window. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TimeWindow getWindow() { - return window_ == null ? com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() : window_; - } - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getWindowOrBuilder() { - return getWindow(); - } - - public static final int DELETED_FIELD_NUMBER = 2; - private boolean deleted_; - /** - *
-   * If the asset is deleted or not.
-   * 
- * - * bool deleted = 2; - * @return The deleted. - */ - @java.lang.Override - public boolean getDeleted() { - return deleted_; - } - - public static final int ASSET_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1p2beta1.Asset asset_; - /** - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - * @return Whether the asset field is set. - */ - @java.lang.Override - public boolean hasAsset() { - return asset_ != null; - } - /** - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - * @return The asset. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Asset getAsset() { - return asset_ == null ? com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance() : asset_; - } - /** - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.AssetOrBuilder getAssetOrBuilder() { - return getAsset(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (window_ != null) { - output.writeMessage(1, getWindow()); - } - if (deleted_ != false) { - output.writeBool(2, deleted_); - } - if (asset_ != null) { - output.writeMessage(3, getAsset()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (window_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getWindow()); - } - if (deleted_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, deleted_); - } - if (asset_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAsset()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.TemporalAsset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.TemporalAsset other = (com.google.cloud.asset.v1p2beta1.TemporalAsset) obj; - - if (hasWindow() != other.hasWindow()) return false; - if (hasWindow()) { - if (!getWindow() - .equals(other.getWindow())) return false; - } - if (getDeleted() - != other.getDeleted()) return false; - if (hasAsset() != other.hasAsset()) return false; - if (hasAsset()) { - if (!getAsset() - .equals(other.getAsset())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasWindow()) { - hash = (37 * hash) + WINDOW_FIELD_NUMBER; - hash = (53 * hash) + getWindow().hashCode(); - } - hash = (37 * hash) + DELETED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getDeleted()); - if (hasAsset()) { - hash = (37 * hash) + ASSET_FIELD_NUMBER; - hash = (53 * hash) + getAsset().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.TemporalAsset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.TemporalAsset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Temporal asset. In addition to the asset, the temporal asset includes the
-   * status of the asset and valid from and to time of it.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.TemporalAsset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.TemporalAsset) - com.google.cloud.asset.v1p2beta1.TemporalAssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.TemporalAsset.class, com.google.cloud.asset.v1p2beta1.TemporalAsset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.TemporalAsset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (windowBuilder_ == null) { - window_ = null; - } else { - window_ = null; - windowBuilder_ = null; - } - deleted_ = false; - - if (assetBuilder_ == null) { - asset_ = null; - } else { - asset_ = null; - assetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TemporalAsset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TemporalAsset getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.TemporalAsset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TemporalAsset build() { - com.google.cloud.asset.v1p2beta1.TemporalAsset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TemporalAsset buildPartial() { - com.google.cloud.asset.v1p2beta1.TemporalAsset result = new com.google.cloud.asset.v1p2beta1.TemporalAsset(this); - if (windowBuilder_ == null) { - result.window_ = window_; - } else { - result.window_ = windowBuilder_.build(); - } - result.deleted_ = deleted_; - if (assetBuilder_ == null) { - result.asset_ = asset_; - } else { - result.asset_ = assetBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.TemporalAsset) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.TemporalAsset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.TemporalAsset other) { - if (other == com.google.cloud.asset.v1p2beta1.TemporalAsset.getDefaultInstance()) return this; - if (other.hasWindow()) { - mergeWindow(other.getWindow()); - } - if (other.getDeleted() != false) { - setDeleted(other.getDeleted()); - } - if (other.hasAsset()) { - mergeAsset(other.getAsset()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.TemporalAsset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.TemporalAsset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1p2beta1.TimeWindow window_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TimeWindow, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder> windowBuilder_; - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - * @return Whether the window field is set. - */ - public boolean hasWindow() { - return windowBuilder_ != null || window_ != null; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - * @return The window. - */ - public com.google.cloud.asset.v1p2beta1.TimeWindow getWindow() { - if (windowBuilder_ == null) { - return window_ == null ? com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() : window_; - } else { - return windowBuilder_.getMessage(); - } - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - public Builder setWindow(com.google.cloud.asset.v1p2beta1.TimeWindow value) { - if (windowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - window_ = value; - onChanged(); - } else { - windowBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - public Builder setWindow( - com.google.cloud.asset.v1p2beta1.TimeWindow.Builder builderForValue) { - if (windowBuilder_ == null) { - window_ = builderForValue.build(); - onChanged(); - } else { - windowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - public Builder mergeWindow(com.google.cloud.asset.v1p2beta1.TimeWindow value) { - if (windowBuilder_ == null) { - if (window_ != null) { - window_ = - com.google.cloud.asset.v1p2beta1.TimeWindow.newBuilder(window_).mergeFrom(value).buildPartial(); - } else { - window_ = value; - } - onChanged(); - } else { - windowBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - public Builder clearWindow() { - if (windowBuilder_ == null) { - window_ = null; - onChanged(); - } else { - window_ = null; - windowBuilder_ = null; - } - - return this; - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - public com.google.cloud.asset.v1p2beta1.TimeWindow.Builder getWindowBuilder() { - - onChanged(); - return getWindowFieldBuilder().getBuilder(); - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - public com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getWindowOrBuilder() { - if (windowBuilder_ != null) { - return windowBuilder_.getMessageOrBuilder(); - } else { - return window_ == null ? - com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance() : window_; - } - } - /** - *
-     * The time window when the asset data and state was observed.
-     * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TimeWindow, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder> - getWindowFieldBuilder() { - if (windowBuilder_ == null) { - windowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.TimeWindow, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder, com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder>( - getWindow(), - getParentForChildren(), - isClean()); - window_ = null; - } - return windowBuilder_; - } - - private boolean deleted_ ; - /** - *
-     * If the asset is deleted or not.
-     * 
- * - * bool deleted = 2; - * @return The deleted. - */ - @java.lang.Override - public boolean getDeleted() { - return deleted_; - } - /** - *
-     * If the asset is deleted or not.
-     * 
- * - * bool deleted = 2; - * @param value The deleted to set. - * @return This builder for chaining. - */ - public Builder setDeleted(boolean value) { - - deleted_ = value; - onChanged(); - return this; - } - /** - *
-     * If the asset is deleted or not.
-     * 
- * - * bool deleted = 2; - * @return This builder for chaining. - */ - public Builder clearDeleted() { - - deleted_ = false; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p2beta1.Asset asset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Asset, com.google.cloud.asset.v1p2beta1.Asset.Builder, com.google.cloud.asset.v1p2beta1.AssetOrBuilder> assetBuilder_; - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - * @return Whether the asset field is set. - */ - public boolean hasAsset() { - return assetBuilder_ != null || asset_ != null; - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - * @return The asset. - */ - public com.google.cloud.asset.v1p2beta1.Asset getAsset() { - if (assetBuilder_ == null) { - return asset_ == null ? com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance() : asset_; - } else { - return assetBuilder_.getMessage(); - } - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - public Builder setAsset(com.google.cloud.asset.v1p2beta1.Asset value) { - if (assetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - asset_ = value; - onChanged(); - } else { - assetBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - public Builder setAsset( - com.google.cloud.asset.v1p2beta1.Asset.Builder builderForValue) { - if (assetBuilder_ == null) { - asset_ = builderForValue.build(); - onChanged(); - } else { - assetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - public Builder mergeAsset(com.google.cloud.asset.v1p2beta1.Asset value) { - if (assetBuilder_ == null) { - if (asset_ != null) { - asset_ = - com.google.cloud.asset.v1p2beta1.Asset.newBuilder(asset_).mergeFrom(value).buildPartial(); - } else { - asset_ = value; - } - onChanged(); - } else { - assetBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - public Builder clearAsset() { - if (assetBuilder_ == null) { - asset_ = null; - onChanged(); - } else { - asset_ = null; - assetBuilder_ = null; - } - - return this; - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - public com.google.cloud.asset.v1p2beta1.Asset.Builder getAssetBuilder() { - - onChanged(); - return getAssetFieldBuilder().getBuilder(); - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - public com.google.cloud.asset.v1p2beta1.AssetOrBuilder getAssetOrBuilder() { - if (assetBuilder_ != null) { - return assetBuilder_.getMessageOrBuilder(); - } else { - return asset_ == null ? - com.google.cloud.asset.v1p2beta1.Asset.getDefaultInstance() : asset_; - } - } - /** - *
-     * Asset.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Asset, com.google.cloud.asset.v1p2beta1.Asset.Builder, com.google.cloud.asset.v1p2beta1.AssetOrBuilder> - getAssetFieldBuilder() { - if (assetBuilder_ == null) { - assetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Asset, com.google.cloud.asset.v1p2beta1.Asset.Builder, com.google.cloud.asset.v1p2beta1.AssetOrBuilder>( - getAsset(), - getParentForChildren(), - isClean()); - asset_ = null; - } - return assetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.TemporalAsset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.TemporalAsset) - private static final com.google.cloud.asset.v1p2beta1.TemporalAsset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.TemporalAsset(); - } - - public static com.google.cloud.asset.v1p2beta1.TemporalAsset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TemporalAsset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TemporalAsset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TemporalAsset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java deleted file mode 100644 index d927836ba421..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TemporalAssetOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface TemporalAssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.TemporalAsset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - * @return Whether the window field is set. - */ - boolean hasWindow(); - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - * @return The window. - */ - com.google.cloud.asset.v1p2beta1.TimeWindow getWindow(); - /** - *
-   * The time window when the asset data and state was observed.
-   * 
- * - * .google.cloud.asset.v1p2beta1.TimeWindow window = 1; - */ - com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder getWindowOrBuilder(); - - /** - *
-   * If the asset is deleted or not.
-   * 
- * - * bool deleted = 2; - * @return The deleted. - */ - boolean getDeleted(); - - /** - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - * @return Whether the asset field is set. - */ - boolean hasAsset(); - /** - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - * @return The asset. - */ - com.google.cloud.asset.v1p2beta1.Asset getAsset(); - /** - *
-   * Asset.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Asset asset = 3; - */ - com.google.cloud.asset.v1p2beta1.AssetOrBuilder getAssetOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java deleted file mode 100644 index 37ab68d91017..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindow.java +++ /dev/null @@ -1,913 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * A time window of (start_time, end_time].
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.TimeWindow} - */ -public final class TimeWindow extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.TimeWindow) - TimeWindowOrBuilder { -private static final long serialVersionUID = 0L; - // Use TimeWindow.newBuilder() to construct. - private TimeWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TimeWindow() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TimeWindow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private TimeWindow( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.TimeWindow.class, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder.class); - } - - public static final int START_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp startTime_; - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return getStartTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (startTime_ != null) { - output.writeMessage(1, getStartTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getEndTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.TimeWindow)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.TimeWindow other = (com.google.cloud.asset.v1p2beta1.TimeWindow) obj; - - if (hasStartTime() != other.hasStartTime()) return false; - if (hasStartTime()) { - if (!getStartTime() - .equals(other.getStartTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime() - .equals(other.getEndTime())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasStartTime()) { - hash = (37 * hash) + START_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStartTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.TimeWindow parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.TimeWindow prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A time window of (start_time, end_time].
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.TimeWindow} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.TimeWindow) - com.google.cloud.asset.v1p2beta1.TimeWindowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.TimeWindow.class, com.google.cloud.asset.v1p2beta1.TimeWindow.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.TimeWindow.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (startTimeBuilder_ == null) { - startTime_ = null; - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetProto.internal_static_google_cloud_asset_v1p2beta1_TimeWindow_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TimeWindow getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TimeWindow build() { - com.google.cloud.asset.v1p2beta1.TimeWindow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TimeWindow buildPartial() { - com.google.cloud.asset.v1p2beta1.TimeWindow result = new com.google.cloud.asset.v1p2beta1.TimeWindow(this); - if (startTimeBuilder_ == null) { - result.startTime_ = startTime_; - } else { - result.startTime_ = startTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.TimeWindow) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.TimeWindow)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.TimeWindow other) { - if (other == com.google.cloud.asset.v1p2beta1.TimeWindow.getDefaultInstance()) return this; - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.TimeWindow parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.TimeWindow) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp startTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> startTimeBuilder_; - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - public boolean hasStartTime() { - return startTimeBuilder_ != null || startTime_ != null; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); - } - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - onChanged(); - } else { - startTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder setStartTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); - onChanged(); - } else { - startTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (startTime_ != null) { - startTime_ = - com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); - } else { - startTime_ = value; - } - onChanged(); - } else { - startTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public Builder clearStartTime() { - if (startTimeBuilder_ == null) { - startTime_ = null; - onChanged(); - } else { - startTime_ = null; - startTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - - onChanged(); - return getStartTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - *
-     * Start time of the time window (exclusive).
-     * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getStartTimeFieldBuilder() { - if (startTimeBuilder_ == null) { - startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getStartTime(), - getParentForChildren(), - isClean()); - startTime_ = null; - } - return startTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> endTimeBuilder_; - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - *
-     * End time of the time window (inclusive).
-     * Current timestamp if not specified.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getEndTime(), - getParentForChildren(), - isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.TimeWindow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.TimeWindow) - private static final com.google.cloud.asset.v1p2beta1.TimeWindow DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.TimeWindow(); - } - - public static com.google.cloud.asset.v1p2beta1.TimeWindow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimeWindow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeWindow(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.TimeWindow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java deleted file mode 100644 index c80313df9f9c..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/TimeWindowOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/assets.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface TimeWindowOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.TimeWindow) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return Whether the startTime field is set. - */ - boolean hasStartTime(); - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - * @return The startTime. - */ - com.google.protobuf.Timestamp getStartTime(); - /** - *
-   * Start time of the time window (exclusive).
-   * 
- * - * .google.protobuf.Timestamp start_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); - - /** - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - *
-   * End time of the time window (inclusive).
-   * Current timestamp if not specified.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java deleted file mode 100644 index a6a771069257..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequest.java +++ /dev/null @@ -1,973 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -/** - *
- * Update asset feed request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.UpdateFeedRequest} - */ -public final class UpdateFeedRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p2beta1.UpdateFeedRequest) - UpdateFeedRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateFeedRequest.newBuilder() to construct. - private UpdateFeedRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateFeedRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateFeedRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private UpdateFeedRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1p2beta1.Feed.Builder subBuilder = null; - if (feed_ != null) { - subBuilder = feed_.toBuilder(); - } - feed_ = input.readMessage(com.google.cloud.asset.v1p2beta1.Feed.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(feed_); - feed_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.class, com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.Builder.class); - } - - public static final int FEED_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1p2beta1.Feed feed_; - /** - *
-   * Required. The new values of feed details. It must match an existing feed and the
-   * field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - @java.lang.Override - public boolean hasFeed() { - return feed_ != null; - } - /** - *
-   * Required. The new values of feed details. It must match an existing feed and the
-   * field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.Feed getFeed() { - return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; - } - /** - *
-   * Required. The new values of feed details. It must match an existing feed and the
-   * field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { - return getFeed(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (feed_ != null) { - output.writeMessage(1, getFeed()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (feed_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getFeed()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p2beta1.UpdateFeedRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest other = (com.google.cloud.asset.v1p2beta1.UpdateFeedRequest) obj; - - if (hasFeed() != other.hasFeed()) return false; - if (hasFeed()) { - if (!getFeed() - .equals(other.getFeed())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask() - .equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasFeed()) { - hash = (37 * hash) + FEED_FIELD_NUMBER; - hash = (53 * hash) + getFeed().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Update asset feed request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p2beta1.UpdateFeedRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p2beta1.UpdateFeedRequest) - com.google.cloud.asset.v1p2beta1.UpdateFeedRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.class, com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (feedBuilder_ == null) { - feed_ = null; - } else { - feed_ = null; - feedBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p2beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p2beta1_UpdateFeedRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest build() { - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest buildPartial() { - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest result = new com.google.cloud.asset.v1p2beta1.UpdateFeedRequest(this); - if (feedBuilder_ == null) { - result.feed_ = feed_; - } else { - result.feed_ = feedBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p2beta1.UpdateFeedRequest) { - return mergeFrom((com.google.cloud.asset.v1p2beta1.UpdateFeedRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p2beta1.UpdateFeedRequest other) { - if (other == com.google.cloud.asset.v1p2beta1.UpdateFeedRequest.getDefaultInstance()) return this; - if (other.hasFeed()) { - mergeFeed(other.getFeed()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p2beta1.UpdateFeedRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p2beta1.UpdateFeedRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.asset.v1p2beta1.Feed feed_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> feedBuilder_; - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - public boolean hasFeed() { - return feedBuilder_ != null || feed_ != null; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - public com.google.cloud.asset.v1p2beta1.Feed getFeed() { - if (feedBuilder_ == null) { - return feed_ == null ? com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; - } else { - return feedBuilder_.getMessage(); - } - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed(com.google.cloud.asset.v1p2beta1.Feed value) { - if (feedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - feed_ = value; - onChanged(); - } else { - feedBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setFeed( - com.google.cloud.asset.v1p2beta1.Feed.Builder builderForValue) { - if (feedBuilder_ == null) { - feed_ = builderForValue.build(); - onChanged(); - } else { - feedBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeFeed(com.google.cloud.asset.v1p2beta1.Feed value) { - if (feedBuilder_ == null) { - if (feed_ != null) { - feed_ = - com.google.cloud.asset.v1p2beta1.Feed.newBuilder(feed_).mergeFrom(value).buildPartial(); - } else { - feed_ = value; - } - onChanged(); - } else { - feedBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearFeed() { - if (feedBuilder_ == null) { - feed_ = null; - onChanged(); - } else { - feed_ = null; - feedBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p2beta1.Feed.Builder getFeedBuilder() { - - onChanged(); - return getFeedFieldBuilder().getBuilder(); - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder() { - if (feedBuilder_ != null) { - return feedBuilder_.getMessageOrBuilder(); - } else { - return feed_ == null ? - com.google.cloud.asset.v1p2beta1.Feed.getDefaultInstance() : feed_; - } - } - /** - *
-     * Required. The new values of feed details. It must match an existing feed and the
-     * field `name` must be in the format of:
-     * projects/project_number/feeds/feed_id or
-     * folders/folder_number/feeds/feed_id or
-     * organizations/organization_number/feeds/feed_id.
-     * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder> - getFeedFieldBuilder() { - if (feedBuilder_ == null) { - feedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p2beta1.Feed, com.google.cloud.asset.v1p2beta1.Feed.Builder, com.google.cloud.asset.v1p2beta1.FeedOrBuilder>( - getFeed(), - getParentForChildren(), - isClean()); - feed_ = null; - } - return feedBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setUpdateMask( - com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null ? - com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - } - /** - *
-     * Required. Only updates the `feed` fields indicated by this mask.
-     * The field mask must not be empty, and it must not contain fields that
-     * are immutable or only set by the server.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), - getParentForChildren(), - isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p2beta1.UpdateFeedRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p2beta1.UpdateFeedRequest) - private static final com.google.cloud.asset.v1p2beta1.UpdateFeedRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p2beta1.UpdateFeedRequest(); - } - - public static com.google.cloud.asset.v1p2beta1.UpdateFeedRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateFeedRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFeedRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p2beta1.UpdateFeedRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java deleted file mode 100644 index dc99969d8825..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p2beta1/asset_service.proto - -package com.google.cloud.asset.v1p2beta1; - -public interface UpdateFeedRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p2beta1.UpdateFeedRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The new values of feed details. It must match an existing feed and the
-   * field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the feed field is set. - */ - boolean hasFeed(); - /** - *
-   * Required. The new values of feed details. It must match an existing feed and the
-   * field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The feed. - */ - com.google.cloud.asset.v1p2beta1.Feed getFeed(); - /** - *
-   * Required. The new values of feed details. It must match an existing feed and the
-   * field `name` must be in the format of:
-   * projects/project_number/feeds/feed_id or
-   * folders/folder_number/feeds/feed_id or
-   * organizations/organization_number/feeds/feed_id.
-   * 
- * - * .google.cloud.asset.v1p2beta1.Feed feed = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1p2beta1.FeedOrBuilder getFeedOrBuilder(); - - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - *
-   * Required. Only updates the `feed` fields indicated by this mask.
-   * The field mask must not be empty, and it must not contain fields that
-   * are immutable or only set by the server.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto deleted file mode 100644 index 92f285f86524..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.asset.v1p2beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/asset/v1p2beta1/assets.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.Asset.V1p2Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetServiceProto"; -option java_package = "com.google.cloud.asset.v1p2beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p2beta1"; - -// Asset service definition. -service AssetService { - option (google.api.default_host) = "cloudasset.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a feed in a parent project/folder/organization to listen to its - // asset updates. - rpc CreateFeed(CreateFeedRequest) returns (Feed) { - option (google.api.http) = { - post: "/v1p2beta1/{parent=*/*}/feeds" - body: "*" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details about an asset feed. - rpc GetFeed(GetFeedRequest) returns (Feed) { - option (google.api.http) = { - get: "/v1p2beta1/{name=*/*/feeds/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists all asset feeds in a parent project/folder/organization. - rpc ListFeeds(ListFeedsRequest) returns (ListFeedsResponse) { - option (google.api.http) = { - get: "/v1p2beta1/{parent=*/*}/feeds" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates an asset feed configuration. - rpc UpdateFeed(UpdateFeedRequest) returns (Feed) { - option (google.api.http) = { - patch: "/v1p2beta1/{feed.name=*/*/feeds/*}" - body: "*" - }; - option (google.api.method_signature) = "feed"; - } - - // Deletes an asset feed. - rpc DeleteFeed(DeleteFeedRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1p2beta1/{name=*/*/feeds/*}" - }; - option (google.api.method_signature) = "name"; - } -} - -// Create asset feed request. -message CreateFeedRequest { - // Required. The name of the project/folder/organization where this feed - // should be created in. It can only be an organization number (such as - // "organizations/123"), a folder number (such as "folders/123"), a project ID - // (such as "projects/my-project-id")", or a project number (such as - // "projects/12345"). - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. This is the client-assigned asset feed identifier and it needs to - // be unique under a specific parent project/folder/organization. - string feed_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The feed details. The field `name` must be empty and it will be generated - // in the format of: - // projects/project_number/feeds/feed_id - // folders/folder_number/feeds/feed_id - // organizations/organization_number/feeds/feed_id - Feed feed = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Get asset feed request. -message GetFeedRequest { - // Required. The name of the Feed and it must be in the format of: - // projects/project_number/feeds/feed_id - // folders/folder_number/feeds/feed_id - // organizations/organization_number/feeds/feed_id - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudasset.googleapis.com/Feed" - } - ]; -} - -// List asset feeds request. -message ListFeedsRequest { - // Required. The parent project/folder/organization whose feeds are to be - // listed. It can only be using project/folder/organization number (such as - // "folders/12345")", or a project ID (such as "projects/my-project-id"). - string parent = 1 [(google.api.field_behavior) = REQUIRED]; -} - -message ListFeedsResponse { - // A list of feeds. - repeated Feed feeds = 1; -} - -// Update asset feed request. -message UpdateFeedRequest { - // Required. The new values of feed details. It must match an existing feed and the - // field `name` must be in the format of: - // projects/project_number/feeds/feed_id or - // folders/folder_number/feeds/feed_id or - // organizations/organization_number/feeds/feed_id. - Feed feed = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Only updates the `feed` fields indicated by this mask. - // The field mask must not be empty, and it must not contain fields that - // are immutable or only set by the server. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; -} - -message DeleteFeedRequest { - // Required. The name of the feed and it must be in the format of: - // projects/project_number/feeds/feed_id - // folders/folder_number/feeds/feed_id - // organizations/organization_number/feeds/feed_id - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudasset.googleapis.com/Feed" - } - ]; -} - -// Output configuration for export assets destination. -message OutputConfig { - // Asset export destination. - oneof destination { - // Destination on Cloud Storage. - GcsDestination gcs_destination = 1; - } -} - -// A Cloud Storage location. -message GcsDestination { - // Required. - oneof object_uri { - // The uri of the Cloud Storage object. It's the same uri that is used by - // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and - // Editing Object - // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - // for more information. - string uri = 1; - } -} - -// A Cloud Pubsub destination. -message PubsubDestination { - // The name of the Cloud Pub/Sub topic to publish to. - // For example: `projects/PROJECT_ID/topics/TOPIC_ID`. - string topic = 1; -} - -// Output configuration for asset feed destination. -message FeedOutputConfig { - // Asset feed destination. - oneof destination { - // Destination on Cloud Pubsub. - PubsubDestination pubsub_destination = 1; - } -} - -// An asset feed used to export asset updates to a destinations. -// An asset feed filter controls what updates are exported. -// The asset feed must be created within a project, organization, or -// folder. Supported destinations are: -// Cloud Pub/Sub topics. -message Feed { - option (google.api.resource) = { - type: "cloudasset.googleapis.com/Feed" - pattern: "projects/{project}/feeds/{feed}" - pattern: "folders/{folder}/feeds/{feed}" - pattern: "organizations/{organization}/feeds/{feed}" - history: ORIGINALLY_SINGLE_PATTERN - }; - - // Required. The format will be - // projects/{project_number}/feeds/{client-assigned_feed_identifier} or - // folders/{folder_number}/feeds/{client-assigned_feed_identifier} or - // organizations/{organization_number}/feeds/{client-assigned_feed_identifier} - // - // The client-assigned feed identifier must be unique within the parent - // project/folder/organization. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // A list of the full names of the assets to receive updates. You must specify - // either or both of asset_names and asset_types. Only asset updates matching - // specified asset_names and asset_types are exported to the feed. For - // example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more info. - repeated string asset_names = 2; - - // A list of types of the assets to receive updates. You must specify either - // or both of asset_names and asset_types. Only asset updates matching - // specified asset_names and asset_types are exported to the feed. - // For example: - // "compute.googleapis.com/Disk" See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) - // for all supported asset types. - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name and - // type will be returned. - ContentType content_type = 4; - - // Required. Feed output configuration defining where the asset updates are - // published to. - FeedOutputConfig feed_output_config = 5 [(google.api.field_behavior) = REQUIRED]; -} - -// Asset content type. -enum ContentType { - // Unspecified content type. - CONTENT_TYPE_UNSPECIFIED = 0; - - // Resource metadata. - RESOURCE = 1; - - // The actual IAM policy set on a resource. - IAM_POLICY = 2; -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto b/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto deleted file mode 100644 index bc2a9c511f28..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2019 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.cloud.asset.v1p2beta1; - -import "google/iam/v1/policy.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Asset.v1p2beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p2beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetProto"; -option java_package = "com.google.cloud.asset.v1p2beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p2beta1"; - -// Temporal asset. In addition to the asset, the temporal asset includes the -// status of the asset and valid from and to time of it. -message TemporalAsset { - // The time window when the asset data and state was observed. - TimeWindow window = 1; - - // If the asset is deleted or not. - bool deleted = 2; - - // Asset. - Asset asset = 3; -} - -// A time window of (start_time, end_time]. -message TimeWindow { - // Start time of the time window (exclusive). - google.protobuf.Timestamp start_time = 1; - - // End time of the time window (inclusive). - // Current timestamp if not specified. - google.protobuf.Timestamp end_time = 2; -} - -// Cloud asset. This includes all Google Cloud Platform resources, -// Cloud IAM policies, and other non-GCP assets. -message Asset { - // The full name of the asset. For example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string name = 1; - - // Type of the asset. Example: "compute.googleapis.com/Disk". - string asset_type = 2; - - // Representation of the resource. - Resource resource = 3; - - // Representation of the actual Cloud IAM policy set on a cloud resource. For - // each resource, there must be at most one Cloud IAM policy set on it. - google.iam.v1.Policy iam_policy = 4; - - // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, - // represented as a list of relative resource names. Ancestry path starts with - // the closest CRM ancestor and ends at root. If the asset is a CRM - // project/folder/organization, this starts from the asset itself. - // - // Example: ["projects/123456789", "folders/5432", "organizations/1234"] - repeated string ancestors = 6; -} - -// Representation of a cloud resource. -message Resource { - // The API version. Example: "v1". - string version = 1; - - // The URL of the discovery document containing the resource's JSON schema. - // For example: - // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. - // It will be left unspecified for resources without a discovery-based API, - // such as Cloud Bigtable. - string discovery_document_uri = 2; - - // The JSON schema name listed in the discovery document. - // Example: "Project". It will be left unspecified for resources (such as - // Cloud Bigtable) without a discovery-based API. - string discovery_name = 3; - - // The REST URL for accessing the resource. An HTTP GET operation using this - // URL returns the resource itself. - // Example: - // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. - // It will be left unspecified for resources without a REST API. - string resource_url = 4; - - // The full name of the immediate parent of this resource. See - // [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - // - // For GCP assets, it is the parent resource defined in the [Cloud IAM policy - // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). - // For example: - // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. - // - // For third-party assets, it is up to the users to define. - string parent = 5; - - // The content of the resource, in which some sensitive fields are scrubbed - // away and may not be present. - google.protobuf.Struct data = 6; -} diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 505cc911afaa..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; -import com.google.cloud.asset.v1p2beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index e42eabf71639..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 323d7ba473c6..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_create_setendpoint_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; -import com.google.cloud.asset.v1p2beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java deleted file mode 100644 index 2d5f5932fec3..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/AsyncCreateFeed.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_createfeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; -import com.google.cloud.asset.v1p2beta1.Feed; - -public class AsyncCreateFeed { - - public static void main(String[] args) throws Exception { - asyncCreateFeed(); - } - - public static void asyncCreateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - CreateFeedRequest request = - CreateFeedRequest.newBuilder() - .setParent("parent-995424086") - .setFeedId("feedId-1278410919") - .setFeed(Feed.newBuilder().build()) - .build(); - ApiFuture future = assetServiceClient.createFeedCallable().futureCall(request); - // Do something. - Feed response = future.get(); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_createfeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java deleted file mode 100644 index 0bb60b076b0c..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeed.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_createfeed_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.CreateFeedRequest; -import com.google.cloud.asset.v1p2beta1.Feed; - -public class SyncCreateFeed { - - public static void main(String[] args) throws Exception { - syncCreateFeed(); - } - - public static void syncCreateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - CreateFeedRequest request = - CreateFeedRequest.newBuilder() - .setParent("parent-995424086") - .setFeedId("feedId-1278410919") - .setFeed(Feed.newBuilder().build()) - .build(); - Feed response = assetServiceClient.createFeed(request); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java deleted file mode 100644 index 706e9c5cd649..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/createfeed/SyncCreateFeedString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_createfeed_string_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; - -public class SyncCreateFeedString { - - public static void main(String[] args) throws Exception { - syncCreateFeedString(); - } - - public static void syncCreateFeedString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String parent = "parent-995424086"; - Feed response = assetServiceClient.createFeed(parent); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_createfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java deleted file mode 100644 index 3c6eb4cfd28d..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/AsyncDeleteFeed.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.FeedName; -import com.google.protobuf.Empty; - -public class AsyncDeleteFeed { - - public static void main(String[] args) throws Exception { - asyncDeleteFeed(); - } - - public static void asyncDeleteFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - DeleteFeedRequest request = - DeleteFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - ApiFuture future = assetServiceClient.deleteFeedCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java deleted file mode 100644 index c1e9e3d83a5b..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeed.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.DeleteFeedRequest; -import com.google.cloud.asset.v1p2beta1.FeedName; -import com.google.protobuf.Empty; - -public class SyncDeleteFeed { - - public static void main(String[] args) throws Exception { - syncDeleteFeed(); - } - - public static void syncDeleteFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - DeleteFeedRequest request = - DeleteFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - assetServiceClient.deleteFeed(request); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java deleted file mode 100644 index 6e2ffada1bf0..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedFeedname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_feedname_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.FeedName; -import com.google.protobuf.Empty; - -public class SyncDeleteFeedFeedname { - - public static void main(String[] args) throws Exception { - syncDeleteFeedFeedname(); - } - - public static void syncDeleteFeedFeedname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - assetServiceClient.deleteFeed(name); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java deleted file mode 100644 index 19f78d7f0d05..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/deletefeed/SyncDeleteFeedString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_deletefeed_string_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.FeedName; -import com.google.protobuf.Empty; - -public class SyncDeleteFeedString { - - public static void main(String[] args) throws Exception { - syncDeleteFeedString(); - } - - public static void syncDeleteFeedString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); - assetServiceClient.deleteFeed(name); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_deletefeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java deleted file mode 100644 index 0efa51f42907..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/AsyncGetFeed.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.FeedName; -import com.google.cloud.asset.v1p2beta1.GetFeedRequest; - -public class AsyncGetFeed { - - public static void main(String[] args) throws Exception { - asyncGetFeed(); - } - - public static void asyncGetFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - GetFeedRequest request = - GetFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - ApiFuture future = assetServiceClient.getFeedCallable().futureCall(request); - // Do something. - Feed response = future.get(); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java deleted file mode 100644 index af5e9e133f01..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeed.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.FeedName; -import com.google.cloud.asset.v1p2beta1.GetFeedRequest; - -public class SyncGetFeed { - - public static void main(String[] args) throws Exception { - syncGetFeed(); - } - - public static void syncGetFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - GetFeedRequest request = - GetFeedRequest.newBuilder() - .setName(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString()) - .build(); - Feed response = assetServiceClient.getFeed(request); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java deleted file mode 100644 index 792f043571e3..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedFeedname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_feedname_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.FeedName; - -public class SyncGetFeedFeedname { - - public static void main(String[] args) throws Exception { - syncGetFeedFeedname(); - } - - public static void syncGetFeedFeedname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); - Feed response = assetServiceClient.getFeed(name); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_feedname_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java deleted file mode 100644 index 182b9732c758..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/getfeed/SyncGetFeedString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_getfeed_string_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.FeedName; - -public class SyncGetFeedString { - - public static void main(String[] args) throws Exception { - syncGetFeedString(); - } - - public static void syncGetFeedString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString(); - Feed response = assetServiceClient.getFeed(name); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_getfeed_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java deleted file mode 100644 index 59655ddfbf41..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/AsyncListFeeds.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_listfeeds_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; - -public class AsyncListFeeds { - - public static void main(String[] args) throws Exception { - asyncListFeeds(); - } - - public static void asyncListFeeds() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListFeedsRequest request = - ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); - ApiFuture future = - assetServiceClient.listFeedsCallable().futureCall(request); - // Do something. - ListFeedsResponse response = future.get(); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_listfeeds_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java deleted file mode 100644 index 58cac9c64acd..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeeds.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_listfeeds_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.ListFeedsRequest; -import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; - -public class SyncListFeeds { - - public static void main(String[] args) throws Exception { - syncListFeeds(); - } - - public static void syncListFeeds() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListFeedsRequest request = - ListFeedsRequest.newBuilder().setParent("parent-995424086").build(); - ListFeedsResponse response = assetServiceClient.listFeeds(request); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_listfeeds_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java deleted file mode 100644 index 5f4045935400..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/listfeeds/SyncListFeedsString.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_listfeeds_string_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.ListFeedsResponse; - -public class SyncListFeedsString { - - public static void main(String[] args) throws Exception { - syncListFeedsString(); - } - - public static void syncListFeedsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - String parent = "parent-995424086"; - ListFeedsResponse response = assetServiceClient.listFeeds(parent); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_listfeeds_string_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java deleted file mode 100644 index 0e89d9449f7d..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/AsyncUpdateFeed.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_updatefeed_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateFeed { - - public static void main(String[] args) throws Exception { - asyncUpdateFeed(); - } - - public static void asyncUpdateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - UpdateFeedRequest request = - UpdateFeedRequest.newBuilder() - .setFeed(Feed.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = assetServiceClient.updateFeedCallable().futureCall(request); - // Do something. - Feed response = future.get(); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_updatefeed_async] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java deleted file mode 100644 index d78fe022bb41..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeed.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_updatefeed_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; -import com.google.cloud.asset.v1p2beta1.UpdateFeedRequest; -import com.google.protobuf.FieldMask; - -public class SyncUpdateFeed { - - public static void main(String[] args) throws Exception { - syncUpdateFeed(); - } - - public static void syncUpdateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - UpdateFeedRequest request = - UpdateFeedRequest.newBuilder() - .setFeed(Feed.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Feed response = assetServiceClient.updateFeed(request); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_updatefeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java deleted file mode 100644 index 98258534de5c..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetserviceclient/updatefeed/SyncUpdateFeedFeed.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetserviceclient_updatefeed_feed_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceClient; -import com.google.cloud.asset.v1p2beta1.Feed; - -public class SyncUpdateFeedFeed { - - public static void main(String[] args) throws Exception { - syncUpdateFeedFeed(); - } - - public static void syncUpdateFeedFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - Feed feed = Feed.newBuilder().build(); - Feed response = assetServiceClient.updateFeed(feed); - } - } -} -// [END asset_v1p2beta1_generated_assetserviceclient_updatefeed_feed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java deleted file mode 100644 index 97b9c8702479..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/assetservicesettings/createfeed/SyncCreateFeed.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p2beta1_generated_assetservicesettings_createfeed_sync] -import com.google.cloud.asset.v1p2beta1.AssetServiceSettings; -import java.time.Duration; - -public class SyncCreateFeed { - - public static void main(String[] args) throws Exception { - syncCreateFeed(); - } - - public static void syncCreateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); - assetServiceSettingsBuilder - .createFeedSettings() - .setRetrySettings( - assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1p2beta1_generated_assetservicesettings_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java b/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java deleted file mode 100644 index 9ff707d408be..000000000000 --- a/owl-bot-staging/java-asset/v1p2beta1/samples/snippets/generated/com/google/cloud/asset/v1p2beta1/stub/assetservicestubsettings/createfeed/SyncCreateFeed.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.stub.samples; - -// [START asset_v1p2beta1_generated_assetservicestubsettings_createfeed_sync] -import com.google.cloud.asset.v1p2beta1.stub.AssetServiceStubSettings; -import java.time.Duration; - -public class SyncCreateFeed { - - public static void main(String[] args) throws Exception { - syncCreateFeed(); - } - - public static void syncCreateFeed() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceStubSettings.Builder assetServiceSettingsBuilder = - AssetServiceStubSettings.newBuilder(); - assetServiceSettingsBuilder - .createFeedSettings() - .setRetrySettings( - assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1p2beta1_generated_assetservicestubsettings_createfeed_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java deleted file mode 100644 index 130fea08c0af..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceClient.java +++ /dev/null @@ -1,400 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStub; -import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Asset service definition. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   ListAssetsRequest request =
- *       ListAssetsRequest.newBuilder()
- *           .setParent("parent-995424086")
- *           .setReadTime(Timestamp.newBuilder().build())
- *           .addAllAssetTypes(new ArrayList())
- *           .setContentType(ContentType.forNumber(0))
- *           .setPageSize(883849137)
- *           .setPageToken("pageToken873572522")
- *           .build();
- *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
- *     // doThingsWith(element);
- *   }
- * }
- * }
- * - *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of AssetServiceSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceClient implements BackgroundResource { - private final AssetServiceSettings settings; - private final AssetServiceStub stub; - - /** Constructs an instance of AssetServiceClient with default settings. */ - public static final AssetServiceClient create() throws IOException { - return create(AssetServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { - return new AssetServiceClient(settings); - } - - /** - * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(AssetServiceSettings). - */ - public static final AssetServiceClient create(AssetServiceStub stub) { - return new AssetServiceClient(stub); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected AssetServiceClient(AssetServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); - } - - protected AssetServiceClient(AssetServiceStub stub) { - this.settings = null; - this.stub = stub; - } - - public final AssetServiceSettings getSettings() { - return settings; - } - - public AssetServiceStub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) { - return listAssetsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Asset element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listAssetsPagedCallable() { - return stub.listAssetsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists assets with time and resource types and returns paged results in response. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ListAssetsRequest request =
-   *       ListAssetsRequest.newBuilder()
-   *           .setParent("parent-995424086")
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request);
-   *     for (Asset element : response.getAssetsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listAssetsCallable() { - return stub.listAssetsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } - - public static class ListAssetsPagedResponse - extends AbstractPagedListResponse< - ListAssetsRequest, - ListAssetsResponse, - Asset, - ListAssetsPage, - ListAssetsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, input -> new ListAssetsPagedResponse(input), MoreExecutors.directExecutor()); - } - - private ListAssetsPagedResponse(ListAssetsPage page) { - super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListAssetsPage - extends AbstractPage { - - private ListAssetsPage( - PageContext context, - ListAssetsResponse response) { - super(context, response); - } - - private static ListAssetsPage createEmptyPage() { - return new ListAssetsPage(null, null); - } - - @Override - protected ListAssetsPage createPage( - PageContext context, - ListAssetsResponse response) { - return new ListAssetsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListAssetsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListAssetsRequest, - ListAssetsResponse, - Asset, - ListAssetsPage, - ListAssetsFixedSizeCollection> { - - private ListAssetsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListAssetsFixedSizeCollection createEmptyCollection() { - return new ListAssetsFixedSizeCollection(null, 0); - } - - @Override - protected ListAssetsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListAssetsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java deleted file mode 100644 index 5ad8e0041dc1..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceSettings.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2022 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 com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStubSettings; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of listAssets to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .listAssetsSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listAssets. */ - public PagedCallSettings - listAssetsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).listAssetsSettings(); - } - - public static final AssetServiceSettings create(AssetServiceStubSettings stub) - throws IOException { - return new AssetServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AssetServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AssetServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AssetServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return AssetServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AssetServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AssetServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(AssetServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(AssetServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AssetServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(AssetServiceStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(AssetServiceStubSettings.newHttpJsonBuilder()); - } - - public AssetServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AssetServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listAssets. */ - public PagedCallSettings.Builder - listAssetsSettings() { - return getStubSettingsBuilder().listAssetsSettings(); - } - - @Override - public AssetServiceSettings build() throws IOException { - return new AssetServiceSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json deleted file mode 100644 index 06316893be70..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/gapic_metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.asset.v1p5beta1", - "libraryPackage": "com.google.cloud.asset.v1p5beta1", - "services": { - "AssetService": { - "clients": { - "grpc": { - "libraryClient": "AssetServiceClient", - "rpcs": { - "ListAssets": { - "methods": ["listAssets", "listAssetsPagedCallable", "listAssetsCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java deleted file mode 100644 index 567e1650e8c0..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/package-info.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 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. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= AssetServiceClient ======================= - * - *

Service Description: Asset service definition. - * - *

Sample for AssetServiceClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   ListAssetsRequest request =
- *       ListAssetsRequest.newBuilder()
- *           .setParent("parent-995424086")
- *           .setReadTime(Timestamp.newBuilder().build())
- *           .addAllAssetTypes(new ArrayList())
- *           .setContentType(ContentType.forNumber(0))
- *           .setPageSize(883849137)
- *           .setPageToken("pageToken873572522")
- *           .build();
- *   for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
- *     // doThingsWith(element);
- *   }
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.asset.v1p5beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java deleted file mode 100644 index a04a59c0279a..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStub.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; -import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class AssetServiceStub implements BackgroundResource { - - public UnaryCallable listAssetsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); - } - - public UnaryCallable listAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java deleted file mode 100644 index cade28599fc0..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/AssetServiceStubSettings.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p5beta1.Asset; -import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; -import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of listAssets to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
- *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .listAssetsSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final PagedCallSettings - listAssetsSettings; - - private static final PagedListDescriptor - LIST_ASSETS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { - return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { - return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListAssetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListAssetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListAssetsResponse payload) { - return payload.getAssetsList() == null - ? ImmutableList.of() - : payload.getAssetsList(); - } - }; - - private static final PagedListResponseFactory< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> - LIST_ASSETS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListAssetsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); - return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listAssets. */ - public PagedCallSettings - listAssetsSettings() { - return listAssetsSettings; - } - - public AssetServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAssetServiceStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonAssetServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "cloudasset.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "cloudasset.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listAssetsSettings = settingsBuilder.listAssetsSettings().build(); - } - - /** Builder for AssetServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> - listAssetsSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); - - unaryMethodSettingsBuilders = - ImmutableList.>of(listAssetsSettings); - initDefaults(this); - } - - protected Builder(AssetServiceStubSettings settings) { - super(settings); - - listAssetsSettings = settings.listAssetsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(listAssetsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listAssets. */ - public PagedCallSettings.Builder - listAssetsSettings() { - return listAssetsSettings; - } - - @Override - public AssetServiceStubSettings build() throws IOException { - return new AssetServiceStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java deleted file mode 100644 index 1a0d0cff1649..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java deleted file mode 100644 index 9be0edcf03da..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/GrpcAssetServiceStub.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; -import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceStub extends AssetServiceStub { - private static final MethodDescriptor - listAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p5beta1.AssetService/ListAssets") - .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable listAssetsCallable; - private final UnaryCallable listAssetsPagedCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { - return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAssetServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAssetServiceStub( - AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listAssetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.listAssetsCallable = - callableFactory.createUnaryCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listAssetsPagedCallable = - callableFactory.createPagedCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listAssetsCallable() { - return listAssetsCallable; - } - - @Override - public UnaryCallable listAssetsPagedCallable() { - return listAssetsPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java deleted file mode 100644 index cec88147621b..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonAssetServiceCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java deleted file mode 100644 index ef08931ef00a..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p5beta1/stub/HttpJsonAssetServiceStub.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import static com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; -import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonAssetServiceStub extends AssetServiceStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - listAssetsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.asset.v1p5beta1.AssetService/ListAssets") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1p5beta1/{parent=*/*}/assets", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam( - fields, "assetTypes", request.getAssetTypesList()); - serializer.putQueryParam( - fields, "contentType", request.getContentType()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - serializer.putQueryParam(fields, "readTime", request.getReadTime()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListAssetsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable listAssetsCallable; - private final UnaryCallable listAssetsPagedCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new HttpJsonAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonAssetServiceStub create(ClientContext clientContext) - throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonAssetServiceStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonAssetServiceStub( - AssetServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonAssetServiceStub, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected HttpJsonAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings listAssetsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listAssetsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listAssetsCallable = - callableFactory.createUnaryCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - this.listAssetsPagedCallable = - callableFactory.createPagedCallable( - listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listAssetsMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable listAssetsCallable() { - return listAssetsCallable; - } - - @Override - public UnaryCallable listAssetsPagedCallable() { - return listAssetsPagedCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java deleted file mode 100644 index 1514c3cb5c9a..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientHttpJsonTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2022 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 com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.asset.v1p5beta1.stub.HttpJsonAssetServiceStub; -import com.google.common.collect.Lists; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientHttpJsonTest { - private static MockHttpService mockService; - private static AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonAssetServiceStub.getMethodDescriptors(), - AssetServiceSettings.getDefaultEndpoint()); - AssetServiceSettings settings = - AssetServiceSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listAssetsTest() throws Exception { - Asset responsesElement = Asset.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllAssets(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent("parent-4715/parent-4715") - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - ListAssetsPagedResponse pagedListResponse = client.listAssets(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAssetsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent("parent-4715/parent-4715") - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.listAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java deleted file mode 100644 index 3a07d88a6f06..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/AssetServiceClientTest.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2022 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 com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.common.collect.Lists; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientTest { - private static MockAssetService mockAssetService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockAssetService = new MockAssetService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - AssetServiceSettings settings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listAssetsTest() throws Exception { - Asset responsesElement = Asset.newBuilder().build(); - ListAssetsResponse expectedResponse = - ListAssetsResponse.newBuilder() - .setNextPageToken("") - .addAllAssets(Arrays.asList(responsesElement)) - .build(); - mockAssetService.addResponse(expectedResponse); - - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent("parent-995424086") - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - - ListAssetsPagedResponse pagedListResponse = client.listAssets(request); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); - Assert.assertEquals(request.getAssetTypesList(), actualRequest.getAssetTypesList()); - Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); - Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); - Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAssetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent("parent-995424086") - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - client.listAssets(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java deleted file mode 100644 index d7e1b31ac2d3..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetService implements MockGrpcService { - private final MockAssetServiceImpl serviceImpl; - - public MockAssetService() { - serviceImpl = new MockAssetServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java deleted file mode 100644 index 0da2b09706b6..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p5beta1/MockAssetServiceImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.cloud.asset.v1p5beta1.AssetServiceGrpc.AssetServiceImplBase; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetServiceImpl extends AssetServiceImplBase { - private List requests; - private Queue responses; - - public MockAssetServiceImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void listAssets( - ListAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListAssetsResponse) { - requests.add(request); - responseObserver.onNext(((ListAssetsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListAssets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListAssetsResponse.class.getName(), - Exception.class.getName()))); - } - } -} 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/owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java deleted file mode 100644 index f931499fa9d2..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java +++ /dev/null @@ -1,307 +0,0 @@ -package com.google.cloud.asset.v1p5beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Asset service definition.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/asset/v1p5beta1/asset_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AssetServiceGrpc { - - private AssetServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.asset.v1p5beta1.AssetService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor 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; - 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(); - } - } - } - return getListAssetsMethod; - } - - /** - * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { - - /** - *
-     * 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.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - 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>( - this, METHODID_LIST_ASSETS))) - .build(); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAssetsMethod(), getCallOptions(), request); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * Lists assets with time and resource types and returns paged results in
-     * response.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture listAssets( - com.google.cloud.asset.v1p5beta1.ListAssetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_ASSETS = 0; - - 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 AssetServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AssetServiceImplBase 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_LIST_ASSETS: - serviceImpl.listAssets((com.google.cloud.asset.v1p5beta1.ListAssetsRequest) 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(); - } - } - } - - private static abstract 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.v1p5beta1.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 String methodName; - - AssetServiceMethodDescriptorSupplier(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(getListAssetsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java deleted file mode 100644 index a74a13f4f6d1..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Asset.java +++ /dev/null @@ -1,2774 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/assets.proto - -package com.google.cloud.asset.v1p5beta1; - -/** - *
- * Cloud asset. This includes all Google Cloud Platform resources,
- * Cloud IAM policies, and other non-GCP assets.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.Asset} - */ -public final class Asset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.Asset) - AssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use Asset.newBuilder() to construct. - private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Asset() { - name_ = ""; - assetType_ = ""; - orgPolicy_ = java.util.Collections.emptyList(); - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Asset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Asset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - com.google.cloud.asset.v1p5beta1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = input.readMessage(com.google.cloud.asset.v1p5beta1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - orgPolicy_.add( - input.readMessage(com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); - break; - } - case 58: { - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; - if (accessContextPolicyCase_ == 7) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 7; - break; - } - case 66: { - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; - if (accessContextPolicyCase_ == 8) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 8; - break; - } - case 74: { - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = null; - if (accessContextPolicyCase_ == 9) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 9; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ancestors_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.Asset.class, com.google.cloud.asset.v1p5beta1.Asset.Builder.class); - } - - private int accessContextPolicyCase_ = 0; - private java.lang.Object accessContextPolicy_; - public enum AccessContextPolicyCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ACCESS_POLICY(7), - ACCESS_LEVEL(8), - SERVICE_PERIMETER(9), - ACCESSCONTEXTPOLICY_NOT_SET(0); - private final int value; - private AccessContextPolicyCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AccessContextPolicyCase valueOf(int value) { - return forNumber(value); - } - - public static AccessContextPolicyCase forNumber(int value) { - switch (value) { - case 7: return ACCESS_POLICY; - case 8: return ACCESS_LEVEL; - case 9: return SERVICE_PERIMETER; - case 0: return ACCESSCONTEXTPOLICY_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public AccessContextPolicyCase - getAccessContextPolicyCase() { - return AccessContextPolicyCase.forNumber( - accessContextPolicyCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1p5beta1.Resource resource_; - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - @java.lang.Override - public boolean hasResource() { - return resource_ != null; - } - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - * @return The resource. - */ - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Resource getResource() { - return resource_ == null ? com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance() : resource_; - } - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder() { - return getResource(); - } - - public static final int IAM_POLICY_FIELD_NUMBER = 4; - private com.google.iam.v1.Policy iamPolicy_; - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - @java.lang.Override - public boolean hasIamPolicy() { - return iamPolicy_ != null; - } - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getIamPolicy() { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - return getIamPolicy(); - } - - public static final int ORG_POLICY_FIELD_NUMBER = 6; - private java.util.List orgPolicy_; - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public java.util.List getOrgPolicyList() { - return orgPolicy_; - } - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public java.util.List - getOrgPolicyOrBuilderList() { - return orgPolicy_; - } - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public int getOrgPolicyCount() { - return orgPolicy_.size(); - } - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { - return orgPolicy_.get(index); - } - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index) { - return orgPolicy_.get(index); - } - - public static final int ACCESS_POLICY_FIELD_NUMBER = 7; - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - @java.lang.Override - public boolean hasAccessPolicy() { - return accessContextPolicyCase_ == 7; - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - - public static final int ACCESS_LEVEL_FIELD_NUMBER = 8; - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - @java.lang.Override - public boolean hasAccessLevel() { - return accessContextPolicyCase_ == 8; - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - - public static final int SERVICE_PERIMETER_FIELD_NUMBER = 9; - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - @java.lang.Override - public boolean hasServicePerimeter() { - return accessContextPolicyCase_ == 9; - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - - public static final int ANCESTORS_FIELD_NUMBER = 10; - private com.google.protobuf.LazyStringList ancestors_; - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_; - } - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - if (resource_ != null) { - output.writeMessage(3, getResource()); - } - if (iamPolicy_ != null) { - output.writeMessage(4, getIamPolicy()); - } - for (int i = 0; i < orgPolicy_.size(); i++) { - output.writeMessage(6, orgPolicy_.get(i)); - } - if (accessContextPolicyCase_ == 7) { - output.writeMessage(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 8) { - output.writeMessage(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 9) { - output.writeMessage(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - } - for (int i = 0; i < ancestors_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - if (resource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getResource()); - } - if (iamPolicy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIamPolicy()); - } - for (int i = 0; i < orgPolicy_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, orgPolicy_.get(i)); - } - if (accessContextPolicyCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - } - { - int dataSize = 0; - for (int i = 0; i < ancestors_.size(); i++) { - dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); - } - size += dataSize; - size += 1 * getAncestorsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p5beta1.Asset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p5beta1.Asset other = (com.google.cloud.asset.v1p5beta1.Asset) obj; - - if (!getName() - .equals(other.getName())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (hasResource() != other.hasResource()) return false; - if (hasResource()) { - if (!getResource() - .equals(other.getResource())) return false; - } - if (hasIamPolicy() != other.hasIamPolicy()) return false; - if (hasIamPolicy()) { - if (!getIamPolicy() - .equals(other.getIamPolicy())) return false; - } - if (!getOrgPolicyList() - .equals(other.getOrgPolicyList())) return false; - if (!getAncestorsList() - .equals(other.getAncestorsList())) return false; - if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false; - switch (accessContextPolicyCase_) { - case 7: - if (!getAccessPolicy() - .equals(other.getAccessPolicy())) return false; - break; - case 8: - if (!getAccessLevel() - .equals(other.getAccessLevel())) return false; - break; - case 9: - if (!getServicePerimeter() - .equals(other.getServicePerimeter())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (hasResource()) { - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - } - if (hasIamPolicy()) { - hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicy().hashCode(); - } - if (getOrgPolicyCount() > 0) { - hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getOrgPolicyList().hashCode(); - } - if (getAncestorsCount() > 0) { - hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAncestorsList().hashCode(); - } - switch (accessContextPolicyCase_) { - case 7: - hash = (37 * hash) + ACCESS_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getAccessPolicy().hashCode(); - break; - case 8: - hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + getAccessLevel().hashCode(); - break; - case 9: - hash = (37 * hash) + SERVICE_PERIMETER_FIELD_NUMBER; - hash = (53 * hash) + getServicePerimeter().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.Asset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.Asset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Cloud asset. This includes all Google Cloud Platform resources,
-   * Cloud IAM policies, and other non-GCP assets.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.Asset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.Asset) - com.google.cloud.asset.v1p5beta1.AssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.Asset.class, com.google.cloud.asset.v1p5beta1.Asset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p5beta1.Asset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getOrgPolicyFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - assetType_ = ""; - - if (resourceBuilder_ == null) { - resource_ = null; - } else { - resource_ = null; - resourceBuilder_ = null; - } - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - if (orgPolicyBuilder_ == null) { - orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - orgPolicyBuilder_.clear(); - } - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Asset getDefaultInstanceForType() { - return com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Asset build() { - com.google.cloud.asset.v1p5beta1.Asset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Asset buildPartial() { - com.google.cloud.asset.v1p5beta1.Asset result = new com.google.cloud.asset.v1p5beta1.Asset(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.assetType_ = assetType_; - if (resourceBuilder_ == null) { - result.resource_ = resource_; - } else { - result.resource_ = resourceBuilder_.build(); - } - if (iamPolicyBuilder_ == null) { - result.iamPolicy_ = iamPolicy_; - } else { - result.iamPolicy_ = iamPolicyBuilder_.build(); - } - if (orgPolicyBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.orgPolicy_ = orgPolicy_; - } else { - result.orgPolicy_ = orgPolicyBuilder_.build(); - } - if (accessContextPolicyCase_ == 7) { - if (accessPolicyBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = accessPolicyBuilder_.build(); - } - } - if (accessContextPolicyCase_ == 8) { - if (accessLevelBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = accessLevelBuilder_.build(); - } - } - if (accessContextPolicyCase_ == 9) { - if (servicePerimeterBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = servicePerimeterBuilder_.build(); - } - } - if (((bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.ancestors_ = ancestors_; - result.accessContextPolicyCase_ = accessContextPolicyCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p5beta1.Asset) { - return mergeFrom((com.google.cloud.asset.v1p5beta1.Asset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.Asset other) { - if (other == com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (other.hasResource()) { - mergeResource(other.getResource()); - } - if (other.hasIamPolicy()) { - mergeIamPolicy(other.getIamPolicy()); - } - if (orgPolicyBuilder_ == null) { - if (!other.orgPolicy_.isEmpty()) { - if (orgPolicy_.isEmpty()) { - orgPolicy_ = other.orgPolicy_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOrgPolicyIsMutable(); - orgPolicy_.addAll(other.orgPolicy_); - } - onChanged(); - } - } else { - if (!other.orgPolicy_.isEmpty()) { - if (orgPolicyBuilder_.isEmpty()) { - orgPolicyBuilder_.dispose(); - orgPolicyBuilder_ = null; - orgPolicy_ = other.orgPolicy_; - bitField0_ = (bitField0_ & ~0x00000001); - orgPolicyBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOrgPolicyFieldBuilder() : null; - } else { - orgPolicyBuilder_.addAllMessages(other.orgPolicy_); - } - } - } - if (!other.ancestors_.isEmpty()) { - if (ancestors_.isEmpty()) { - ancestors_ = other.ancestors_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAncestorsIsMutable(); - ancestors_.addAll(other.ancestors_); - } - onChanged(); - } - switch (other.getAccessContextPolicyCase()) { - case ACCESS_POLICY: { - mergeAccessPolicy(other.getAccessPolicy()); - break; - } - case ACCESS_LEVEL: { - mergeAccessLevel(other.getAccessLevel()); - break; - } - case SERVICE_PERIMETER: { - mergeServicePerimeter(other.getServicePerimeter()); - break; - } - case ACCESSCONTEXTPOLICY_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.Asset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p5beta1.Asset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int accessContextPolicyCase_ = 0; - private java.lang.Object accessContextPolicy_; - public AccessContextPolicyCase - getAccessContextPolicyCase() { - return AccessContextPolicyCase.forNumber( - accessContextPolicyCase_); - } - - public Builder clearAccessContextPolicy() { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. For example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-     * See [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * Type of the asset. Example: "compute.googleapis.com/Disk".
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p5beta1.Resource resource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p5beta1.Resource, com.google.cloud.asset.v1p5beta1.Resource.Builder, com.google.cloud.asset.v1p5beta1.ResourceOrBuilder> resourceBuilder_; - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - public boolean hasResource() { - return resourceBuilder_ != null || resource_ != null; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - * @return The resource. - */ - public com.google.cloud.asset.v1p5beta1.Resource getResource() { - if (resourceBuilder_ == null) { - return resource_ == null ? com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance() : resource_; - } else { - return resourceBuilder_.getMessage(); - } - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - public Builder setResource(com.google.cloud.asset.v1p5beta1.Resource value) { - if (resourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - onChanged(); - } else { - resourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - public Builder setResource( - com.google.cloud.asset.v1p5beta1.Resource.Builder builderForValue) { - if (resourceBuilder_ == null) { - resource_ = builderForValue.build(); - onChanged(); - } else { - resourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - public Builder mergeResource(com.google.cloud.asset.v1p5beta1.Resource value) { - if (resourceBuilder_ == null) { - if (resource_ != null) { - resource_ = - com.google.cloud.asset.v1p5beta1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); - } else { - resource_ = value; - } - onChanged(); - } else { - resourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - public Builder clearResource() { - if (resourceBuilder_ == null) { - resource_ = null; - onChanged(); - } else { - resource_ = null; - resourceBuilder_ = null; - } - - return this; - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1p5beta1.Resource.Builder getResourceBuilder() { - - onChanged(); - return getResourceFieldBuilder().getBuilder(); - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder() { - if (resourceBuilder_ != null) { - return resourceBuilder_.getMessageOrBuilder(); - } else { - return resource_ == null ? - com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance() : resource_; - } - } - /** - *
-     * Representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p5beta1.Resource, com.google.cloud.asset.v1p5beta1.Resource.Builder, com.google.cloud.asset.v1p5beta1.ResourceOrBuilder> - getResourceFieldBuilder() { - if (resourceBuilder_ == null) { - resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p5beta1.Resource, com.google.cloud.asset.v1p5beta1.Resource.Builder, com.google.cloud.asset.v1p5beta1.ResourceOrBuilder>( - getResource(), - getParentForChildren(), - isClean()); - resource_ = null; - } - return resourceBuilder_; - } - - private com.google.iam.v1.Policy iamPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - public boolean hasIamPolicy() { - return iamPolicyBuilder_ != null || iamPolicy_ != null; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - public com.google.iam.v1.Policy getIamPolicy() { - if (iamPolicyBuilder_ == null) { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } else { - return iamPolicyBuilder_.getMessage(); - } - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - iamPolicy_ = value; - onChanged(); - } else { - iamPolicyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy( - com.google.iam.v1.Policy.Builder builderForValue) { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = builderForValue.build(); - onChanged(); - } else { - iamPolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (iamPolicy_ != null) { - iamPolicy_ = - com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); - } else { - iamPolicy_ = value; - } - onChanged(); - } else { - iamPolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder clearIamPolicy() { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - onChanged(); - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - - return this; - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { - - onChanged(); - return getIamPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - if (iamPolicyBuilder_ != null) { - return iamPolicyBuilder_.getMessageOrBuilder(); - } else { - return iamPolicy_ == null ? - com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - } - /** - *
-     * Representation of the actual Cloud IAM policy set on a cloud resource. For
-     * each resource, there must be at most one Cloud IAM policy set on it.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> - getIamPolicyFieldBuilder() { - if (iamPolicyBuilder_ == null) { - iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( - getIamPolicy(), - getParentForChildren(), - isClean()); - iamPolicy_ = null; - } - return iamPolicyBuilder_; - } - - private java.util.List orgPolicy_ = - java.util.Collections.emptyList(); - private void ensureOrgPolicyIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(orgPolicy_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> orgPolicyBuilder_; - - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List getOrgPolicyList() { - if (orgPolicyBuilder_ == null) { - return java.util.Collections.unmodifiableList(orgPolicy_); - } else { - return orgPolicyBuilder_.getMessageList(); - } - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public int getOrgPolicyCount() { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.size(); - } else { - return orgPolicyBuilder_.getCount(); - } - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.get(index); - } else { - return orgPolicyBuilder_.getMessage(index); - } - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder setOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.set(index, value); - onChanged(); - } else { - orgPolicyBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder setOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.set(index, builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.add(value); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.add(index, value); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.add(builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.add(index, builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addAllOrgPolicy( - java.lang.Iterable values) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, orgPolicy_); - onChanged(); - } else { - orgPolicyBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder clearOrgPolicy() { - if (orgPolicyBuilder_ == null) { - orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - orgPolicyBuilder_.clear(); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder removeOrgPolicy(int index) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.remove(index); - onChanged(); - } else { - orgPolicyBuilder_.remove(index); - } - return this; - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder getOrgPolicyBuilder( - int index) { - return getOrgPolicyFieldBuilder().getBuilder(index); - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index) { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.get(index); } else { - return orgPolicyBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List - getOrgPolicyOrBuilderList() { - if (orgPolicyBuilder_ != null) { - return orgPolicyBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(orgPolicy_); - } - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder() { - return getOrgPolicyFieldBuilder().addBuilder( - com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder( - int index) { - return getOrgPolicyFieldBuilder().addBuilder( - index, com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); - } - /** - *
-     * Representation of the Cloud Organization Policy set on an asset. For each
-     * asset, there could be multiple Organization policies with different
-     * constraints.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List - getOrgPolicyBuilderList() { - return getOrgPolicyFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> - getOrgPolicyFieldBuilder() { - if (orgPolicyBuilder_ == null) { - orgPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder>( - orgPolicy_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - orgPolicy_ = null; - } - return orgPolicyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> accessPolicyBuilder_; - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - @java.lang.Override - public boolean hasAccessPolicy() { - return accessContextPolicyCase_ == 7; - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 7) { - return accessPolicyBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder setAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { - if (accessPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - accessPolicyBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 7; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder setAccessPolicy( - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder builderForValue) { - if (accessPolicyBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - accessPolicyBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 7; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder mergeAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.newBuilder((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 7) { - accessPolicyBuilder_.mergeFrom(value); - } else { - accessPolicyBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 7; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder clearAccessPolicy() { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 7) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - accessPolicyBuilder_.clear(); - } - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder getAccessPolicyBuilder() { - return getAccessPolicyFieldBuilder().getBuilder(); - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { - if ((accessContextPolicyCase_ == 7) && (accessPolicyBuilder_ != null)) { - return accessPolicyBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - } - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> - getAccessPolicyFieldBuilder() { - if (accessPolicyBuilder_ == null) { - if (!(accessContextPolicyCase_ == 7)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - accessPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>( - (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 7; - onChanged();; - return accessPolicyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> accessLevelBuilder_; - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - @java.lang.Override - public boolean hasAccessLevel() { - return accessContextPolicyCase_ == 8; - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 8) { - return accessLevelBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder setAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { - if (accessLevelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - accessLevelBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 8; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder setAccessLevel( - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder builderForValue) { - if (accessLevelBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - accessLevelBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 8; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder mergeAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.newBuilder((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 8) { - accessLevelBuilder_.mergeFrom(value); - } else { - accessLevelBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 8; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder clearAccessLevel() { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 8) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - accessLevelBuilder_.clear(); - } - return this; - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public com.google.identity.accesscontextmanager.v1.AccessLevel.Builder getAccessLevelBuilder() { - return getAccessLevelFieldBuilder().getBuilder(); - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { - if ((accessContextPolicyCase_ == 8) && (accessLevelBuilder_ != null)) { - return accessLevelBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - } - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> - getAccessLevelFieldBuilder() { - if (accessLevelBuilder_ == null) { - if (!(accessContextPolicyCase_ == 8)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - accessLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>( - (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 8; - onChanged();; - return accessLevelBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> servicePerimeterBuilder_; - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - @java.lang.Override - public boolean hasServicePerimeter() { - return accessContextPolicyCase_ == 9; - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 9) { - return servicePerimeterBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder setServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { - if (servicePerimeterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - servicePerimeterBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 9; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder setServicePerimeter( - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder builderForValue) { - if (servicePerimeterBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - servicePerimeterBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 9; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder mergeServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.newBuilder((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 9) { - servicePerimeterBuilder_.mergeFrom(value); - } else { - servicePerimeterBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 9; - return this; - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder clearServicePerimeter() { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 9) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - servicePerimeterBuilder_.clear(); - } - return this; - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder getServicePerimeterBuilder() { - return getServicePerimeterFieldBuilder().getBuilder(); - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { - if ((accessContextPolicyCase_ == 9) && (servicePerimeterBuilder_ != null)) { - return servicePerimeterBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - } - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> - getServicePerimeterFieldBuilder() { - if (servicePerimeterBuilder_ == null) { - if (!(accessContextPolicyCase_ == 9)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - servicePerimeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>( - (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 9; - onChanged();; - return servicePerimeterBuilder_; - } - - private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAncestorsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_.getUnmodifiableView(); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @param index The index to set the value at. - * @param value The ancestors to set. - * @return This builder for chaining. - */ - public Builder setAncestors( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @param value The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestors( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @param values The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAllAncestors( - java.lang.Iterable values) { - ensureAncestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ancestors_); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @return This builder for chaining. - */ - public Builder clearAncestors() { - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-     * represented as a list of relative resource names. Ancestry path starts with
-     * the closest CRM ancestor and ends at root. If the asset is a CRM
-     * project/folder/organization, this starts from the asset itself.
-     * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-     * 
- * - * repeated string ancestors = 10; - * @param value The bytes of the ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestorsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.Asset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.Asset) - private static final com.google.cloud.asset.v1p5beta1.Asset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.Asset(); - } - - public static com.google.cloud.asset.v1p5beta1.Asset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Asset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Asset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java deleted file mode 100644 index c54c20d16b1b..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetOrBuilder.java +++ /dev/null @@ -1,272 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/assets.proto - -package com.google.cloud.asset.v1p5beta1; - -public interface AssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.Asset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The full name of the asset. For example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
-   * See [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * Type of the asset. Example: "compute.googleapis.com/Disk".
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - boolean hasResource(); - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - * @return The resource. - */ - com.google.cloud.asset.v1p5beta1.Resource getResource(); - /** - *
-   * Representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p5beta1.Resource resource = 3; - */ - com.google.cloud.asset.v1p5beta1.ResourceOrBuilder getResourceOrBuilder(); - - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - boolean hasIamPolicy(); - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - com.google.iam.v1.Policy getIamPolicy(); - /** - *
-   * Representation of the actual Cloud IAM policy set on a cloud resource. For
-   * each resource, there must be at most one Cloud IAM policy set on it.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); - - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - java.util.List - getOrgPolicyList(); - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index); - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - int getOrgPolicyCount(); - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - java.util.List - getOrgPolicyOrBuilderList(); - /** - *
-   * Representation of the Cloud Organization Policy set on an asset. For each
-   * asset, there could be multiple Organization policies with different
-   * constraints.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index); - - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - boolean hasAccessPolicy(); - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy(); - /** - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder(); - - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - boolean hasAccessLevel(); - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel(); - /** - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder(); - - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - boolean hasServicePerimeter(); - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter(); - /** - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder(); - - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - java.util.List - getAncestorsList(); - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - int getAncestorsCount(); - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - java.lang.String getAncestors(int index); - /** - *
-   * Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy,
-   * represented as a list of relative resource names. Ancestry path starts with
-   * the closest CRM ancestor and ends at root. If the asset is a CRM
-   * project/folder/organization, this starts from the asset itself.
-   * Example: ["projects/123456789", "folders/5432", "organizations/1234"]
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - com.google.protobuf.ByteString - getAncestorsBytes(int index); - - public com.google.cloud.asset.v1p5beta1.Asset.AccessContextPolicyCase getAccessContextPolicyCase(); -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java deleted file mode 100644 index cab08c9049fa..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetProto.java +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/assets.proto - -package com.google.cloud.asset.v1p5beta1; - -public final class AssetProto { - private AssetProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/asset/v1p5beta1/assets.pr" + - "oto\022\034google.cloud.asset.v1p5beta1\032\031googl" + - "e/api/resource.proto\032)google/cloud/orgpo" + - "licy/v1/orgpolicy.proto\032\032google/iam/v1/p" + - "olicy.proto\032:google/identity/accessconte" + - "xtmanager/v1/access_level.proto\032;google/" + - "identity/accesscontextmanager/v1/access_" + - "policy.proto\032?google/identity/accesscont" + - "extmanager/v1/service_perimeter.proto\032\034g" + - "oogle/protobuf/struct.proto\"\220\004\n\005Asset\022\014\n" + - "\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0228\n\010resou" + - "rce\030\003 \001(\0132&.google.cloud.asset.v1p5beta1" + - ".Resource\022)\n\niam_policy\030\004 \001(\0132\025.google.i" + - "am.v1.Policy\0225\n\norg_policy\030\006 \003(\0132!.googl" + - "e.cloud.orgpolicy.v1.Policy\022N\n\raccess_po" + - "licy\030\007 \001(\01325.google.identity.accessconte" + - "xtmanager.v1.AccessPolicyH\000\022L\n\014access_le" + - "vel\030\010 \001(\01324.google.identity.accesscontex" + - "tmanager.v1.AccessLevelH\000\022V\n\021service_per" + - "imeter\030\t \001(\01329.google.identity.accesscon" + - "textmanager.v1.ServicePerimeterH\000\022\021\n\tanc" + - "estors\030\n \003(\t:\'\352A$\n\037cloudasset.googleapis" + - ".com/Asset\022\001*B\027\n\025access_context_policy\"\240" + - "\001\n\010Resource\022\017\n\007version\030\001 \001(\t\022\036\n\026discover" + - "y_document_uri\030\002 \001(\t\022\026\n\016discovery_name\030\003" + - " \001(\t\022\024\n\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001" + - "(\t\022%\n\004data\030\006 \001(\0132\027.google.protobuf.Struc" + - "tB\264\001\n com.google.cloud.asset.v1p5beta1B\n" + - "AssetProtoP\001ZAgoogle.golang.org/genproto" + - "/googleapis/cloud/asset/v1p5beta1;asset\370" + - "\001\001\252\002\034Google.Cloud.Asset.V1p5Beta1\312\002\034Goog" + - "le\\Cloud\\Asset\\V1p5beta1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(), - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p5beta1_Asset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p5beta1_Asset_descriptor, - new java.lang.String[] { "Name", "AssetType", "Resource", "IamPolicy", "OrgPolicy", "AccessPolicy", "AccessLevel", "ServicePerimeter", "Ancestors", "AccessContextPolicy", }); - internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor, - new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java deleted file mode 100644 index 444c8baba5e8..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceProto.java +++ /dev/null @@ -1,104 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/asset_service.proto - -package com.google.cloud.asset.v1p5beta1; - -public final class AssetServiceProto { - private AssetServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n0google/cloud/asset/v1p5beta1/asset_ser" + - "vice.proto\022\034google.cloud.asset.v1p5beta1" + - "\032\034google/api/annotations.proto\032\027google/a" + - "pi/client.proto\032\037google/api/field_behavi" + - "or.proto\032)google/cloud/asset/v1p5beta1/a" + - "ssets.proto\032\037google/protobuf/timestamp.p" + - "roto\"\324\001\n\021ListAssetsRequest\022\023\n\006parent\030\001 \001" + - "(\tB\003\340A\002\022-\n\tread_time\030\002 \001(\0132\032.google.prot" + - "obuf.Timestamp\022\023\n\013asset_types\030\003 \003(\t\022?\n\014c" + - "ontent_type\030\004 \001(\0162).google.cloud.asset.v" + - "1p5beta1.ContentType\022\021\n\tpage_size\030\005 \001(\005\022" + - "\022\n\npage_token\030\006 \001(\t\"\221\001\n\022ListAssetsRespon" + - "se\022-\n\tread_time\030\001 \001(\0132\032.google.protobuf." + - "Timestamp\0223\n\006assets\030\002 \003(\0132#.google.cloud" + - ".asset.v1p5beta1.Asset\022\027\n\017next_page_toke" + - "n\030\003 \001(\t*l\n\013ContentType\022\034\n\030CONTENT_TYPE_U" + - "NSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY" + - "\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020\0052\367\001" + - "\n\014AssetService\022\227\001\n\nListAssets\022/.google.c" + - "loud.asset.v1p5beta1.ListAssetsRequest\0320" + - ".google.cloud.asset.v1p5beta1.ListAssets" + - "Response\"&\202\323\344\223\002 \022\036/v1p5beta1/{parent=*/*" + - "}/assets\032M\312A\031cloudasset.googleapis.com\322A" + - ".https://www.googleapis.com/auth/cloud-p" + - "latformB\270\001\n com.google.cloud.asset.v1p5b" + - "eta1B\021AssetServiceProtoP\001ZAgoogle.golang" + - ".org/genproto/googleapis/cloud/asset/v1p" + - "5beta1;asset\252\002\034Google.Cloud.Asset.V1P5Be" + - "ta1\312\002\034Google\\Cloud\\Asset\\V1p5beta1b\006prot" + - "o3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.asset.v1p5beta1.AssetProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor, - new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "PageSize", "PageToken", }); - internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor, - new java.lang.String[] { "ReadTime", "Assets", "NextPageToken", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.oauthScopes); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.cloud.asset.v1p5beta1.AssetProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java deleted file mode 100644 index edc9ca3e0510..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ContentType.java +++ /dev/null @@ -1,184 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/asset_service.proto - -package com.google.cloud.asset.v1p5beta1; - -/** - *
- * Asset content type.
- * 
- * - * Protobuf enum {@code google.cloud.asset.v1p5beta1.ContentType} - */ -public enum ContentType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - CONTENT_TYPE_UNSPECIFIED(0), - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - RESOURCE(1), - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - IAM_POLICY(2), - /** - *
-   * The Cloud Organization Policy set on an asset.
-   * 
- * - * ORG_POLICY = 4; - */ - ORG_POLICY(4), - /** - *
-   * The Cloud Access context mananger Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - ACCESS_POLICY(5), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - public static final int RESOURCE_VALUE = 1; - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - public static final int IAM_POLICY_VALUE = 2; - /** - *
-   * The Cloud Organization Policy set on an asset.
-   * 
- * - * ORG_POLICY = 4; - */ - public static final int ORG_POLICY_VALUE = 4; - /** - *
-   * The Cloud Access context mananger Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - public static final int ACCESS_POLICY_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContentType forNumber(int value) { - switch (value) { - case 0: return CONTENT_TYPE_UNSPECIFIED; - case 1: return RESOURCE; - case 2: return IAM_POLICY; - case 4: return ORG_POLICY; - case 5: return ACCESS_POLICY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ContentType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContentType findValueByNumber(int number) { - return ContentType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); - } - - private static final ContentType[] VALUES = values(); - - public static ContentType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContentType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p5beta1.ContentType) -} - diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java deleted file mode 100644 index b5cfe3b32d4c..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequest.java +++ /dev/null @@ -1,1594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/asset_service.proto - -package com.google.cloud.asset.v1p5beta1; - -/** - *
- * ListAssets request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsRequest} - */ -public final class ListAssetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.ListAssetsRequest) - ListAssetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAssetsRequest.newBuilder() to construct. - private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAssetsRequest() { - parent_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAssetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListAssetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 40: { - - pageSize_ = input.readInt32(); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.ListAssetsRequest.class, com.google.cloud.asset.v1p5beta1.ListAssetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. Name of the organization or project the assets belong to. Format:
-   * "organizations/[organization-number]" (such as "organizations/123"),
-   * "projects/[project-number]" (such as "projects/my-project-id"), or
-   * "projects/[project-id]" (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. Name of the organization or project the assets belong to. Format:
-   * "organizations/[organization-number]" (such as "organizations/123"),
-   * "projects/[project-number]" (such as "projects/my-project-id"), or
-   * "projects/[project-id]" (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 4; - private int contentType_; - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override public com.google.cloud.asset.v1p5beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p5beta1.ContentType result = com.google.cloud.asset.v1p5beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p5beta1.ContentType.UNRECOGNIZED : result; - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 5; - private int pageSize_; - /** - *
-   * The maximum number of assets to be returned in a single response. Default
-   * is 100, minimum is 1, and maximum is 1000.
-   * 
- * - * int32 page_size = 5; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 6; - private volatile java.lang.Object pageToken_; - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (readTime_ != null) { - output.writeMessage(2, getReadTime()); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (contentType_ != com.google.cloud.asset.v1p5beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, contentType_); - } - if (pageSize_ != 0) { - output.writeInt32(5, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReadTime()); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (contentType_ != com.google.cloud.asset.v1p5beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, contentType_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p5beta1.ListAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p5beta1.ListAssetsRequest other = (com.google.cloud.asset.v1p5beta1.ListAssetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (contentType_ != other.contentType_) return false; - if (getPageSize() - != other.getPageSize()) return false; - if (!getPageToken() - .equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.ListAssetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * ListAssets request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.ListAssetsRequest) - com.google.cloud.asset.v1p5beta1.ListAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.ListAssetsRequest.class, com.google.cloud.asset.v1p5beta1.ListAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p5beta1.ListAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - contentType_ = 0; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p5beta1.ListAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsRequest build() { - com.google.cloud.asset.v1p5beta1.ListAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsRequest buildPartial() { - com.google.cloud.asset.v1p5beta1.ListAssetsRequest result = new com.google.cloud.asset.v1p5beta1.ListAssetsRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.contentType_ = contentType_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p5beta1.ListAssetsRequest) { - return mergeFrom((com.google.cloud.asset.v1p5beta1.ListAssetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.ListAssetsRequest other) { - if (other == com.google.cloud.asset.v1p5beta1.ListAssetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.ListAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p5beta1.ListAssetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. Name of the organization or project the assets belong to. Format:
-     * "organizations/[organization-number]" (such as "organizations/123"),
-     * "projects/[project-number]" (such as "projects/my-project-id"), or
-     * "projects/[project-id]" (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. Name of the organization or project the assets belong to. Format:
-     * "organizations/[organization-number]" (such as "organizations/123"),
-     * "projects/[project-number]" (such as "projects/my-project-id"), or
-     * "projects/[project-id]" (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. Name of the organization or project the assets belong to. Format:
-     * "organizations/[organization-number]" (such as "organizations/123"),
-     * "projects/[project-number]" (such as "projects/my-project-id"), or
-     * "projects/[project-id]" (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization or project the assets belong to. Format:
-     * "organizations/[organization-number]" (such as "organizations/123"),
-     * "projects/[project-number]" (such as "projects/my-project-id"), or
-     * "projects/[project-id]" (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. Name of the organization or project the assets belong to. Format:
-     * "organizations/[organization-number]" (such as "organizations/123"),
-     * "projects/[project-number]" (such as "projects/my-project-id"), or
-     * "projects/[project-id]" (such as "projects/12345").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-     * the current time will be used. Due to delays in resource data collection
-     * and indexing, there is a volatile window during which running the same
-     * query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of asset types of which to take a snapshot for. For  example:
-     * "compute.googleapis.com/Disk". If specified, only matching assets will be
-     * returned. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - - contentType_ = value; - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p5beta1.ContentType result = com.google.cloud.asset.v1p5beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p5beta1.ContentType.UNRECOGNIZED : result; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1p5beta1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will
-     * be returned.
-     * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - *
-     * The maximum number of assets to be returned in a single response. Default
-     * is 100, minimum is 1, and maximum is 1000.
-     * 
- * - * int32 page_size = 5; - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - *
-     * The maximum number of assets to be returned in a single response. Default
-     * is 100, minimum is 1, and maximum is 1000.
-     * 
- * - * int32 page_size = 5; - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - *
-     * The maximum number of assets to be returned in a single response. Default
-     * is 100, minimum is 1, and maximum is 1000.
-     * 
- * - * int32 page_size = 5; - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString - getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - *
-     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-     * prior `ListAssets` call, and the API should return the next page of assets.
-     * 
- * - * string page_token = 6; - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.ListAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.ListAssetsRequest) - private static final com.google.cloud.asset.v1p5beta1.ListAssetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.ListAssetsRequest(); - } - - public static com.google.cloud.asset.v1p5beta1.ListAssetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAssetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java deleted file mode 100644 index 38c78bebe193..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsRequestOrBuilder.java +++ /dev/null @@ -1,187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/asset_service.proto - -package com.google.cloud.asset.v1p5beta1; - -public interface ListAssetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.ListAssetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. Name of the organization or project the assets belong to. Format:
-   * "organizations/[organization-number]" (such as "organizations/123"),
-   * "projects/[project-number]" (such as "projects/my-project-id"), or
-   * "projects/[project-id]" (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. Name of the organization or project the assets belong to. Format:
-   * "organizations/[organization-number]" (such as "organizations/123"),
-   * "projects/[project-number]" (such as "projects/my-project-id"), or
-   * "projects/[project-id]" (such as "projects/12345").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between 2018-10-02 UTC (inclusive) and the current time. If not specified,
-   * the current time will be used. Due to delays in resource data collection
-   * and indexing, there is a volatile window during which running the same
-   * query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * A list of asset types of which to take a snapshot for. For  example:
-   * "compute.googleapis.com/Disk". If specified, only matching assets will be
-   * returned. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - *
-   * Asset content type. If not specified, no content but the asset name will
-   * be returned.
-   * 
- * - * .google.cloud.asset.v1p5beta1.ContentType content_type = 4; - * @return The contentType. - */ - com.google.cloud.asset.v1p5beta1.ContentType getContentType(); - - /** - *
-   * The maximum number of assets to be returned in a single response. Default
-   * is 100, minimum is 1, and maximum is 1000.
-   * 
- * - * int32 page_size = 5; - * @return The pageSize. - */ - int getPageSize(); - - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - *
-   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
-   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
-   * prior `ListAssets` call, and the API should return the next page of assets.
-   * 
- * - * string page_token = 6; - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java deleted file mode 100644 index 20fa08484095..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponse.java +++ /dev/null @@ -1,1281 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/asset_service.proto - -package com.google.cloud.asset.v1p5beta1; - -/** - *
- * ListAssets response.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsResponse} - */ -public final class ListAssetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.ListAssetsResponse) - ListAssetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListAssetsResponse.newBuilder() to construct. - private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListAssetsResponse() { - assets_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListAssetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListAssetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage(com.google.cloud.asset.v1p5beta1.Asset.parser(), extensionRegistry)); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.ListAssetsResponse.class, com.google.cloud.asset.v1p5beta1.ListAssetsResponse.Builder.class); - } - - public static final int READ_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int ASSETS_FIELD_NUMBER = 2; - private java.util.List assets_; - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - @java.lang.Override - public java.util.List getAssetsList() { - return assets_; - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - @java.lang.Override - public java.util.List - getAssetsOrBuilderList() { - return assets_; - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - @java.lang.Override - public int getAssetsCount() { - return assets_.size(); - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Asset getAssets(int index) { - return assets_.get(index); - } - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder( - int index) { - return assets_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - *
-   * Token to retrieve the next page of results. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - *
-   * Token to retrieve the next page of results. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (readTime_ != null) { - output.writeMessage(1, getReadTime()); - } - for (int i = 0; i < assets_.size(); i++) { - output.writeMessage(2, assets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getReadTime()); - } - for (int i = 0; i < assets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, assets_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p5beta1.ListAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p5beta1.ListAssetsResponse other = (com.google.cloud.asset.v1p5beta1.ListAssetsResponse) obj; - - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getAssetsList() - .equals(other.getAssetsList())) return false; - if (!getNextPageToken() - .equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (getAssetsCount() > 0) { - hash = (37 * hash) + ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getAssetsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.ListAssetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * ListAssets response.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.ListAssetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.ListAssetsResponse) - com.google.cloud.asset.v1p5beta1.ListAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.ListAssetsResponse.class, com.google.cloud.asset.v1p5beta1.ListAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p5beta1.ListAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAssetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - assetsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p5beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p5beta1_ListAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p5beta1.ListAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsResponse build() { - com.google.cloud.asset.v1p5beta1.ListAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsResponse buildPartial() { - com.google.cloud.asset.v1p5beta1.ListAssetsResponse result = new com.google.cloud.asset.v1p5beta1.ListAssetsResponse(this); - int from_bitField0_ = bitField0_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (assetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assets_ = assets_; - } else { - result.assets_ = assetsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p5beta1.ListAssetsResponse) { - return mergeFrom((com.google.cloud.asset.v1p5beta1.ListAssetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.ListAssetsResponse other) { - if (other == com.google.cloud.asset.v1p5beta1.ListAssetsResponse.getDefaultInstance()) return this; - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (assetsBuilder_ == null) { - if (!other.assets_.isEmpty()) { - if (assets_.isEmpty()) { - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetsIsMutable(); - assets_.addAll(other.assets_); - } - onChanged(); - } - } else { - if (!other.assets_.isEmpty()) { - if (assetsBuilder_.isEmpty()) { - assetsBuilder_.dispose(); - assetsBuilder_ = null; - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - assetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAssetsFieldBuilder() : null; - } else { - assetsBuilder_.addAllMessages(other.assets_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.ListAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p5beta1.ListAssetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private java.util.List assets_ = - java.util.Collections.emptyList(); - private void ensureAssetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(assets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p5beta1.Asset, com.google.cloud.asset.v1p5beta1.Asset.Builder, com.google.cloud.asset.v1p5beta1.AssetOrBuilder> assetsBuilder_; - - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public java.util.List getAssetsList() { - if (assetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(assets_); - } else { - return assetsBuilder_.getMessageList(); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public int getAssetsCount() { - if (assetsBuilder_ == null) { - return assets_.size(); - } else { - return assetsBuilder_.getCount(); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public com.google.cloud.asset.v1p5beta1.Asset getAssets(int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); - } else { - return assetsBuilder_.getMessage(index); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1p5beta1.Asset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.set(index, value); - onChanged(); - } else { - assetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.set(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder addAssets(com.google.cloud.asset.v1p5beta1.Asset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(value); - onChanged(); - } else { - assetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1p5beta1.Asset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(index, value); - onChanged(); - } else { - assetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder addAssets( - com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1p5beta1.Asset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder addAllAssets( - java.lang.Iterable values) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assets_); - onChanged(); - } else { - assetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder clearAssets() { - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - assetsBuilder_.clear(); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public Builder removeAssets(int index) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.remove(index); - onChanged(); - } else { - assetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public com.google.cloud.asset.v1p5beta1.Asset.Builder getAssetsBuilder( - int index) { - return getAssetsFieldBuilder().getBuilder(index); - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder( - int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); } else { - return assetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public java.util.List - getAssetsOrBuilderList() { - if (assetsBuilder_ != null) { - return assetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(assets_); - } - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public com.google.cloud.asset.v1p5beta1.Asset.Builder addAssetsBuilder() { - return getAssetsFieldBuilder().addBuilder( - com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance()); - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public com.google.cloud.asset.v1p5beta1.Asset.Builder addAssetsBuilder( - int index) { - return getAssetsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1p5beta1.Asset.getDefaultInstance()); - } - /** - *
-     * Assets.
-     * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - public java.util.List - getAssetsBuilderList() { - return getAssetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p5beta1.Asset, com.google.cloud.asset.v1p5beta1.Asset.Builder, com.google.cloud.asset.v1p5beta1.AssetOrBuilder> - getAssetsFieldBuilder() { - if (assetsBuilder_ == null) { - assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p5beta1.Asset, com.google.cloud.asset.v1p5beta1.Asset.Builder, com.google.cloud.asset.v1p5beta1.AssetOrBuilder>( - assets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - assets_ = null; - } - return assetsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - *
-     * Token to retrieve the next page of results. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Token to retrieve the next page of results. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString - getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Token to retrieve the next page of results. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - *
-     * Token to retrieve the next page of results. Set to empty if there are no
-     * remaining results.
-     * 
- * - * string next_page_token = 3; - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.ListAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.ListAssetsResponse) - private static final com.google.cloud.asset.v1p5beta1.ListAssetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.ListAssetsResponse(); - } - - public static com.google.cloud.asset.v1p5beta1.ListAssetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAssetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.ListAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java deleted file mode 100644 index 89435126e1f4..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ListAssetsResponseOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/asset_service.proto - -package com.google.cloud.asset.v1p5beta1; - -public interface ListAssetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.ListAssetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - java.util.List - getAssetsList(); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - com.google.cloud.asset.v1p5beta1.Asset getAssets(int index); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - int getAssetsCount(); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - java.util.List - getAssetsOrBuilderList(); - /** - *
-   * Assets.
-   * 
- * - * repeated .google.cloud.asset.v1p5beta1.Asset assets = 2; - */ - com.google.cloud.asset.v1p5beta1.AssetOrBuilder getAssetsOrBuilder( - int index); - - /** - *
-   * Token to retrieve the next page of results. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - *
-   * Token to retrieve the next page of results. Set to empty if there are no
-   * remaining results.
-   * 
- * - * string next_page_token = 3; - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java deleted file mode 100644 index 1a5a85b82cf2..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/Resource.java +++ /dev/null @@ -1,1633 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/assets.proto - -package com.google.cloud.asset.v1p5beta1; - -/** - *
- * Representation of a cloud resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.Resource} - */ -public final class Resource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p5beta1.Resource) - ResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Resource.newBuilder() to construct. - private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Resource() { - version_ = ""; - discoveryDocumentUri_ = ""; - discoveryName_ = ""; - resourceUrl_ = ""; - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Resource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Resource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.Resource.class, com.google.cloud.asset.v1p5beta1.Resource.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object discoveryDocumentUri_; - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - @java.lang.Override - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } - } - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object discoveryName_; - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - @java.lang.Override - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } - } - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceUrl_; - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - @java.lang.Override - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } - } - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 6; - private com.google.protobuf.Struct data_; - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - @java.lang.Override - public boolean hasData() { - return data_ != null; - } - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.Struct getData() { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - return getData(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); - } - if (data_ != null) { - output.writeMessage(6, getData()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); - } - if (data_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getData()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p5beta1.Resource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p5beta1.Resource other = (com.google.cloud.asset.v1p5beta1.Resource) obj; - - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getDiscoveryDocumentUri() - .equals(other.getDiscoveryDocumentUri())) return false; - if (!getDiscoveryName() - .equals(other.getDiscoveryName())) return false; - if (!getResourceUrl() - .equals(other.getResourceUrl())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (hasData() != other.hasData()) return false; - if (hasData()) { - if (!getData() - .equals(other.getData())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); - hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryName().hashCode(); - hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResourceUrl().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasData()) { - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p5beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p5beta1.Resource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Representation of a cloud resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p5beta1.Resource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p5beta1.Resource) - com.google.cloud.asset.v1p5beta1.ResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p5beta1.Resource.class, com.google.cloud.asset.v1p5beta1.Resource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p5beta1.Resource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - discoveryDocumentUri_ = ""; - - discoveryName_ = ""; - - resourceUrl_ = ""; - - parent_ = ""; - - if (dataBuilder_ == null) { - data_ = null; - } else { - data_ = null; - dataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p5beta1.AssetProto.internal_static_google_cloud_asset_v1p5beta1_Resource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Resource getDefaultInstanceForType() { - return com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Resource build() { - com.google.cloud.asset.v1p5beta1.Resource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Resource buildPartial() { - com.google.cloud.asset.v1p5beta1.Resource result = new com.google.cloud.asset.v1p5beta1.Resource(this); - result.version_ = version_; - result.discoveryDocumentUri_ = discoveryDocumentUri_; - result.discoveryName_ = discoveryName_; - result.resourceUrl_ = resourceUrl_; - result.parent_ = parent_; - if (dataBuilder_ == null) { - result.data_ = data_; - } else { - result.data_ = dataBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p5beta1.Resource) { - return mergeFrom((com.google.cloud.asset.v1p5beta1.Resource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p5beta1.Resource other) { - if (other == com.google.cloud.asset.v1p5beta1.Resource.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getDiscoveryDocumentUri().isEmpty()) { - discoveryDocumentUri_ = other.discoveryDocumentUri_; - onChanged(); - } - if (!other.getDiscoveryName().isEmpty()) { - discoveryName_ = other.discoveryName_; - onChanged(); - } - if (!other.getResourceUrl().isEmpty()) { - resourceUrl_ = other.resourceUrl_; - onChanged(); - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasData()) { - mergeData(other.getData()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p5beta1.Resource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p5beta1.Resource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * The API version. Example: "v1".
-     * 
- * - * string version = 1; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryDocumentUri_ = ""; - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return This builder for chaining. - */ - public Builder clearDiscoveryDocumentUri() { - - discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * For example:
-     * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-     * It will be left unspecified for resources without a discovery-based API,
-     * such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The bytes for discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryName_ = ""; - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @param value The discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryName_ = value; - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @return This builder for chaining. - */ - public Builder clearDiscoveryName() { - - discoveryName_ = getDefaultInstance().getDiscoveryName(); - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document.
-     * Example: "Project". It will be left unspecified for resources (such as
-     * Cloud Bigtable) without a discovery-based API.
-     * 
- * - * string discovery_name = 3; - * @param value The bytes for discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceUrl_ = ""; - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceUrl_ = value; - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return This builder for chaining. - */ - public Builder clearResourceUrl() { - - resourceUrl_ = getDefaultInstance().getResourceUrl(); - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP GET operation using this
-     * URL returns the resource itself.
-     * Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-     * It will be left unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The bytes for resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceUrl_ = value; - onChanged(); - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * For example:
-     * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-     * For third-party assets, it is up to the users to define.
-     * 
- * - * string parent = 5; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Struct data_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - public boolean hasData() { - return dataBuilder_ != null || data_ != null; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - public com.google.protobuf.Struct getData() { - if (dataBuilder_ == null) { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } else { - return dataBuilder_.getMessage(); - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - dataBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData( - com.google.protobuf.Struct.Builder builderForValue) { - if (dataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - dataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder mergeData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (data_ != null) { - data_ = - com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - dataBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder clearData() { - if (dataBuilder_ == null) { - data_ = null; - onChanged(); - } else { - data_ = null; - dataBuilder_ = null; - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.Struct.Builder getDataBuilder() { - - onChanged(); - return getDataFieldBuilder().getBuilder(); - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilder(); - } else { - return data_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : data_; - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are scrubbed
-     * away and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getData(), - getParentForChildren(), - isClean()); - data_ = null; - } - return dataBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p5beta1.Resource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p5beta1.Resource) - private static final com.google.cloud.asset.v1p5beta1.Resource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p5beta1.Resource(); - } - - public static com.google.cloud.asset.v1p5beta1.Resource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Resource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p5beta1.Resource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java deleted file mode 100644 index 175f61af1448..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/ResourceOrBuilder.java +++ /dev/null @@ -1,175 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p5beta1/assets.proto - -package com.google.cloud.asset.v1p5beta1; - -public interface ResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p5beta1.Resource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * The API version. Example: "v1".
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - java.lang.String getDiscoveryDocumentUri(); - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * For example:
-   * `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
-   * It will be left unspecified for resources without a discovery-based API,
-   * such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes(); - - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - java.lang.String getDiscoveryName(); - /** - *
-   * The JSON schema name listed in the discovery document.
-   * Example: "Project". It will be left unspecified for resources (such as
-   * Cloud Bigtable) without a discovery-based API.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - com.google.protobuf.ByteString - getDiscoveryNameBytes(); - - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - java.lang.String getResourceUrl(); - /** - *
-   * The REST URL for accessing the resource. An HTTP GET operation using this
-   * URL returns the resource itself.
-   * Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
-   * It will be left unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - com.google.protobuf.ByteString - getResourceUrlBytes(); - - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For GCP assets, it is the parent resource defined in the [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * For example:
-   * `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
-   * For third-party assets, it is up to the users to define.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - boolean hasData(); - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - com.google.protobuf.Struct getData(); - /** - *
-   * The content of the resource, in which some sensitive fields are scrubbed
-   * away and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - com.google.protobuf.StructOrBuilder getDataOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto deleted file mode 100644 index 52233ad05b3e..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/asset_service.proto +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1p5beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/cloud/asset/v1p5beta1/assets.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Asset.V1P5Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetServiceProto"; -option java_package = "com.google.cloud.asset.v1p5beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p5beta1"; - -// Asset service definition. -service AssetService { - option (google.api.default_host) = "cloudasset.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists assets with time and resource types and returns paged results in - // response. - rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { - option (google.api.http) = { - get: "/v1p5beta1/{parent=*/*}/assets" - }; - } -} - -// ListAssets request. -message ListAssetsRequest { - // Required. Name of the organization or project the assets belong to. Format: - // "organizations/[organization-number]" (such as "organizations/123"), - // "projects/[project-number]" (such as "projects/my-project-id"), or - // "projects/[project-id]" (such as "projects/12345"). - string parent = 1 [(google.api.field_behavior) = REQUIRED]; - - // Timestamp to take an asset snapshot. This can only be set to a timestamp - // between 2018-10-02 UTC (inclusive) and the current time. If not specified, - // the current time will be used. Due to delays in resource data collection - // and indexing, there is a volatile window during which running the same - // query may get different results. - google.protobuf.Timestamp read_time = 2; - - // A list of asset types of which to take a snapshot for. For example: - // "compute.googleapis.com/Disk". If specified, only matching assets will be - // returned. See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview) - // for all supported asset types. - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name will - // be returned. - ContentType content_type = 4; - - // The maximum number of assets to be returned in a single response. Default - // is 100, minimum is 1, and maximum is 1000. - int32 page_size = 5; - - // The `next_page_token` returned from the previous `ListAssetsResponse`, or - // unspecified for the first `ListAssetsRequest`. It is a continuation of a - // prior `ListAssets` call, and the API should return the next page of assets. - string page_token = 6; -} - -// Asset content type. -enum ContentType { - // Unspecified content type. - CONTENT_TYPE_UNSPECIFIED = 0; - - // Resource metadata. - RESOURCE = 1; - - // The actual IAM policy set on a resource. - IAM_POLICY = 2; - - // The Cloud Organization Policy set on an asset. - ORG_POLICY = 4; - - // The Cloud Access context mananger Policy set on an asset. - ACCESS_POLICY = 5; -} - -// ListAssets response. -message ListAssetsResponse { - // Time the snapshot was taken. - google.protobuf.Timestamp read_time = 1; - - // Assets. - repeated Asset assets = 2; - - // Token to retrieve the next page of results. Set to empty if there are no - // remaining results. - string next_page_token = 3; -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto b/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto deleted file mode 100644 index 7ad133a5484f..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/proto-google-cloud-asset-v1p5beta1/src/main/proto/google/cloud/asset/v1p5beta1/assets.proto +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1p5beta1; - -import "google/api/resource.proto"; -import "google/cloud/orgpolicy/v1/orgpolicy.proto"; -import "google/iam/v1/policy.proto"; -import "google/identity/accesscontextmanager/v1/access_level.proto"; -import "google/identity/accesscontextmanager/v1/access_policy.proto"; -import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Asset.V1p5Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p5beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetProto"; -option java_package = "com.google.cloud.asset.v1p5beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p5beta1"; - -// Cloud asset. This includes all Google Cloud Platform resources, -// Cloud IAM policies, and other non-GCP assets. -message Asset { - option (google.api.resource) = { - type: "cloudasset.googleapis.com/Asset" - pattern: "*" - }; - - // The full name of the asset. For example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. - // See [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string name = 1; - - // Type of the asset. Example: "compute.googleapis.com/Disk". - string asset_type = 2; - - // Representation of the resource. - Resource resource = 3; - - // Representation of the actual Cloud IAM policy set on a cloud resource. For - // each resource, there must be at most one Cloud IAM policy set on it. - google.iam.v1.Policy iam_policy = 4; - - // Representation of the Cloud Organization Policy set on an asset. For each - // asset, there could be multiple Organization policies with different - // constraints. - repeated google.cloud.orgpolicy.v1.Policy org_policy = 6; - - // Representation of the Cloud Organization access policy. - oneof access_context_policy { - google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - - google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - - google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = - 9; - } - - // Asset's ancestry path in Cloud Resource Manager (CRM) hierarchy, - // represented as a list of relative resource names. Ancestry path starts with - // the closest CRM ancestor and ends at root. If the asset is a CRM - // project/folder/organization, this starts from the asset itself. - // - // Example: ["projects/123456789", "folders/5432", "organizations/1234"] - repeated string ancestors = 10; -} - -// Representation of a cloud resource. -message Resource { - // The API version. Example: "v1". - string version = 1; - - // The URL of the discovery document containing the resource's JSON schema. - // For example: - // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`. - // It will be left unspecified for resources without a discovery-based API, - // such as Cloud Bigtable. - string discovery_document_uri = 2; - - // The JSON schema name listed in the discovery document. - // Example: "Project". It will be left unspecified for resources (such as - // Cloud Bigtable) without a discovery-based API. - string discovery_name = 3; - - // The REST URL for accessing the resource. An HTTP GET operation using this - // URL returns the resource itself. - // Example: - // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`. - // It will be left unspecified for resources without a REST API. - string resource_url = 4; - - // The full name of the immediate parent of this resource. See - // [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - // - // For GCP assets, it is the parent resource defined in the [Cloud IAM policy - // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). - // For example: - // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`. - // - // For third-party assets, it is up to the users to define. - string parent = 5; - - // The content of the resource, in which some sensitive fields are scrubbed - // away and may not be present. - google.protobuf.Struct data = 6; -} diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 3f3193cc9147..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.asset.v1p5beta1.AssetServiceClient; -import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; -import com.google.cloud.asset.v1p5beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 36e9aa64ecd1..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] -import com.google.cloud.asset.v1p5beta1.AssetServiceClient; -import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider( - AssetServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p5beta1_generated_assetserviceclient_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index ca906f26c7bc..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p5beta1_generated_assetserviceclient_create_setendpoint_sync] -import com.google.cloud.asset.v1p5beta1.AssetServiceClient; -import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; -import com.google.cloud.asset.v1p5beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings assetServiceSettings = - AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); - AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings); - } -} -// [END asset_v1p5beta1_generated_assetserviceclient_create_setendpoint_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java deleted file mode 100644 index 853894706b9d..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssets.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p5beta1_generated_assetserviceclient_listassets_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.asset.v1p5beta1.Asset; -import com.google.cloud.asset.v1p5beta1.AssetServiceClient; -import com.google.cloud.asset.v1p5beta1.ContentType; -import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class AsyncListAssets { - - public static void main(String[] args) throws Exception { - asyncListAssets(); - } - - public static void asyncListAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent("parent-995424086") - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request); - // Do something. - for (Asset element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p5beta1_generated_assetserviceclient_listassets_async] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java deleted file mode 100644 index 62a99e54402c..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/AsyncListAssetsPaged.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p5beta1_generated_assetserviceclient_listassets_paged_async] -import com.google.cloud.asset.v1p5beta1.Asset; -import com.google.cloud.asset.v1p5beta1.AssetServiceClient; -import com.google.cloud.asset.v1p5beta1.ContentType; -import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; -import com.google.cloud.asset.v1p5beta1.ListAssetsResponse; -import com.google.common.base.Strings; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class AsyncListAssetsPaged { - - public static void main(String[] args) throws Exception { - asyncListAssetsPaged(); - } - - public static void asyncListAssetsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent("parent-995424086") - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request); - for (Asset element : response.getAssetsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END asset_v1p5beta1_generated_assetserviceclient_listassets_paged_async] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java deleted file mode 100644 index 44e4bfeb1616..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetserviceclient/listassets/SyncListAssets.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p5beta1_generated_assetserviceclient_listassets_sync] -import com.google.cloud.asset.v1p5beta1.Asset; -import com.google.cloud.asset.v1p5beta1.AssetServiceClient; -import com.google.cloud.asset.v1p5beta1.ContentType; -import com.google.cloud.asset.v1p5beta1.ListAssetsRequest; -import com.google.protobuf.Timestamp; -import java.util.ArrayList; - -public class SyncListAssets { - - public static void main(String[] args) throws Exception { - syncListAssets(); - } - - public static void syncListAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) { - ListAssetsRequest request = - ListAssetsRequest.newBuilder() - .setParent("parent-995424086") - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Asset element : assetServiceClient.listAssets(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END asset_v1p5beta1_generated_assetserviceclient_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java deleted file mode 100644 index c5fb1d53bac0..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/assetservicesettings/listassets/SyncListAssets.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 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.samples; - -// [START asset_v1p5beta1_generated_assetservicesettings_listassets_sync] -import com.google.cloud.asset.v1p5beta1.AssetServiceSettings; -import java.time.Duration; - -public class SyncListAssets { - - public static void main(String[] args) throws Exception { - syncListAssets(); - } - - public static void syncListAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder(); - assetServiceSettingsBuilder - .listAssetsSettings() - .setRetrySettings( - assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1p5beta1_generated_assetservicesettings_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java b/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java deleted file mode 100644 index aa05377dbfb8..000000000000 --- a/owl-bot-staging/java-asset/v1p5beta1/samples/snippets/generated/com/google/cloud/asset/v1p5beta1/stub/assetservicestubsettings/listassets/SyncListAssets.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 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.stub.samples; - -// [START asset_v1p5beta1_generated_assetservicestubsettings_listassets_sync] -import com.google.cloud.asset.v1p5beta1.stub.AssetServiceStubSettings; -import java.time.Duration; - -public class SyncListAssets { - - public static void main(String[] args) throws Exception { - syncListAssets(); - } - - public static void syncListAssets() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - AssetServiceStubSettings.Builder assetServiceSettingsBuilder = - AssetServiceStubSettings.newBuilder(); - assetServiceSettingsBuilder - .listAssetsSettings() - .setRetrySettings( - assetServiceSettingsBuilder.listAssetsSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build(); - } -} -// [END asset_v1p5beta1_generated_assetservicestubsettings_listassets_sync] diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java deleted file mode 100644 index 5db3ef4a817a..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceClient.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p7beta1.stub.AssetServiceStub; -import com.google.cloud.asset.v1p7beta1.stub.AssetServiceStubSettings; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Asset service definition. - * - *

This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   ExportAssetsRequest request =
- *       ExportAssetsRequest.newBuilder()
- *           .setParent("ExportAssetsRequest-846449128".toString())
- *           .setReadTime(Timestamp.newBuilder().build())
- *           .addAllAssetTypes(new ArrayList())
- *           .setContentType(ContentType.forNumber(0))
- *           .setOutputConfig(OutputConfig.newBuilder().build())
- *           .addAllRelationshipTypes(new ArrayList())
- *           .build();
- *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
- * }
- * }
- * - *

Note: close() needs to be called on the AssetServiceClient object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls close(). - * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
- * - *

See the individual methods for example code. - * - *

Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *

This class can be customized by passing in a custom instance of AssetServiceSettings to - * create(). For example: - * - *

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings assetServiceSettings =
- *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AssetServiceClient assetServiceClient = AssetServiceClient.create(assetServiceSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceClient implements BackgroundResource { - private final AssetServiceSettings settings; - private final AssetServiceStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of AssetServiceClient with default settings. */ - public static final AssetServiceClient create() throws IOException { - return create(AssetServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { - return new AssetServiceClient(settings); - } - - /** - * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is - * for advanced usage - prefer using create(AssetServiceSettings). - */ - public static final AssetServiceClient create(AssetServiceStub stub) { - return new AssetServiceClient(stub); - } - - /** - * Constructs an instance of AssetServiceClient, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected AssetServiceClient(AssetServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - protected AssetServiceClient(AssetServiceStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - public final AssetServiceSettings getSettings() { - return settings; - } - - public AssetServiceStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in the - * JSON format; for BigQuery table destinations, the output table stores the fields in asset proto - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ExportAssetsRequest request =
-   *       ExportAssetsRequest.newBuilder()
-   *           .setParent("ExportAssetsRequest-846449128".toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture exportAssetsAsync( - ExportAssetsRequest request) { - return exportAssetsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in the - * JSON format; for BigQuery table destinations, the output table stores the fields in asset proto - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ExportAssetsRequest request =
-   *       ExportAssetsRequest.newBuilder()
-   *           .setParent("ExportAssetsRequest-846449128".toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   OperationFuture future =
-   *       assetServiceClient.exportAssetsOperationCallable().futureCall(request);
-   *   // Do something.
-   *   ExportAssetsResponse response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - exportAssetsOperationCallable() { - return stub.exportAssetsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in the - * JSON format; for BigQuery table destinations, the output table stores the fields in asset proto - * 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. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   ExportAssetsRequest request =
-   *       ExportAssetsRequest.newBuilder()
-   *           .setParent("ExportAssetsRequest-846449128".toString())
-   *           .setReadTime(Timestamp.newBuilder().build())
-   *           .addAllAssetTypes(new ArrayList())
-   *           .setContentType(ContentType.forNumber(0))
-   *           .setOutputConfig(OutputConfig.newBuilder().build())
-   *           .addAllRelationshipTypes(new ArrayList())
-   *           .build();
-   *   ApiFuture future = assetServiceClient.exportAssetsCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable exportAssetsCallable() { - return stub.exportAssetsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java deleted file mode 100644 index 4300c24794e3..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceSettings.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1p7beta1.stub.AssetServiceStubSettings; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceClient}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of exportAssets to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceSettings.Builder assetServiceSettingsBuilder = AssetServiceSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .exportAssetsSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.exportAssetsSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to exportAssets. */ - public UnaryCallSettings exportAssetsSettings() { - return ((AssetServiceStubSettings) getStubSettings()).exportAssetsSettings(); - } - - /** Returns the object with the settings used for calls to exportAssets. */ - public OperationCallSettings - exportAssetsOperationSettings() { - return ((AssetServiceStubSettings) getStubSettings()).exportAssetsOperationSettings(); - } - - public static final AssetServiceSettings create(AssetServiceStubSettings stub) - throws IOException { - return new AssetServiceSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return AssetServiceStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return AssetServiceStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return AssetServiceStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return AssetServiceStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for AssetServiceSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(AssetServiceStubSettings.newBuilder(clientContext)); - } - - protected Builder(AssetServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AssetServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(AssetServiceStubSettings.newBuilder()); - } - - public AssetServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AssetServiceStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - public UnaryCallSettings.Builder exportAssetsSettings() { - return getStubSettingsBuilder().exportAssetsSettings(); - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - public OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings() { - return getStubSettingsBuilder().exportAssetsOperationSettings(); - } - - @Override - public AssetServiceSettings build() throws IOException { - return new AssetServiceSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json deleted file mode 100644 index 70c675dd38c4..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/gapic_metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.asset.v1p7beta1", - "libraryPackage": "com.google.cloud.asset.v1p7beta1", - "services": { - "AssetService": { - "clients": { - "grpc": { - "libraryClient": "AssetServiceClient", - "rpcs": { - "ExportAssets": { - "methods": ["exportAssetsAsync", "exportAssetsOperationCallable", "exportAssetsCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java deleted file mode 100644 index 1789a8b3b626..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/package-info.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 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. - */ - -/** - * The interfaces provided are listed below, along with usage samples. - * - *

======================= AssetServiceClient ======================= - * - *

Service Description: Asset service definition. - * - *

Sample for AssetServiceClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   ExportAssetsRequest request =
- *       ExportAssetsRequest.newBuilder()
- *           .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString())
- *           .setReadTime(Timestamp.newBuilder().build())
- *           .addAllAssetTypes(new ArrayList())
- *           .setContentType(ContentType.forNumber(0))
- *           .setOutputConfig(OutputConfig.newBuilder().build())
- *           .addAllRelationshipTypes(new ArrayList())
- *           .build();
- *   ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.asset.v1p7beta1; - -import javax.annotation.Generated; diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java deleted file mode 100644 index fb9e6a139b75..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStub.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p7beta1.ExportAssetsRequest; -import com.google.cloud.asset.v1p7beta1.ExportAssetsResponse; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class AssetServiceStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public OperationCallable - exportAssetsOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportAssetsOperationCallable()"); - } - - public UnaryCallable exportAssetsCallable() { - throw new UnsupportedOperationException("Not implemented: exportAssetsCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java deleted file mode 100644 index fade292a0853..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/AssetServiceStubSettings.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.asset.v1p7beta1.ExportAssetsRequest; -import com.google.cloud.asset.v1p7beta1.ExportAssetsResponse; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link AssetServiceStub}. - * - *

The default instance has everything set to sensible defaults: - * - *

    - *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. - *
- * - *

The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. - * - *

For example, to set the total timeout of exportAssets to 30 seconds: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
- *     AssetServiceStubSettings.newBuilder();
- * assetServiceSettingsBuilder
- *     .exportAssetsSettings()
- *     .setRetrySettings(
- *         assetServiceSettingsBuilder.exportAssetsSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class AssetServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings exportAssetsSettings; - private final OperationCallSettings< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings; - - /** Returns the object with the settings used for calls to exportAssets. */ - public UnaryCallSettings exportAssetsSettings() { - return exportAssetsSettings; - } - - /** Returns the object with the settings used for calls to exportAssets. */ - public OperationCallSettings - exportAssetsOperationSettings() { - return exportAssetsOperationSettings; - } - - public AssetServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAssetServiceStub.create(this); - } - throw new UnsupportedOperationException( - String.format( - "Transport not supported: %s", getTransportChannelProvider().getTransportName())); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "cloudasset.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "cloudasset.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - exportAssetsSettings = settingsBuilder.exportAssetsSettings().build(); - exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build(); - } - - /** Builder for AssetServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder exportAssetsSettings; - private final OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_0_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(60000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - exportAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - exportAssetsOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(exportAssetsSettings); - initDefaults(this); - } - - protected Builder(AssetServiceStubSettings settings) { - super(settings); - - exportAssetsSettings = settings.exportAssetsSettings.toBuilder(); - exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(exportAssetsSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .exportAssetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .exportAssetsOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(ExportAssetsResponse.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(ExportAssetsRequest.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(5000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(45000L)) - .setInitialRpcTimeout(Duration.ZERO) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ZERO) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - public UnaryCallSettings.Builder exportAssetsSettings() { - return exportAssetsSettings; - } - - /** Returns the builder for the settings used for calls to exportAssets. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest> - exportAssetsOperationSettings() { - return exportAssetsOperationSettings; - } - - @Override - public AssetServiceStubSettings build() throws IOException { - return new AssetServiceStubSettings(this); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java deleted file mode 100644 index 8b080d4b27f6..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the AssetService service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, callSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, callSettings, clientContext); - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java deleted file mode 100644 index 38f973b48370..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p7beta1/stub/GrpcAssetServiceStub.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2022 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.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.asset.v1p7beta1.ExportAssetsRequest; -import com.google.cloud.asset.v1p7beta1.ExportAssetsResponse; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the AssetService service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcAssetServiceStub extends AssetServiceStub { - private static final MethodDescriptor - exportAssetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.asset.v1p7beta1.AssetService/ExportAssets") - .setRequestMarshaller(ProtoUtils.marshaller(ExportAssetsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable exportAssetsCallable; - private final OperationCallable - exportAssetsOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) - throws IOException { - return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { - return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAssetServiceStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAssetServiceStub( - AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAssetServiceCallableFactory()); - } - - /** - * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so - * that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected GrpcAssetServiceStub( - AssetServiceStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings exportAssetsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportAssetsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - - this.exportAssetsCallable = - callableFactory.createUnaryCallable( - exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext); - this.exportAssetsOperationCallable = - callableFactory.createOperationCallable( - exportAssetsTransportSettings, - settings.exportAssetsOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable exportAssetsCallable() { - return exportAssetsCallable; - } - - @Override - public OperationCallable - exportAssetsOperationCallable() { - return exportAssetsOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java deleted file mode 100644 index 2dcc7b654931..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/AssetServiceClientTest.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import com.google.protobuf.Timestamp; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import javax.annotation.Generated; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@Generated("by gapic-generator-java") -public class AssetServiceClientTest { - private static MockAssetService mockAssetService; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private AssetServiceClient client; - - @BeforeClass - public static void startStaticServer() { - mockAssetService = new MockAssetService(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - AssetServiceSettings settings = - AssetServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AssetServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void exportAssetsTest() throws Exception { - ExportAssetsResponse expectedResponse = - ExportAssetsResponse.newBuilder() - .setReadTime(Timestamp.newBuilder().build()) - .setOutputConfig(OutputConfig.newBuilder().build()) - .setOutputResult(OutputResult.newBuilder().build()) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportAssetsTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAssetService.addResponse(resultOperation); - - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent("ExportAssetsRequest-846449128".toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - - ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAssetService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportAssetsRequest actualRequest = ((ExportAssetsRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getReadTime(), actualRequest.getReadTime()); - Assert.assertEquals(request.getAssetTypesList(), actualRequest.getAssetTypesList()); - Assert.assertEquals(request.getContentType(), actualRequest.getContentType()); - Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); - Assert.assertEquals( - request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void exportAssetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockAssetService.addException(exception); - - try { - ExportAssetsRequest request = - ExportAssetsRequest.newBuilder() - .setParent("ExportAssetsRequest-846449128".toString()) - .setReadTime(Timestamp.newBuilder().build()) - .addAllAssetTypes(new ArrayList()) - .setContentType(ContentType.forNumber(0)) - .setOutputConfig(OutputConfig.newBuilder().build()) - .addAllRelationshipTypes(new ArrayList()) - .build(); - client.exportAssetsAsync(request).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java deleted file mode 100644 index 539cf06672ae..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetService.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetService implements MockGrpcService { - private final MockAssetServiceImpl serviceImpl; - - public MockAssetService() { - serviceImpl = new MockAssetServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java b/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java deleted file mode 100644 index db27f479dcee..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p7beta1/MockAssetServiceImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2022 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 com.google.api.core.BetaApi; -import com.google.cloud.asset.v1p7beta1.AssetServiceGrpc.AssetServiceImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockAssetServiceImpl extends AssetServiceImplBase { - private List requests; - private Queue responses; - - public MockAssetServiceImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void exportAssets( - ExportAssetsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext(((Operation) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ExportAssets, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} 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/owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java deleted file mode 100644 index c443a291ea1f..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/grpc-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceGrpc.java +++ /dev/null @@ -1,343 +0,0 @@ -package com.google.cloud.asset.v1p7beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Asset service definition.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/asset/v1p7beta1/asset_service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class AssetServiceGrpc { - - private AssetServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.asset.v1p7beta1.AssetService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor 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; - 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(); - } - } - } - return getExportAssetsMethod; - } - - /** - * 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 static abstract class AssetServiceImplBase implements io.grpc.BindableService { - - /** - *
-     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
-     * the JSON format; for BigQuery table destinations, the output table stores
-     * the fields in asset proto 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.v1p7beta1.ExportAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExportAssetsMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getExportAssetsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest, - com.google.longrunning.Operation>( - this, METHODID_EXPORT_ASSETS))) - .build(); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
-     * the JSON format; for BigQuery table destinations, the output table stores
-     * the fields in asset proto 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.v1p7beta1.ExportAssetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
-     * the JSON format; for BigQuery table destinations, the output table stores
-     * the fields in asset proto 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.v1p7beta1.ExportAssetsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getExportAssetsMethod(), getCallOptions(), request); - } - } - - /** - *
-   * 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); - } - - /** - *
-     * 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in
-     * the JSON format; for BigQuery table destinations, the output table stores
-     * the fields in asset proto 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 exportAssets( - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_EXPORT_ASSETS = 0; - - 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 AssetServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AssetServiceImplBase 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_EXPORT_ASSETS: - serviceImpl.exportAssets((com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) 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(); - } - } - } - - private static abstract 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.v1p7beta1.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 String methodName; - - AssetServiceMethodDescriptorSupplier(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(getExportAssetsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java deleted file mode 100644 index 92d3a5406025..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Asset.java +++ /dev/null @@ -1,3616 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * An asset in Google Cloud. An asset can be any resource in the Google Cloud
- * [resource
- * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
- * a resource outside the Google Cloud resource hierarchy (such as Google
- * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
- * See [Supported asset
- * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
- * for more information.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.Asset} - */ -public final class Asset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.Asset) - AssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use Asset.newBuilder() to construct. - private Asset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Asset() { - name_ = ""; - assetType_ = ""; - orgPolicy_ = java.util.Collections.emptyList(); - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Asset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Asset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - com.google.cloud.asset.v1p7beta1.Resource.Builder subBuilder = null; - if (resource_ != null) { - subBuilder = resource_.toBuilder(); - } - resource_ = input.readMessage(com.google.cloud.asset.v1p7beta1.Resource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (iamPolicy_ != null) { - subBuilder = iamPolicy_.toBuilder(); - } - iamPolicy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iamPolicy_); - iamPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - orgPolicy_.add( - input.readMessage(com.google.cloud.orgpolicy.v1.Policy.parser(), extensionRegistry)); - break; - } - case 58: { - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder subBuilder = null; - if (accessContextPolicyCase_ == 7) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.AccessPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 7; - break; - } - case 66: { - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder subBuilder = null; - if (accessContextPolicyCase_ == 8) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.AccessLevel.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 8; - break; - } - case 74: { - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder subBuilder = null; - if (accessContextPolicyCase_ == 9) { - subBuilder = ((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_).toBuilder(); - } - accessContextPolicy_ = - input.readMessage(com.google.identity.accesscontextmanager.v1.ServicePerimeter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - accessContextPolicy_ = subBuilder.buildPartial(); - } - accessContextPolicyCase_ = 9; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ancestors_.add(s); - break; - } - case 90: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder subBuilder = null; - if (relatedAssets_ != null) { - subBuilder = relatedAssets_.toBuilder(); - } - relatedAssets_ = input.readMessage(com.google.cloud.asset.v1p7beta1.RelatedAssets.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relatedAssets_); - relatedAssets_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.Asset.class, com.google.cloud.asset.v1p7beta1.Asset.Builder.class); - } - - private int accessContextPolicyCase_ = 0; - private java.lang.Object accessContextPolicy_; - public enum AccessContextPolicyCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ACCESS_POLICY(7), - ACCESS_LEVEL(8), - SERVICE_PERIMETER(9), - ACCESSCONTEXTPOLICY_NOT_SET(0); - private final int value; - private AccessContextPolicyCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AccessContextPolicyCase valueOf(int value) { - return forNumber(value); - } - - public static AccessContextPolicyCase forNumber(int value) { - switch (value) { - case 7: return ACCESS_POLICY; - case 8: return ACCESS_LEVEL; - case 9: return SERVICE_PERIMETER; - case 0: return ACCESSCONTEXTPOLICY_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public AccessContextPolicyCase - getAccessContextPolicyCase() { - return AccessContextPolicyCase.forNumber( - accessContextPolicyCase_); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 11; - private com.google.protobuf.Timestamp updateTime_; - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1p7beta1.Resource resource_; - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - @java.lang.Override - public boolean hasResource() { - return resource_ != null; - } - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - * @return The resource. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Resource getResource() { - return resource_ == null ? com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance() : resource_; - } - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ResourceOrBuilder getResourceOrBuilder() { - return getResource(); - } - - public static final int IAM_POLICY_FIELD_NUMBER = 4; - private com.google.iam.v1.Policy iamPolicy_; - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-   * more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - @java.lang.Override - public boolean hasIamPolicy() { - return iamPolicy_ != null; - } - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-   * more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - @java.lang.Override - public com.google.iam.v1.Policy getIamPolicy() { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-   * more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - @java.lang.Override - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - return getIamPolicy(); - } - - public static final int ORG_POLICY_FIELD_NUMBER = 6; - private java.util.List orgPolicy_; - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public java.util.List getOrgPolicyList() { - return orgPolicy_; - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public java.util.List - getOrgPolicyOrBuilderList() { - return orgPolicy_; - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public int getOrgPolicyCount() { - return orgPolicy_.size(); - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { - return orgPolicy_.get(index); - } - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - @java.lang.Override - public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index) { - return orgPolicy_.get(index); - } - - public static final int ACCESS_POLICY_FIELD_NUMBER = 7; - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - @java.lang.Override - public boolean hasAccessPolicy() { - return accessContextPolicyCase_ == 7; - } - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - - public static final int ACCESS_LEVEL_FIELD_NUMBER = 8; - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - @java.lang.Override - public boolean hasAccessLevel() { - return accessContextPolicyCase_ == 8; - } - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - - public static final int SERVICE_PERIMETER_FIELD_NUMBER = 9; - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - @java.lang.Override - public boolean hasServicePerimeter() { - return accessContextPolicyCase_ == 9; - } - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - - public static final int RELATED_ASSETS_FIELD_NUMBER = 13; - private com.google.cloud.asset.v1p7beta1.RelatedAssets relatedAssets_; - /** - *
-   * The related assets of the asset of one relationship type.
-   * One asset only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - * @return Whether the relatedAssets field is set. - */ - @java.lang.Override - public boolean hasRelatedAssets() { - return relatedAssets_ != null; - } - /** - *
-   * The related assets of the asset of one relationship type.
-   * One asset only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - * @return The relatedAssets. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAssets getRelatedAssets() { - return relatedAssets_ == null ? com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance() : relatedAssets_; - } - /** - *
-   * The related assets of the asset of one relationship type.
-   * One asset only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { - return getRelatedAssets(); - } - - public static final int ANCESTORS_FIELD_NUMBER = 10; - private com.google.protobuf.LazyStringList ancestors_; - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_; - } - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - if (resource_ != null) { - output.writeMessage(3, getResource()); - } - if (iamPolicy_ != null) { - output.writeMessage(4, getIamPolicy()); - } - for (int i = 0; i < orgPolicy_.size(); i++) { - output.writeMessage(6, orgPolicy_.get(i)); - } - if (accessContextPolicyCase_ == 7) { - output.writeMessage(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 8) { - output.writeMessage(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 9) { - output.writeMessage(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - } - for (int i = 0; i < ancestors_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, ancestors_.getRaw(i)); - } - if (updateTime_ != null) { - output.writeMessage(11, getUpdateTime()); - } - if (relatedAssets_ != null) { - output.writeMessage(13, getRelatedAssets()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - if (resource_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getResource()); - } - if (iamPolicy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getIamPolicy()); - } - for (int i = 0; i < orgPolicy_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, orgPolicy_.get(i)); - } - if (accessContextPolicyCase_ == 7) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_); - } - if (accessContextPolicyCase_ == 9) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_); - } - { - int dataSize = 0; - for (int i = 0; i < ancestors_.size(); i++) { - dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); - } - size += dataSize; - size += 1 * getAncestorsList().size(); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, getUpdateTime()); - } - if (relatedAssets_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getRelatedAssets()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.Asset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.Asset other = (com.google.cloud.asset.v1p7beta1.Asset) obj; - - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime() - .equals(other.getUpdateTime())) return false; - } - if (!getName() - .equals(other.getName())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (hasResource() != other.hasResource()) return false; - if (hasResource()) { - if (!getResource() - .equals(other.getResource())) return false; - } - if (hasIamPolicy() != other.hasIamPolicy()) return false; - if (hasIamPolicy()) { - if (!getIamPolicy() - .equals(other.getIamPolicy())) return false; - } - if (!getOrgPolicyList() - .equals(other.getOrgPolicyList())) return false; - if (hasRelatedAssets() != other.hasRelatedAssets()) return false; - if (hasRelatedAssets()) { - if (!getRelatedAssets() - .equals(other.getRelatedAssets())) return false; - } - if (!getAncestorsList() - .equals(other.getAncestorsList())) return false; - if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false; - switch (accessContextPolicyCase_) { - case 7: - if (!getAccessPolicy() - .equals(other.getAccessPolicy())) return false; - break; - case 8: - if (!getAccessLevel() - .equals(other.getAccessLevel())) return false; - break; - case 9: - if (!getServicePerimeter() - .equals(other.getServicePerimeter())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (hasResource()) { - hash = (37 * hash) + RESOURCE_FIELD_NUMBER; - hash = (53 * hash) + getResource().hashCode(); - } - if (hasIamPolicy()) { - hash = (37 * hash) + IAM_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getIamPolicy().hashCode(); - } - if (getOrgPolicyCount() > 0) { - hash = (37 * hash) + ORG_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getOrgPolicyList().hashCode(); - } - if (hasRelatedAssets()) { - hash = (37 * hash) + RELATED_ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getRelatedAssets().hashCode(); - } - if (getAncestorsCount() > 0) { - hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAncestorsList().hashCode(); - } - switch (accessContextPolicyCase_) { - case 7: - hash = (37 * hash) + ACCESS_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getAccessPolicy().hashCode(); - break; - case 8: - hash = (37 * hash) + ACCESS_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + getAccessLevel().hashCode(); - break; - case 9: - hash = (37 * hash) + SERVICE_PERIMETER_FIELD_NUMBER; - hash = (53 * hash) + getServicePerimeter().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.Asset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.Asset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An asset in Google Cloud. An asset can be any resource in the Google Cloud
-   * [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * a resource outside the Google Cloud resource hierarchy (such as Google
-   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.Asset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.Asset) - com.google.cloud.asset.v1p7beta1.AssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.Asset.class, com.google.cloud.asset.v1p7beta1.Asset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.Asset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getOrgPolicyFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - name_ = ""; - - assetType_ = ""; - - if (resourceBuilder_ == null) { - resource_ = null; - } else { - resource_ = null; - resourceBuilder_ = null; - } - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - if (orgPolicyBuilder_ == null) { - orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - orgPolicyBuilder_.clear(); - } - if (relatedAssetsBuilder_ == null) { - relatedAssets_ = null; - } else { - relatedAssets_ = null; - relatedAssetsBuilder_ = null; - } - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Asset getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.Asset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Asset build() { - com.google.cloud.asset.v1p7beta1.Asset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Asset buildPartial() { - com.google.cloud.asset.v1p7beta1.Asset result = new com.google.cloud.asset.v1p7beta1.Asset(this); - int from_bitField0_ = bitField0_; - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.name_ = name_; - result.assetType_ = assetType_; - if (resourceBuilder_ == null) { - result.resource_ = resource_; - } else { - result.resource_ = resourceBuilder_.build(); - } - if (iamPolicyBuilder_ == null) { - result.iamPolicy_ = iamPolicy_; - } else { - result.iamPolicy_ = iamPolicyBuilder_.build(); - } - if (orgPolicyBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = java.util.Collections.unmodifiableList(orgPolicy_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.orgPolicy_ = orgPolicy_; - } else { - result.orgPolicy_ = orgPolicyBuilder_.build(); - } - if (accessContextPolicyCase_ == 7) { - if (accessPolicyBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = accessPolicyBuilder_.build(); - } - } - if (accessContextPolicyCase_ == 8) { - if (accessLevelBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = accessLevelBuilder_.build(); - } - } - if (accessContextPolicyCase_ == 9) { - if (servicePerimeterBuilder_ == null) { - result.accessContextPolicy_ = accessContextPolicy_; - } else { - result.accessContextPolicy_ = servicePerimeterBuilder_.build(); - } - } - if (relatedAssetsBuilder_ == null) { - result.relatedAssets_ = relatedAssets_; - } else { - result.relatedAssets_ = relatedAssetsBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.ancestors_ = ancestors_; - result.accessContextPolicyCase_ = accessContextPolicyCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.Asset) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.Asset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.Asset other) { - if (other == com.google.cloud.asset.v1p7beta1.Asset.getDefaultInstance()) return this; - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (other.hasResource()) { - mergeResource(other.getResource()); - } - if (other.hasIamPolicy()) { - mergeIamPolicy(other.getIamPolicy()); - } - if (orgPolicyBuilder_ == null) { - if (!other.orgPolicy_.isEmpty()) { - if (orgPolicy_.isEmpty()) { - orgPolicy_ = other.orgPolicy_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOrgPolicyIsMutable(); - orgPolicy_.addAll(other.orgPolicy_); - } - onChanged(); - } - } else { - if (!other.orgPolicy_.isEmpty()) { - if (orgPolicyBuilder_.isEmpty()) { - orgPolicyBuilder_.dispose(); - orgPolicyBuilder_ = null; - orgPolicy_ = other.orgPolicy_; - bitField0_ = (bitField0_ & ~0x00000001); - orgPolicyBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getOrgPolicyFieldBuilder() : null; - } else { - orgPolicyBuilder_.addAllMessages(other.orgPolicy_); - } - } - } - if (other.hasRelatedAssets()) { - mergeRelatedAssets(other.getRelatedAssets()); - } - if (!other.ancestors_.isEmpty()) { - if (ancestors_.isEmpty()) { - ancestors_ = other.ancestors_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAncestorsIsMutable(); - ancestors_.addAll(other.ancestors_); - } - onChanged(); - } - switch (other.getAccessContextPolicyCase()) { - case ACCESS_POLICY: { - mergeAccessPolicy(other.getAccessPolicy()); - break; - } - case ACCESS_LEVEL: { - mergeAccessLevel(other.getAccessLevel()); - break; - } - case SERVICE_PERIMETER: { - mergeServicePerimeter(other.getServicePerimeter()); - break; - } - case ACCESSCONTEXTPOLICY_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.Asset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.Asset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int accessContextPolicyCase_ = 0; - private java.lang.Object accessContextPolicy_; - public AccessContextPolicyCase - getAccessContextPolicyCase() { - return AccessContextPolicyCase.forNumber( - accessContextPolicyCase_); - } - - public Builder clearAccessContextPolicy() { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder setUpdateTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - } - /** - *
-     * The last update timestamp of an asset. update_time is updated when
-     * create/update/delete operation is performed.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), - getParentForChildren(), - isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object name_ = ""; - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string name = 1; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p7beta1.Resource resource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.Resource, com.google.cloud.asset.v1p7beta1.Resource.Builder, com.google.cloud.asset.v1p7beta1.ResourceOrBuilder> resourceBuilder_; - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - public boolean hasResource() { - return resourceBuilder_ != null || resource_ != null; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - * @return The resource. - */ - public com.google.cloud.asset.v1p7beta1.Resource getResource() { - if (resourceBuilder_ == null) { - return resource_ == null ? com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance() : resource_; - } else { - return resourceBuilder_.getMessage(); - } - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - public Builder setResource(com.google.cloud.asset.v1p7beta1.Resource value) { - if (resourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - resource_ = value; - onChanged(); - } else { - resourceBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - public Builder setResource( - com.google.cloud.asset.v1p7beta1.Resource.Builder builderForValue) { - if (resourceBuilder_ == null) { - resource_ = builderForValue.build(); - onChanged(); - } else { - resourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - public Builder mergeResource(com.google.cloud.asset.v1p7beta1.Resource value) { - if (resourceBuilder_ == null) { - if (resource_ != null) { - resource_ = - com.google.cloud.asset.v1p7beta1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); - } else { - resource_ = value; - } - onChanged(); - } else { - resourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - public Builder clearResource() { - if (resourceBuilder_ == null) { - resource_ = null; - onChanged(); - } else { - resource_ = null; - resourceBuilder_ = null; - } - - return this; - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1p7beta1.Resource.Builder getResourceBuilder() { - - onChanged(); - return getResourceFieldBuilder().getBuilder(); - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - public com.google.cloud.asset.v1p7beta1.ResourceOrBuilder getResourceOrBuilder() { - if (resourceBuilder_ != null) { - return resourceBuilder_.getMessageOrBuilder(); - } else { - return resource_ == null ? - com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance() : resource_; - } - } - /** - *
-     * A representation of the resource.
-     * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.Resource, com.google.cloud.asset.v1p7beta1.Resource.Builder, com.google.cloud.asset.v1p7beta1.ResourceOrBuilder> - getResourceFieldBuilder() { - if (resourceBuilder_ == null) { - resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.Resource, com.google.cloud.asset.v1p7beta1.Resource.Builder, com.google.cloud.asset.v1p7beta1.ResourceOrBuilder>( - getResource(), - getParentForChildren(), - isClean()); - resource_ = null; - } - return resourceBuilder_; - } - - private com.google.iam.v1.Policy iamPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> iamPolicyBuilder_; - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - public boolean hasIamPolicy() { - return iamPolicyBuilder_ != null || iamPolicy_ != null; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - public com.google.iam.v1.Policy getIamPolicy() { - if (iamPolicyBuilder_ == null) { - return iamPolicy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } else { - return iamPolicyBuilder_.getMessage(); - } - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - iamPolicy_ = value; - onChanged(); - } else { - iamPolicyBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder setIamPolicy( - com.google.iam.v1.Policy.Builder builderForValue) { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = builderForValue.build(); - onChanged(); - } else { - iamPolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder mergeIamPolicy(com.google.iam.v1.Policy value) { - if (iamPolicyBuilder_ == null) { - if (iamPolicy_ != null) { - iamPolicy_ = - com.google.iam.v1.Policy.newBuilder(iamPolicy_).mergeFrom(value).buildPartial(); - } else { - iamPolicy_ = value; - } - onChanged(); - } else { - iamPolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public Builder clearIamPolicy() { - if (iamPolicyBuilder_ == null) { - iamPolicy_ = null; - onChanged(); - } else { - iamPolicy_ = null; - iamPolicyBuilder_ = null; - } - - return this; - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.Policy.Builder getIamPolicyBuilder() { - - onChanged(); - return getIamPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - public com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder() { - if (iamPolicyBuilder_ != null) { - return iamPolicyBuilder_.getMessageOrBuilder(); - } else { - return iamPolicy_ == null ? - com.google.iam.v1.Policy.getDefaultInstance() : iamPolicy_; - } - } - /** - *
-     * A representation of the Cloud IAM policy set on a Google Cloud resource.
-     * There can be a maximum of one Cloud IAM policy set on any given resource.
-     * In addition, Cloud IAM policies inherit their granted access scope from any
-     * policies set on parent resources in the resource hierarchy. Therefore, the
-     * effectively policy is the union of both the policy set on this resource
-     * and each policy set on all of the resource's ancestry resource levels in
-     * the hierarchy. See
-     * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-     * more information.
-     * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder> - getIamPolicyFieldBuilder() { - if (iamPolicyBuilder_ == null) { - iamPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.iam.v1.Policy, com.google.iam.v1.Policy.Builder, com.google.iam.v1.PolicyOrBuilder>( - getIamPolicy(), - getParentForChildren(), - isClean()); - iamPolicy_ = null; - } - return iamPolicyBuilder_; - } - - private java.util.List orgPolicy_ = - java.util.Collections.emptyList(); - private void ensureOrgPolicyIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - orgPolicy_ = new java.util.ArrayList(orgPolicy_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> orgPolicyBuilder_; - - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List getOrgPolicyList() { - if (orgPolicyBuilder_ == null) { - return java.util.Collections.unmodifiableList(orgPolicy_); - } else { - return orgPolicyBuilder_.getMessageList(); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public int getOrgPolicyCount() { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.size(); - } else { - return orgPolicyBuilder_.getCount(); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index) { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.get(index); - } else { - return orgPolicyBuilder_.getMessage(index); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder setOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.set(index, value); - onChanged(); - } else { - orgPolicyBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder setOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.set(index, builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy(com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.add(value); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy value) { - if (orgPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOrgPolicyIsMutable(); - orgPolicy_.add(index, value); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.add(builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addOrgPolicy( - int index, com.google.cloud.orgpolicy.v1.Policy.Builder builderForValue) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.add(index, builderForValue.build()); - onChanged(); - } else { - orgPolicyBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder addAllOrgPolicy( - java.lang.Iterable values) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, orgPolicy_); - onChanged(); - } else { - orgPolicyBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder clearOrgPolicy() { - if (orgPolicyBuilder_ == null) { - orgPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - orgPolicyBuilder_.clear(); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public Builder removeOrgPolicy(int index) { - if (orgPolicyBuilder_ == null) { - ensureOrgPolicyIsMutable(); - orgPolicy_.remove(index); - onChanged(); - } else { - orgPolicyBuilder_.remove(index); - } - return this; - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder getOrgPolicyBuilder( - int index) { - return getOrgPolicyFieldBuilder().getBuilder(index); - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index) { - if (orgPolicyBuilder_ == null) { - return orgPolicy_.get(index); } else { - return orgPolicyBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List - getOrgPolicyOrBuilderList() { - if (orgPolicyBuilder_ != null) { - return orgPolicyBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(orgPolicy_); - } - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder() { - return getOrgPolicyFieldBuilder().addBuilder( - com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public com.google.cloud.orgpolicy.v1.Policy.Builder addOrgPolicyBuilder( - int index) { - return getOrgPolicyFieldBuilder().addBuilder( - index, com.google.cloud.orgpolicy.v1.Policy.getDefaultInstance()); - } - /** - *
-     * A representation of an [organization
-     * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-     * There can be more than one organization policy with different constraints
-     * set on a given resource.
-     * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - public java.util.List - getOrgPolicyBuilderList() { - return getOrgPolicyFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder> - getOrgPolicyFieldBuilder() { - if (orgPolicyBuilder_ == null) { - orgPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.orgpolicy.v1.Policy, com.google.cloud.orgpolicy.v1.Policy.Builder, com.google.cloud.orgpolicy.v1.PolicyOrBuilder>( - orgPolicy_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - orgPolicy_ = null; - } - return orgPolicyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> accessPolicyBuilder_; - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - @java.lang.Override - public boolean hasAccessPolicy() { - return accessContextPolicyCase_ == 7; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy() { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 7) { - return accessPolicyBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder setAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { - if (accessPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - accessPolicyBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 7; - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder setAccessPolicy( - com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder builderForValue) { - if (accessPolicyBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - accessPolicyBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 7; - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder mergeAccessPolicy(com.google.identity.accesscontextmanager.v1.AccessPolicy value) { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.newBuilder((com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 7) { - accessPolicyBuilder_.mergeFrom(value); - } else { - accessPolicyBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 7; - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public Builder clearAccessPolicy() { - if (accessPolicyBuilder_ == null) { - if (accessContextPolicyCase_ == 7) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 7) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - accessPolicyBuilder_.clear(); - } - return this; - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - public com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder getAccessPolicyBuilder() { - return getAccessPolicyFieldBuilder().getBuilder(); - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder() { - if ((accessContextPolicyCase_ == 7) && (accessPolicyBuilder_ != null)) { - return accessPolicyBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 7) { - return (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access policy user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder> - getAccessPolicyFieldBuilder() { - if (accessPolicyBuilder_ == null) { - if (!(accessContextPolicyCase_ == 7)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessPolicy.getDefaultInstance(); - } - accessPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessPolicy, com.google.identity.accesscontextmanager.v1.AccessPolicy.Builder, com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder>( - (com.google.identity.accesscontextmanager.v1.AccessPolicy) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 7; - onChanged();; - return accessPolicyBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> accessLevelBuilder_; - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - @java.lang.Override - public boolean hasAccessLevel() { - return accessContextPolicyCase_ == 8; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel() { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 8) { - return accessLevelBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder setAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { - if (accessLevelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - accessLevelBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 8; - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder setAccessLevel( - com.google.identity.accesscontextmanager.v1.AccessLevel.Builder builderForValue) { - if (accessLevelBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - accessLevelBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 8; - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder mergeAccessLevel(com.google.identity.accesscontextmanager.v1.AccessLevel value) { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.newBuilder((com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 8) { - accessLevelBuilder_.mergeFrom(value); - } else { - accessLevelBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 8; - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public Builder clearAccessLevel() { - if (accessLevelBuilder_ == null) { - if (accessContextPolicyCase_ == 8) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 8) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - accessLevelBuilder_.clear(); - } - return this; - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - public com.google.identity.accesscontextmanager.v1.AccessLevel.Builder getAccessLevelBuilder() { - return getAccessLevelFieldBuilder().getBuilder(); - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder() { - if ((accessContextPolicyCase_ == 8) && (accessLevelBuilder_ != null)) { - return accessLevelBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 8) { - return (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [access level user
-     * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-     * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder> - getAccessLevelFieldBuilder() { - if (accessLevelBuilder_ == null) { - if (!(accessContextPolicyCase_ == 8)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.AccessLevel.getDefaultInstance(); - } - accessLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.AccessLevel, com.google.identity.accesscontextmanager.v1.AccessLevel.Builder, com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder>( - (com.google.identity.accesscontextmanager.v1.AccessLevel) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 8; - onChanged();; - return accessLevelBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> servicePerimeterBuilder_; - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - @java.lang.Override - public boolean hasServicePerimeter() { - return accessContextPolicyCase_ == 9; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter() { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } else { - if (accessContextPolicyCase_ == 9) { - return servicePerimeterBuilder_.getMessage(); - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder setServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { - if (servicePerimeterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accessContextPolicy_ = value; - onChanged(); - } else { - servicePerimeterBuilder_.setMessage(value); - } - accessContextPolicyCase_ = 9; - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder setServicePerimeter( - com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder builderForValue) { - if (servicePerimeterBuilder_ == null) { - accessContextPolicy_ = builderForValue.build(); - onChanged(); - } else { - servicePerimeterBuilder_.setMessage(builderForValue.build()); - } - accessContextPolicyCase_ = 9; - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder mergeServicePerimeter(com.google.identity.accesscontextmanager.v1.ServicePerimeter value) { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9 && - accessContextPolicy_ != com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance()) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.newBuilder((com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_) - .mergeFrom(value).buildPartial(); - } else { - accessContextPolicy_ = value; - } - onChanged(); - } else { - if (accessContextPolicyCase_ == 9) { - servicePerimeterBuilder_.mergeFrom(value); - } else { - servicePerimeterBuilder_.setMessage(value); - } - } - accessContextPolicyCase_ = 9; - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public Builder clearServicePerimeter() { - if (servicePerimeterBuilder_ == null) { - if (accessContextPolicyCase_ == 9) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - onChanged(); - } - } else { - if (accessContextPolicyCase_ == 9) { - accessContextPolicyCase_ = 0; - accessContextPolicy_ = null; - } - servicePerimeterBuilder_.clear(); - } - return this; - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - public com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder getServicePerimeterBuilder() { - return getServicePerimeterFieldBuilder().getBuilder(); - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - @java.lang.Override - public com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder() { - if ((accessContextPolicyCase_ == 9) && (servicePerimeterBuilder_ != null)) { - return servicePerimeterBuilder_.getMessageOrBuilder(); - } else { - if (accessContextPolicyCase_ == 9) { - return (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_; - } - return com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - } - /** - *
-     * Please also refer to the [service perimeter user
-     * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-     * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder> - getServicePerimeterFieldBuilder() { - if (servicePerimeterBuilder_ == null) { - if (!(accessContextPolicyCase_ == 9)) { - accessContextPolicy_ = com.google.identity.accesscontextmanager.v1.ServicePerimeter.getDefaultInstance(); - } - servicePerimeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.identity.accesscontextmanager.v1.ServicePerimeter, com.google.identity.accesscontextmanager.v1.ServicePerimeter.Builder, com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder>( - (com.google.identity.accesscontextmanager.v1.ServicePerimeter) accessContextPolicy_, - getParentForChildren(), - isClean()); - accessContextPolicy_ = null; - } - accessContextPolicyCase_ = 9; - onChanged();; - return servicePerimeterBuilder_; - } - - private com.google.cloud.asset.v1p7beta1.RelatedAssets relatedAssets_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelatedAssets, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder> relatedAssetsBuilder_; - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - * @return Whether the relatedAssets field is set. - */ - public boolean hasRelatedAssets() { - return relatedAssetsBuilder_ != null || relatedAssets_ != null; - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - * @return The relatedAssets. - */ - public com.google.cloud.asset.v1p7beta1.RelatedAssets getRelatedAssets() { - if (relatedAssetsBuilder_ == null) { - return relatedAssets_ == null ? com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance() : relatedAssets_; - } else { - return relatedAssetsBuilder_.getMessage(); - } - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - public Builder setRelatedAssets(com.google.cloud.asset.v1p7beta1.RelatedAssets value) { - if (relatedAssetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - relatedAssets_ = value; - onChanged(); - } else { - relatedAssetsBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - public Builder setRelatedAssets( - com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder builderForValue) { - if (relatedAssetsBuilder_ == null) { - relatedAssets_ = builderForValue.build(); - onChanged(); - } else { - relatedAssetsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - public Builder mergeRelatedAssets(com.google.cloud.asset.v1p7beta1.RelatedAssets value) { - if (relatedAssetsBuilder_ == null) { - if (relatedAssets_ != null) { - relatedAssets_ = - com.google.cloud.asset.v1p7beta1.RelatedAssets.newBuilder(relatedAssets_).mergeFrom(value).buildPartial(); - } else { - relatedAssets_ = value; - } - onChanged(); - } else { - relatedAssetsBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - public Builder clearRelatedAssets() { - if (relatedAssetsBuilder_ == null) { - relatedAssets_ = null; - onChanged(); - } else { - relatedAssets_ = null; - relatedAssetsBuilder_ = null; - } - - return this; - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - public com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder getRelatedAssetsBuilder() { - - onChanged(); - return getRelatedAssetsFieldBuilder().getBuilder(); - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - public com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { - if (relatedAssetsBuilder_ != null) { - return relatedAssetsBuilder_.getMessageOrBuilder(); - } else { - return relatedAssets_ == null ? - com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance() : relatedAssets_; - } - } - /** - *
-     * The related assets of the asset of one relationship type.
-     * One asset only represents one type of relationship.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelatedAssets, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder> - getRelatedAssetsFieldBuilder() { - if (relatedAssetsBuilder_ == null) { - relatedAssetsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelatedAssets, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder>( - getRelatedAssets(), - getParentForChildren(), - isClean()); - relatedAssets_ = null; - } - return relatedAssetsBuilder_; - } - - private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAncestorsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_.getUnmodifiableView(); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param index The index to set the value at. - * @param value The ancestors to set. - * @return This builder for chaining. - */ - public Builder setAncestors( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param value The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestors( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param values The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAllAncestors( - java.lang.Iterable values) { - ensureAncestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ancestors_); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @return This builder for chaining. - */ - public Builder clearAncestors() { - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * The ancestry path of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root. If the asset
-     * is a project, folder, or organization, the ancestry path starts from the
-     * asset itself.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 10; - * @param value The bytes of the ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestorsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.Asset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.Asset) - private static final com.google.cloud.asset.v1p7beta1.Asset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.Asset(); - } - - public static com.google.cloud.asset.v1p7beta1.Asset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Asset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Asset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Asset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java deleted file mode 100644 index 4711ab6e07b9..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetOrBuilder.java +++ /dev/null @@ -1,417 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface AssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.Asset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - *
-   * The last update timestamp of an asset. update_time is updated when
-   * create/update/delete operation is performed.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string name = 1; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - * @return Whether the resource field is set. - */ - boolean hasResource(); - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - * @return The resource. - */ - com.google.cloud.asset.v1p7beta1.Resource getResource(); - /** - *
-   * A representation of the resource.
-   * 
- * - * .google.cloud.asset.v1p7beta1.Resource resource = 3; - */ - com.google.cloud.asset.v1p7beta1.ResourceOrBuilder getResourceOrBuilder(); - - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-   * more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return Whether the iamPolicy field is set. - */ - boolean hasIamPolicy(); - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-   * more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - * @return The iamPolicy. - */ - com.google.iam.v1.Policy getIamPolicy(); - /** - *
-   * A representation of the Cloud IAM policy set on a Google Cloud resource.
-   * There can be a maximum of one Cloud IAM policy set on any given resource.
-   * In addition, Cloud IAM policies inherit their granted access scope from any
-   * policies set on parent resources in the resource hierarchy. Therefore, the
-   * effectively policy is the union of both the policy set on this resource
-   * and each policy set on all of the resource's ancestry resource levels in
-   * the hierarchy. See
-   * [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for
-   * more information.
-   * 
- * - * .google.iam.v1.Policy iam_policy = 4; - */ - com.google.iam.v1.PolicyOrBuilder getIamPolicyOrBuilder(); - - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - java.util.List - getOrgPolicyList(); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - com.google.cloud.orgpolicy.v1.Policy getOrgPolicy(int index); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - int getOrgPolicyCount(); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - java.util.List - getOrgPolicyOrBuilderList(); - /** - *
-   * A representation of an [organization
-   * policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
-   * There can be more than one organization policy with different constraints
-   * set on a given resource.
-   * 
- * - * repeated .google.cloud.orgpolicy.v1.Policy org_policy = 6; - */ - com.google.cloud.orgpolicy.v1.PolicyOrBuilder getOrgPolicyOrBuilder( - int index); - - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return Whether the accessPolicy field is set. - */ - boolean hasAccessPolicy(); - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - * @return The accessPolicy. - */ - com.google.identity.accesscontextmanager.v1.AccessPolicy getAccessPolicy(); - /** - *
-   * Please also refer to the [access policy user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - */ - com.google.identity.accesscontextmanager.v1.AccessPolicyOrBuilder getAccessPolicyOrBuilder(); - - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return Whether the accessLevel field is set. - */ - boolean hasAccessLevel(); - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - * @return The accessLevel. - */ - com.google.identity.accesscontextmanager.v1.AccessLevel getAccessLevel(); - /** - *
-   * Please also refer to the [access level user
-   * guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
-   * 
- * - * .google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - */ - com.google.identity.accesscontextmanager.v1.AccessLevelOrBuilder getAccessLevelOrBuilder(); - - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return Whether the servicePerimeter field is set. - */ - boolean hasServicePerimeter(); - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - * @return The servicePerimeter. - */ - com.google.identity.accesscontextmanager.v1.ServicePerimeter getServicePerimeter(); - /** - *
-   * Please also refer to the [service perimeter user
-   * guide](https://cloud.google.com/vpc-service-controls/docs/overview).
-   * 
- * - * .google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; - */ - com.google.identity.accesscontextmanager.v1.ServicePerimeterOrBuilder getServicePerimeterOrBuilder(); - - /** - *
-   * The related assets of the asset of one relationship type.
-   * One asset only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - * @return Whether the relatedAssets field is set. - */ - boolean hasRelatedAssets(); - /** - *
-   * The related assets of the asset of one relationship type.
-   * One asset only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - * @return The relatedAssets. - */ - com.google.cloud.asset.v1p7beta1.RelatedAssets getRelatedAssets(); - /** - *
-   * The related assets of the asset of one relationship type.
-   * One asset only represents one type of relationship.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelatedAssets related_assets = 13; - */ - com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder(); - - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return A list containing the ancestors. - */ - java.util.List - getAncestorsList(); - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @return The count of ancestors. - */ - int getAncestorsCount(); - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - java.lang.String getAncestors(int index); - /** - *
-   * The ancestry path of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root. If the asset
-   * is a project, folder, or organization, the ancestry path starts from the
-   * asset itself.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 10; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - com.google.protobuf.ByteString - getAncestorsBytes(int index); - - public com.google.cloud.asset.v1p7beta1.Asset.AccessContextPolicyCase getAccessContextPolicyCase(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java deleted file mode 100644 index f29c856c2589..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetProto.java +++ /dev/null @@ -1,160 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -public final class AssetProto { - private AssetProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/asset/v1p7beta1/assets.pr" + - "oto\022\034google.cloud.asset.v1p7beta1\032\031googl" + - "e/api/resource.proto\032)google/cloud/orgpo" + - "licy/v1/orgpolicy.proto\032(google/cloud/os" + - "config/v1/inventory.proto\032\032google/iam/v1" + - "/policy.proto\032:google/identity/accesscon" + - "textmanager/v1/access_level.proto\032;googl" + - "e/identity/accesscontextmanager/v1/acces" + - "s_policy.proto\032?google/identity/accessco" + - "ntextmanager/v1/service_perimeter.proto\032" + - "\034google/protobuf/struct.proto\032\037google/pr" + - "otobuf/timestamp.proto\"\206\005\n\005Asset\022/\n\013upda" + - "te_time\030\013 \001(\0132\032.google.protobuf.Timestam" + - "p\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0228\n\010r" + - "esource\030\003 \001(\0132&.google.cloud.asset.v1p7b" + - "eta1.Resource\022)\n\niam_policy\030\004 \001(\0132\025.goog" + - "le.iam.v1.Policy\0225\n\norg_policy\030\006 \003(\0132!.g" + - "oogle.cloud.orgpolicy.v1.Policy\022N\n\racces" + - "s_policy\030\007 \001(\01325.google.identity.accessc" + - "ontextmanager.v1.AccessPolicyH\000\022L\n\014acces" + - "s_level\030\010 \001(\01324.google.identity.accessco" + - "ntextmanager.v1.AccessLevelH\000\022V\n\021service" + - "_perimeter\030\t \001(\01329.google.identity.acces" + - "scontextmanager.v1.ServicePerimeterH\000\022C\n" + - "\016related_assets\030\r \001(\0132+.google.cloud.ass" + - "et.v1p7beta1.RelatedAssets\022\021\n\tancestors\030" + - "\n \003(\t:\'\352A$\n\037cloudasset.googleapis.com/As" + - "set\022\001*B\027\n\025access_context_policy\"\262\001\n\010Reso" + - "urce\022\017\n\007version\030\001 \001(\t\022\036\n\026discovery_docum" + - "ent_uri\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n" + - "\014resource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004d" + - "ata\030\006 \001(\0132\027.google.protobuf.Struct\022\020\n\010lo" + - "cation\030\010 \001(\t\"\242\001\n\rRelatedAssets\022U\n\027relati" + - "onship_attributes\030\001 \001(\01324.google.cloud.a" + - "sset.v1p7beta1.RelationshipAttributes\022:\n" + - "\006assets\030\002 \003(\0132*.google.cloud.asset.v1p7b" + - "eta1.RelatedAsset\"r\n\026RelationshipAttribu" + - "tes\022\014\n\004type\030\004 \001(\t\022\034\n\024source_resource_typ" + - "e\030\001 \001(\t\022\034\n\024target_resource_type\030\002 \001(\t\022\016\n" + - "\006action\030\003 \001(\t\"j\n\014RelatedAsset\0223\n\005asset\030\001" + - " \001(\tB$\372A!\n\037cloudasset.googleapis.com/Ass" + - "et\022\022\n\nasset_type\030\002 \001(\t\022\021\n\tancestors\030\003 \003(" + - "\tB\264\001\n com.google.cloud.asset.v1p7beta1B\n" + - "AssetProtoP\001ZAgoogle.golang.org/genproto" + - "/googleapis/cloud/asset/v1p7beta1;asset\370" + - "\001\001\252\002\034Google.Cloud.Asset.V1P7Beta1\312\002\034Goog" + - "le\\Cloud\\Asset\\V1p7beta1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(), - com.google.cloud.osconfig.v1.Inventories.getDescriptor(), - com.google.iam.v1.PolicyProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(), - com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p7beta1_Asset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_Asset_descriptor, - new java.lang.String[] { "UpdateTime", "Name", "AssetType", "Resource", "IamPolicy", "OrgPolicy", "AccessPolicy", "AccessLevel", "ServicePerimeter", "RelatedAssets", "Ancestors", "AccessContextPolicy", }); - internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor, - new java.lang.String[] { "Version", "DiscoveryDocumentUri", "DiscoveryName", "ResourceUrl", "Parent", "Data", "Location", }); - internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor, - new java.lang.String[] { "RelationshipAttributes", "Assets", }); - internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor, - new java.lang.String[] { "Type", "SourceResourceType", "TargetResourceType", "Action", }); - internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor, - new java.lang.String[] { "Asset", "AssetType", "Ancestors", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.orgpolicy.v1.OrgPolicyProto.getDescriptor(); - com.google.cloud.osconfig.v1.Inventories.getDescriptor(); - com.google.iam.v1.PolicyProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(); - com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java deleted file mode 100644 index 93f4e5177984..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/AssetServiceProto.java +++ /dev/null @@ -1,203 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public final class AssetServiceProto { - private AssetServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n0google/cloud/asset/v1p7beta1/asset_ser" + - "vice.proto\022\034google.cloud.asset.v1p7beta1" + - "\032\034google/api/annotations.proto\032\027google/a" + - "pi/client.proto\032\037google/api/field_behavi" + - "or.proto\032\031google/api/resource.proto\032)goo" + - "gle/cloud/asset/v1p7beta1/assets.proto\032#" + - "google/longrunning/operations.proto\032\037goo" + - "gle/protobuf/timestamp.proto\"\267\002\n\023ExportA" + - "ssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cl" + - "oudasset.googleapis.com/Asset\022-\n\tread_ti" + - "me\030\002 \001(\0132\032.google.protobuf.Timestamp\022\023\n\013" + - "asset_types\030\003 \003(\t\022?\n\014content_type\030\004 \001(\0162" + - ").google.cloud.asset.v1p7beta1.ContentTy" + - "pe\022F\n\routput_config\030\005 \001(\0132*.google.cloud" + - ".asset.v1p7beta1.OutputConfigB\003\340A\002\022\032\n\022re" + - "lationship_types\030\006 \003(\t\"\313\001\n\024ExportAssetsR" + - "esponse\022-\n\tread_time\030\001 \001(\0132\032.google.prot" + - "obuf.Timestamp\022A\n\routput_config\030\002 \001(\0132*." + - "google.cloud.asset.v1p7beta1.OutputConfi" + - "g\022A\n\routput_result\030\003 \001(\0132*.google.cloud." + - "asset.v1p7beta1.OutputResult\"\271\001\n\014OutputC" + - "onfig\022G\n\017gcs_destination\030\001 \001(\0132,.google." + - "cloud.asset.v1p7beta1.GcsDestinationH\000\022Q" + - "\n\024bigquery_destination\030\002 \001(\01321.google.cl" + - "oud.asset.v1p7beta1.BigQueryDestinationH" + - "\000B\r\n\013destination\"]\n\014OutputResult\022C\n\ngcs_" + - "result\030\001 \001(\0132-.google.cloud.asset.v1p7be" + - "ta1.GcsOutputResultH\000B\010\n\006result\"\037\n\017GcsOu" + - "tputResult\022\014\n\004uris\030\001 \003(\t\"C\n\016GcsDestinati" + - "on\022\r\n\003uri\030\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 \001(\tH\000B" + - "\014\n\nobject_uri\"\273\001\n\023BigQueryDestination\022\024\n" + - "\007dataset\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\tB\003\340A\002\022" + - "\r\n\005force\030\003 \001(\010\022C\n\016partition_spec\030\004 \001(\0132+" + - ".google.cloud.asset.v1p7beta1.PartitionS" + - "pec\022&\n\036separate_tables_per_asset_type\030\005 " + - "\001(\010\"\260\001\n\rPartitionSpec\022O\n\rpartition_key\030\001" + - " \001(\01628.google.cloud.asset.v1p7beta1.Part" + - "itionSpec.PartitionKey\"N\n\014PartitionKey\022\035" + - "\n\031PARTITION_KEY_UNSPECIFIED\020\000\022\r\n\tREAD_TI" + - "ME\020\001\022\020\n\014REQUEST_TIME\020\002*~\n\013ContentType\022\034\n" + - "\030CONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020" + - "\001\022\016\n\nIAM_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACC" + - "ESS_POLICY\020\005\022\020\n\014RELATIONSHIP\020\0072\332\002\n\014Asset" + - "Service\022\372\001\n\014ExportAssets\0221.google.cloud." + - "asset.v1p7beta1.ExportAssetsRequest\032\035.go" + - "ogle.longrunning.Operation\"\227\001\202\323\344\223\002)\"$/v1" + - "p7beta1/{parent=*/*}:exportAssets:\001*\312Ae\n" + - "1google.cloud.asset.v1p7beta1.ExportAsse" + - "tsResponse\0220google.cloud.asset.v1p7beta1" + - ".ExportAssetsRequest\032M\312A\031cloudasset.goog" + - "leapis.com\322A.https://www.googleapis.com/" + - "auth/cloud-platformB\270\001\n com.google.cloud" + - ".asset.v1p7beta1B\021AssetServiceProtoP\001ZAg" + - "oogle.golang.org/genproto/googleapis/clo" + - "ud/asset/v1p7beta1;asset\252\002\034Google.Cloud." + - "Asset.V1P7Beta1\312\002\034Google\\Cloud\\Asset\\V1p" + - "7beta1b\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.asset.v1p7beta1.AssetProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor, - new java.lang.String[] { "Parent", "ReadTime", "AssetTypes", "ContentType", "OutputConfig", "RelationshipTypes", }); - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor, - new java.lang.String[] { "ReadTime", "OutputConfig", "OutputResult", }); - internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor, - new java.lang.String[] { "GcsDestination", "BigqueryDestination", "Destination", }); - internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor, - new java.lang.String[] { "GcsResult", "Result", }); - internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor, - new java.lang.String[] { "Uris", }); - internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor, - new java.lang.String[] { "Uri", "UriPrefix", "ObjectUri", }); - internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor, - new java.lang.String[] { "Dataset", "Table", "Force", "PartitionSpec", "SeparateTablesPerAssetType", }); - internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor, - new java.lang.String[] { "PartitionKey", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.asset.v1p7beta1.AssetProto.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java deleted file mode 100644 index abf75e2117fb..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestination.java +++ /dev/null @@ -1,1466 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * A BigQuery destination for exporting assets to.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.BigQueryDestination} - */ -public final class BigQueryDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.BigQueryDestination) - BigQueryDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use BigQueryDestination.newBuilder() to construct. - private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BigQueryDestination() { - dataset_ = ""; - table_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BigQueryDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BigQueryDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - table_ = s; - break; - } - case 24: { - - force_ = input.readBool(); - break; - } - case 34: { - com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder subBuilder = null; - if (partitionSpec_ != null) { - subBuilder = partitionSpec_.toBuilder(); - } - partitionSpec_ = input.readMessage(com.google.cloud.asset.v1p7beta1.PartitionSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partitionSpec_); - partitionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - - separateTablesPerAssetType_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.BigQueryDestination.class, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder.class); - } - - public static final int DATASET_FIELD_NUMBER = 1; - private volatile java.lang.Object dataset_; - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - @java.lang.Override - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } - } - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLE_FIELD_NUMBER = 2; - private volatile java.lang.Object table_; - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - @java.lang.Override - public java.lang.String getTable() { - java.lang.Object ref = table_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - table_ = s; - return s; - } - } - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FORCE_FIELD_NUMBER = 3; - private boolean force_; - /** - *
-   * If the destination table already exists and this flag is `TRUE`, the
-   * table will be overwritten by the contents of assets snapshot. If the flag
-   * is `FALSE` or unset and the destination table already exists, the export
-   * call returns an INVALID_ARGUMEMT error.
-   * 
- * - * bool force = 3; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - - public static final int PARTITION_SPEC_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1p7beta1.PartitionSpec partitionSpec_; - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - * @return Whether the partitionSpec field is set. - */ - @java.lang.Override - public boolean hasPartitionSpec() { - return partitionSpec_ != null; - } - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - * @return The partitionSpec. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.PartitionSpec getPartitionSpec() { - return partitionSpec_ == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance() : partitionSpec_; - } - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { - return getPartitionSpec(); - } - - public static final int SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER = 5; - private boolean separateTablesPerAssetType_; - /** - *
-   * If this flag is `TRUE`, the snapshot results will be written to one or
-   * multiple tables, each of which contains results of one asset type. The
-   * [force] and [partition_spec] fields will apply to each of them.
-   * Field [table] will be concatenated with "_" and the asset type names (see
-   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-   * supported asset types) to construct per-asset-type table names, in which
-   * all non-alphanumeric characters like "." and "/" will be substituted by
-   * "_". Example: if field [table] is "mytable" and snapshot results
-   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-   * tables does not exist, a new table with the concatenated name will be
-   * created.
-   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-   * each table will include RECORD-type columns mapped to the nested fields in
-   * the Asset.resource.data field of that asset type (up to the 15 nested level
-   * BigQuery supports
-   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-   * fields in >15 nested levels will be stored in JSON format string as a child
-   * column of its parent RECORD column.
-   * If error occurs when exporting to any table, the whole export call will
-   * return an error but the export results that already succeed will persist.
-   * Example: if exporting to table_type_A succeeds when exporting to
-   * table_type_B fails during one export call, the results in table_type_A will
-   * persist and there will not be partial results persisting in a table.
-   * 
- * - * bool separate_tables_per_asset_type = 5; - * @return The separateTablesPerAssetType. - */ - @java.lang.Override - public boolean getSeparateTablesPerAssetType() { - return separateTablesPerAssetType_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_); - } - if (force_ != false) { - output.writeBool(3, force_); - } - if (partitionSpec_ != null) { - output.writeMessage(4, getPartitionSpec()); - } - if (separateTablesPerAssetType_ != false) { - output.writeBool(5, separateTablesPerAssetType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_); - } - if (force_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, force_); - } - if (partitionSpec_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPartitionSpec()); - } - if (separateTablesPerAssetType_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, separateTablesPerAssetType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.BigQueryDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.BigQueryDestination other = (com.google.cloud.asset.v1p7beta1.BigQueryDestination) obj; - - if (!getDataset() - .equals(other.getDataset())) return false; - if (!getTable() - .equals(other.getTable())) return false; - if (getForce() - != other.getForce()) return false; - if (hasPartitionSpec() != other.hasPartitionSpec()) return false; - if (hasPartitionSpec()) { - if (!getPartitionSpec() - .equals(other.getPartitionSpec())) return false; - } - if (getSeparateTablesPerAssetType() - != other.getSeparateTablesPerAssetType()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - hash = (37 * hash) + TABLE_FIELD_NUMBER; - hash = (53 * hash) + getTable().hashCode(); - hash = (37 * hash) + FORCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getForce()); - if (hasPartitionSpec()) { - hash = (37 * hash) + PARTITION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getPartitionSpec().hashCode(); - } - hash = (37 * hash) + SEPARATE_TABLES_PER_ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getSeparateTablesPerAssetType()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.BigQueryDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A BigQuery destination for exporting assets to.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.BigQueryDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.BigQueryDestination) - com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.BigQueryDestination.class, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.BigQueryDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - dataset_ = ""; - - table_ = ""; - - force_ = false; - - if (partitionSpecBuilder_ == null) { - partitionSpec_ = null; - } else { - partitionSpec_ = null; - partitionSpecBuilder_ = null; - } - separateTablesPerAssetType_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestination build() { - com.google.cloud.asset.v1p7beta1.BigQueryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestination buildPartial() { - com.google.cloud.asset.v1p7beta1.BigQueryDestination result = new com.google.cloud.asset.v1p7beta1.BigQueryDestination(this); - result.dataset_ = dataset_; - result.table_ = table_; - result.force_ = force_; - if (partitionSpecBuilder_ == null) { - result.partitionSpec_ = partitionSpec_; - } else { - result.partitionSpec_ = partitionSpecBuilder_.build(); - } - result.separateTablesPerAssetType_ = separateTablesPerAssetType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.BigQueryDestination) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.BigQueryDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.BigQueryDestination other) { - if (other == com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance()) return this; - if (!other.getDataset().isEmpty()) { - dataset_ = other.dataset_; - onChanged(); - } - if (!other.getTable().isEmpty()) { - table_ = other.table_; - onChanged(); - } - if (other.getForce() != false) { - setForce(other.getForce()); - } - if (other.hasPartitionSpec()) { - mergePartitionSpec(other.getPartitionSpec()); - } - if (other.getSeparateTablesPerAssetType() != false) { - setSeparateTablesPerAssetType(other.getSeparateTablesPerAssetType()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.BigQueryDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.BigQueryDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object dataset_ = ""; - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - public java.lang.String getDataset() { - java.lang.Object ref = dataset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - public com.google.protobuf.ByteString - getDatasetBytes() { - java.lang.Object ref = dataset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - dataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The dataset to set. - * @return This builder for chaining. - */ - public Builder setDataset( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataset_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearDataset() { - - dataset_ = getDefaultInstance().getDataset(); - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery dataset in format
-     * "projects/projectId/datasets/datasetId", to which the snapshot result
-     * should be exported. If this dataset does not exist, the export call returns
-     * an INVALID_ARGUMENT error.
-     * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for dataset to set. - * @return This builder for chaining. - */ - public Builder setDatasetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataset_ = value; - onChanged(); - return this; - } - - private java.lang.Object table_ = ""; - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - public java.lang.String getTable() { - java.lang.Object ref = table_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - table_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - public com.google.protobuf.ByteString - getTableBytes() { - java.lang.Object ref = table_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - table_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The table to set. - * @return This builder for chaining. - */ - public Builder setTable( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - table_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearTable() { - - table_ = getDefaultInstance().getTable(); - onChanged(); - return this; - } - /** - *
-     * Required. The BigQuery table to which the snapshot result should be
-     * written. If this table does not exist, a new table with the given name
-     * will be created.
-     * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for table to set. - * @return This builder for chaining. - */ - public Builder setTableBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - table_ = value; - onChanged(); - return this; - } - - private boolean force_ ; - /** - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is `FALSE` or unset and the destination table already exists, the export
-     * call returns an INVALID_ARGUMEMT error.
-     * 
- * - * bool force = 3; - * @return The force. - */ - @java.lang.Override - public boolean getForce() { - return force_; - } - /** - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is `FALSE` or unset and the destination table already exists, the export
-     * call returns an INVALID_ARGUMEMT error.
-     * 
- * - * bool force = 3; - * @param value The force to set. - * @return This builder for chaining. - */ - public Builder setForce(boolean value) { - - force_ = value; - onChanged(); - return this; - } - /** - *
-     * If the destination table already exists and this flag is `TRUE`, the
-     * table will be overwritten by the contents of assets snapshot. If the flag
-     * is `FALSE` or unset and the destination table already exists, the export
-     * call returns an INVALID_ARGUMEMT error.
-     * 
- * - * bool force = 3; - * @return This builder for chaining. - */ - public Builder clearForce() { - - force_ = false; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p7beta1.PartitionSpec partitionSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.PartitionSpec, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder, com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder> partitionSpecBuilder_; - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - * @return Whether the partitionSpec field is set. - */ - public boolean hasPartitionSpec() { - return partitionSpecBuilder_ != null || partitionSpec_ != null; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - * @return The partitionSpec. - */ - public com.google.cloud.asset.v1p7beta1.PartitionSpec getPartitionSpec() { - if (partitionSpecBuilder_ == null) { - return partitionSpec_ == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance() : partitionSpec_; - } else { - return partitionSpecBuilder_.getMessage(); - } - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - public Builder setPartitionSpec(com.google.cloud.asset.v1p7beta1.PartitionSpec value) { - if (partitionSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - partitionSpec_ = value; - onChanged(); - } else { - partitionSpecBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - public Builder setPartitionSpec( - com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder builderForValue) { - if (partitionSpecBuilder_ == null) { - partitionSpec_ = builderForValue.build(); - onChanged(); - } else { - partitionSpecBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - public Builder mergePartitionSpec(com.google.cloud.asset.v1p7beta1.PartitionSpec value) { - if (partitionSpecBuilder_ == null) { - if (partitionSpec_ != null) { - partitionSpec_ = - com.google.cloud.asset.v1p7beta1.PartitionSpec.newBuilder(partitionSpec_).mergeFrom(value).buildPartial(); - } else { - partitionSpec_ = value; - } - onChanged(); - } else { - partitionSpecBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - public Builder clearPartitionSpec() { - if (partitionSpecBuilder_ == null) { - partitionSpec_ = null; - onChanged(); - } else { - partitionSpec_ = null; - partitionSpecBuilder_ = null; - } - - return this; - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - public com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder getPartitionSpecBuilder() { - - onChanged(); - return getPartitionSpecFieldBuilder().getBuilder(); - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - public com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder getPartitionSpecOrBuilder() { - if (partitionSpecBuilder_ != null) { - return partitionSpecBuilder_.getMessageOrBuilder(); - } else { - return partitionSpec_ == null ? - com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance() : partitionSpec_; - } - } - /** - *
-     * [partition_spec] determines whether to export to partitioned table(s) and
-     * how to partition the data.
-     * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-     * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-     * non-partitioned table(s). [force] will decide whether to overwrite existing
-     * table(s).
-     * If [partition_spec] is specified. First, the snapshot results will be
-     * written to partitioned table(s) with two additional timestamp columns,
-     * readTime and requestTime, one of which will be the partition key. Secondly,
-     * in the case when any destination table already exists, it will first try to
-     * update existing table's schema as necessary by appending additional
-     * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-     * overwritten by the snapshot results (data in different partitions will
-     * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-     * error will be returned if the schema update or data appension fails.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.PartitionSpec, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder, com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder> - getPartitionSpecFieldBuilder() { - if (partitionSpecBuilder_ == null) { - partitionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.PartitionSpec, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder, com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder>( - getPartitionSpec(), - getParentForChildren(), - isClean()); - partitionSpec_ = null; - } - return partitionSpecBuilder_; - } - - private boolean separateTablesPerAssetType_ ; - /** - *
-     * If this flag is `TRUE`, the snapshot results will be written to one or
-     * multiple tables, each of which contains results of one asset type. The
-     * [force] and [partition_spec] fields will apply to each of them.
-     * Field [table] will be concatenated with "_" and the asset type names (see
-     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-     * supported asset types) to construct per-asset-type table names, in which
-     * all non-alphanumeric characters like "." and "/" will be substituted by
-     * "_". Example: if field [table] is "mytable" and snapshot results
-     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-     * tables does not exist, a new table with the concatenated name will be
-     * created.
-     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-     * each table will include RECORD-type columns mapped to the nested fields in
-     * the Asset.resource.data field of that asset type (up to the 15 nested level
-     * BigQuery supports
-     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-     * fields in >15 nested levels will be stored in JSON format string as a child
-     * column of its parent RECORD column.
-     * If error occurs when exporting to any table, the whole export call will
-     * return an error but the export results that already succeed will persist.
-     * Example: if exporting to table_type_A succeeds when exporting to
-     * table_type_B fails during one export call, the results in table_type_A will
-     * persist and there will not be partial results persisting in a table.
-     * 
- * - * bool separate_tables_per_asset_type = 5; - * @return The separateTablesPerAssetType. - */ - @java.lang.Override - public boolean getSeparateTablesPerAssetType() { - return separateTablesPerAssetType_; - } - /** - *
-     * If this flag is `TRUE`, the snapshot results will be written to one or
-     * multiple tables, each of which contains results of one asset type. The
-     * [force] and [partition_spec] fields will apply to each of them.
-     * Field [table] will be concatenated with "_" and the asset type names (see
-     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-     * supported asset types) to construct per-asset-type table names, in which
-     * all non-alphanumeric characters like "." and "/" will be substituted by
-     * "_". Example: if field [table] is "mytable" and snapshot results
-     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-     * tables does not exist, a new table with the concatenated name will be
-     * created.
-     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-     * each table will include RECORD-type columns mapped to the nested fields in
-     * the Asset.resource.data field of that asset type (up to the 15 nested level
-     * BigQuery supports
-     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-     * fields in >15 nested levels will be stored in JSON format string as a child
-     * column of its parent RECORD column.
-     * If error occurs when exporting to any table, the whole export call will
-     * return an error but the export results that already succeed will persist.
-     * Example: if exporting to table_type_A succeeds when exporting to
-     * table_type_B fails during one export call, the results in table_type_A will
-     * persist and there will not be partial results persisting in a table.
-     * 
- * - * bool separate_tables_per_asset_type = 5; - * @param value The separateTablesPerAssetType to set. - * @return This builder for chaining. - */ - public Builder setSeparateTablesPerAssetType(boolean value) { - - separateTablesPerAssetType_ = value; - onChanged(); - return this; - } - /** - *
-     * If this flag is `TRUE`, the snapshot results will be written to one or
-     * multiple tables, each of which contains results of one asset type. The
-     * [force] and [partition_spec] fields will apply to each of them.
-     * Field [table] will be concatenated with "_" and the asset type names (see
-     * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-     * supported asset types) to construct per-asset-type table names, in which
-     * all non-alphanumeric characters like "." and "/" will be substituted by
-     * "_". Example: if field [table] is "mytable" and snapshot results
-     * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-     * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-     * tables does not exist, a new table with the concatenated name will be
-     * created.
-     * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-     * each table will include RECORD-type columns mapped to the nested fields in
-     * the Asset.resource.data field of that asset type (up to the 15 nested level
-     * BigQuery supports
-     * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-     * fields in >15 nested levels will be stored in JSON format string as a child
-     * column of its parent RECORD column.
-     * If error occurs when exporting to any table, the whole export call will
-     * return an error but the export results that already succeed will persist.
-     * Example: if exporting to table_type_A succeeds when exporting to
-     * table_type_B fails during one export call, the results in table_type_A will
-     * persist and there will not be partial results persisting in a table.
-     * 
- * - * bool separate_tables_per_asset_type = 5; - * @return This builder for chaining. - */ - public Builder clearSeparateTablesPerAssetType() { - - separateTablesPerAssetType_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.BigQueryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.BigQueryDestination) - private static final com.google.cloud.asset.v1p7beta1.BigQueryDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.BigQueryDestination(); - } - - public static com.google.cloud.asset.v1p7beta1.BigQueryDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BigQueryDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java deleted file mode 100644 index 40da134d5f87..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/BigQueryDestinationOrBuilder.java +++ /dev/null @@ -1,174 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface BigQueryDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.BigQueryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The dataset. - */ - java.lang.String getDataset(); - /** - *
-   * Required. The BigQuery dataset in format
-   * "projects/projectId/datasets/datasetId", to which the snapshot result
-   * should be exported. If this dataset does not exist, the export call returns
-   * an INVALID_ARGUMENT error.
-   * 
- * - * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for dataset. - */ - com.google.protobuf.ByteString - getDatasetBytes(); - - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The table. - */ - java.lang.String getTable(); - /** - *
-   * Required. The BigQuery table to which the snapshot result should be
-   * written. If this table does not exist, a new table with the given name
-   * will be created.
-   * 
- * - * string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for table. - */ - com.google.protobuf.ByteString - getTableBytes(); - - /** - *
-   * If the destination table already exists and this flag is `TRUE`, the
-   * table will be overwritten by the contents of assets snapshot. If the flag
-   * is `FALSE` or unset and the destination table already exists, the export
-   * call returns an INVALID_ARGUMEMT error.
-   * 
- * - * bool force = 3; - * @return The force. - */ - boolean getForce(); - - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - * @return Whether the partitionSpec field is set. - */ - boolean hasPartitionSpec(); - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - * @return The partitionSpec. - */ - com.google.cloud.asset.v1p7beta1.PartitionSpec getPartitionSpec(); - /** - *
-   * [partition_spec] determines whether to export to partitioned table(s) and
-   * how to partition the data.
-   * If [partition_spec] is unset or [partition_spec.partition_key] is unset or
-   * `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to
-   * non-partitioned table(s). [force] will decide whether to overwrite existing
-   * table(s).
-   * If [partition_spec] is specified. First, the snapshot results will be
-   * written to partitioned table(s) with two additional timestamp columns,
-   * readTime and requestTime, one of which will be the partition key. Secondly,
-   * in the case when any destination table already exists, it will first try to
-   * update existing table's schema as necessary by appending additional
-   * columns. Then, if [force] is `TRUE`, the corresponding partition will be
-   * overwritten by the snapshot results (data in different partitions will
-   * remain intact); if [force] is unset or `FALSE`, it will append the data. An
-   * error will be returned if the schema update or data appension fails.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec partition_spec = 4; - */ - com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder getPartitionSpecOrBuilder(); - - /** - *
-   * If this flag is `TRUE`, the snapshot results will be written to one or
-   * multiple tables, each of which contains results of one asset type. The
-   * [force] and [partition_spec] fields will apply to each of them.
-   * Field [table] will be concatenated with "_" and the asset type names (see
-   * https://cloud.google.com/asset-inventory/docs/supported-asset-types for
-   * supported asset types) to construct per-asset-type table names, in which
-   * all non-alphanumeric characters like "." and "/" will be substituted by
-   * "_". Example: if field [table] is "mytable" and snapshot results
-   * contain "storage.googleapis.com/Bucket" assets, the corresponding table
-   * name will be "mytable_storage_googleapis_com_Bucket". If any of these
-   * tables does not exist, a new table with the concatenated name will be
-   * created.
-   * When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of
-   * each table will include RECORD-type columns mapped to the nested fields in
-   * the Asset.resource.data field of that asset type (up to the 15 nested level
-   * BigQuery supports
-   * (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The
-   * fields in >15 nested levels will be stored in JSON format string as a child
-   * column of its parent RECORD column.
-   * If error occurs when exporting to any table, the whole export call will
-   * return an error but the export results that already succeed will persist.
-   * Example: if exporting to table_type_A succeeds when exporting to
-   * table_type_B fails during one export call, the results in table_type_A will
-   * persist and there will not be partial results persisting in a table.
-   * 
- * - * bool separate_tables_per_asset_type = 5; - * @return The separateTablesPerAssetType. - */ - boolean getSeparateTablesPerAssetType(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java deleted file mode 100644 index b093c4e6ef27..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ContentType.java +++ /dev/null @@ -1,201 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * Asset content type.
- * 
- * - * Protobuf enum {@code google.cloud.asset.v1p7beta1.ContentType} - */ -public enum ContentType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - CONTENT_TYPE_UNSPECIFIED(0), - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - RESOURCE(1), - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - IAM_POLICY(2), - /** - *
-   * The Cloud Organization Policy set on an asset.
-   * 
- * - * ORG_POLICY = 4; - */ - ORG_POLICY(4), - /** - *
-   * The Cloud Access context manager Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - ACCESS_POLICY(5), - /** - *
-   * The related resources.
-   * 
- * - * RELATIONSHIP = 7; - */ - RELATIONSHIP(7), - UNRECOGNIZED(-1), - ; - - /** - *
-   * Unspecified content type.
-   * 
- * - * CONTENT_TYPE_UNSPECIFIED = 0; - */ - public static final int CONTENT_TYPE_UNSPECIFIED_VALUE = 0; - /** - *
-   * Resource metadata.
-   * 
- * - * RESOURCE = 1; - */ - public static final int RESOURCE_VALUE = 1; - /** - *
-   * The actual IAM policy set on a resource.
-   * 
- * - * IAM_POLICY = 2; - */ - public static final int IAM_POLICY_VALUE = 2; - /** - *
-   * The Cloud Organization Policy set on an asset.
-   * 
- * - * ORG_POLICY = 4; - */ - public static final int ORG_POLICY_VALUE = 4; - /** - *
-   * The Cloud Access context manager Policy set on an asset.
-   * 
- * - * ACCESS_POLICY = 5; - */ - public static final int ACCESS_POLICY_VALUE = 5; - /** - *
-   * The related resources.
-   * 
- * - * RELATIONSHIP = 7; - */ - public static final int RELATIONSHIP_VALUE = 7; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ContentType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ContentType forNumber(int value) { - switch (value) { - case 0: return CONTENT_TYPE_UNSPECIFIED; - case 1: return RESOURCE; - case 2: return IAM_POLICY; - case 4: return ORG_POLICY; - case 5: return ACCESS_POLICY; - case 7: return RELATIONSHIP; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ContentType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ContentType findValueByNumber(int number) { - return ContentType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.getDescriptor().getEnumTypes().get(0); - } - - private static final ContentType[] VALUES = values(); - - public static ContentType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ContentType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p7beta1.ContentType) -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java deleted file mode 100644 index b09380a20b1f..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequest.java +++ /dev/null @@ -1,2056 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * Export asset request.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsRequest} - */ -public final class ExportAssetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.ExportAssetsRequest) - ExportAssetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExportAssetsRequest.newBuilder() to construct. - private ExportAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExportAssetsRequest() { - parent_ = ""; - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - contentType_ = 0; - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExportAssetsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExportAssetsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assetTypes_.add(s); - break; - } - case 32: { - int rawValue = input.readEnum(); - - contentType_ = rawValue; - break; - } - case 42: { - com.google.cloud.asset.v1p7beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.asset.v1p7beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - relationshipTypes_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.class, com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int READ_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int ASSET_TYPES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList assetTypes_; - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_; - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - - public static final int CONTENT_TYPE_FIELD_NUMBER = 4; - private int contentType_; - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override public com.google.cloud.asset.v1p7beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p7beta1.ContentType result = com.google.cloud.asset.v1p7beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p7beta1.ContentType.UNRECOGNIZED : result; - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList relationshipTypes_; - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_; - } - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (readTime_ != null) { - output.writeMessage(2, getReadTime()); - } - for (int i = 0; i < assetTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); - } - if (contentType_ != com.google.cloud.asset.v1p7beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(4, contentType_); - } - if (outputConfig_ != null) { - output.writeMessage(5, getOutputConfig()); - } - for (int i = 0; i < relationshipTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relationshipTypes_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getReadTime()); - } - { - int dataSize = 0; - for (int i = 0; i < assetTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getAssetTypesList().size(); - } - if (contentType_ != com.google.cloud.asset.v1p7beta1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, contentType_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getOutputConfig()); - } - { - int dataSize = 0; - for (int i = 0; i < relationshipTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getRelationshipTypesList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsRequest)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest other = (com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) obj; - - if (!getParent() - .equals(other.getParent())) return false; - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (!getAssetTypesList() - .equals(other.getAssetTypesList())) return false; - if (contentType_ != other.contentType_) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (!getRelationshipTypesList() - .equals(other.getRelationshipTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (getAssetTypesCount() > 0) { - hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getAssetTypesList().hashCode(); - } - hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + contentType_; - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - if (getRelationshipTypesCount() > 0) { - hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipTypesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.ExportAssetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Export asset request.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.ExportAssetsRequest) - com.google.cloud.asset.v1p7beta1.ExportAssetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.class, com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - contentType_ = 0; - - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest build() { - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest buildPartial() { - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest result = new com.google.cloud.asset.v1p7beta1.ExportAssetsRequest(this); - int from_bitField0_ = bitField0_; - result.parent_ = parent_; - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = assetTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assetTypes_ = assetTypes_; - result.contentType_ = contentType_; - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.relationshipTypes_ = relationshipTypes_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.ExportAssetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.ExportAssetsRequest other) { - if (other == com.google.cloud.asset.v1p7beta1.ExportAssetsRequest.getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (!other.assetTypes_.isEmpty()) { - if (assetTypes_.isEmpty()) { - assetTypes_ = other.assetTypes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetTypesIsMutable(); - assetTypes_.addAll(other.assetTypes_); - } - onChanged(); - } - if (other.contentType_ != 0) { - setContentTypeValue(other.getContentTypeValue()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - if (!other.relationshipTypes_.isEmpty()) { - if (relationshipTypes_.isEmpty()) { - relationshipTypes_ = other.relationshipTypes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRelationshipTypesIsMutable(); - relationshipTypes_.addAll(other.relationshipTypes_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.ExportAssetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.ExportAssetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * Required. The relative name of the root asset. This can only be an
-     * organization number (such as "organizations/123"), a project ID (such as
-     * "projects/my-project-id"), or a project number (such as "projects/12345"),
-     * or a folder number (such as "folders/123").
-     * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Timestamp to take an asset snapshot. This can only be set to a timestamp
-     * between the current time and the current time minus 35 days (inclusive).
-     * If not specified, the current time will be used. Due to delays in resource
-     * data collection and indexing, there is a volatile window during which
-     * running the same query may get different results.
-     * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.protobuf.LazyStringList assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAssetTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - public com.google.protobuf.ProtocolStringList - getAssetTypesList() { - return assetTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - public int getAssetTypesCount() { - return assetTypes_.size(); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - public java.lang.String getAssetTypes(int index) { - return assetTypes_.get(index); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - public com.google.protobuf.ByteString - getAssetTypesBytes(int index) { - return assetTypes_.getByteString(index); - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param index The index to set the value at. - * @param value The assetTypes to set. - * @return This builder for chaining. - */ - public Builder setAssetTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param values The assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAllAssetTypes( - java.lang.Iterable values) { - ensureAssetTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assetTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @return This builder for chaining. - */ - public Builder clearAssetTypes() { - assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * A list of asset types to take a snapshot for. For example:
-     * "compute.googleapis.com/Disk".
-     * Regular expressions are also supported. For example:
-     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-     * with "compute.googleapis.com".
-     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-     * regular expression syntax. If the regular expression does not match any
-     * supported asset type, an INVALID_ARGUMENT error will be returned.
-     * If specified, only matching assets will be returned, otherwise, it will
-     * snapshot all asset types. See [Introduction to Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-     * for all supported asset types.
-     * 
- * - * repeated string asset_types = 3; - * @param value The bytes of the assetTypes to add. - * @return This builder for chaining. - */ - public Builder addAssetTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAssetTypesIsMutable(); - assetTypes_.add(value); - onChanged(); - return this; - } - - private int contentType_ = 0; - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - @java.lang.Override public int getContentTypeValue() { - return contentType_; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @param value The enum numeric value on the wire for contentType to set. - * @return This builder for chaining. - */ - public Builder setContentTypeValue(int value) { - - contentType_ = value; - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @return The contentType. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ContentType getContentType() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p7beta1.ContentType result = com.google.cloud.asset.v1p7beta1.ContentType.valueOf(contentType_); - return result == null ? com.google.cloud.asset.v1p7beta1.ContentType.UNRECOGNIZED : result; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @param value The contentType to set. - * @return This builder for chaining. - */ - public Builder setContentType(com.google.cloud.asset.v1p7beta1.ContentType value) { - if (value == null) { - throw new NullPointerException(); - } - - contentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * Asset content type. If not specified, no content but the asset name will be
-     * returned.
-     * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @return This builder for chaining. - */ - public Builder clearContentType() { - - contentType_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1p7beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1p7beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p7beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Required. Output configuration indicating where the results will be output
-     * to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - private com.google.protobuf.LazyStringList relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRelationshipTypesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); - bitField0_ |= 0x00000002; - } - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @return A list containing the relationshipTypes. - */ - public com.google.protobuf.ProtocolStringList - getRelationshipTypesList() { - return relationshipTypes_.getUnmodifiableView(); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @return The count of relationshipTypes. - */ - public int getRelationshipTypesCount() { - return relationshipTypes_.size(); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - public java.lang.String getRelationshipTypes(int index) { - return relationshipTypes_.get(index); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - public com.google.protobuf.ByteString - getRelationshipTypesBytes(int index) { - return relationshipTypes_.getByteString(index); - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param index The index to set the value at. - * @param value The relationshipTypes to set. - * @return This builder for chaining. - */ - public Builder setRelationshipTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param value The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param values The relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addAllRelationshipTypes( - java.lang.Iterable values) { - ensureRelationshipTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, relationshipTypes_); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @return This builder for chaining. - */ - public Builder clearRelationshipTypes() { - relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-     * A list of relationship types to export, for example:
-     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-     * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-     * specified relationships, or give errors if any relationship_types'
-     * supported types are not in [asset_types]. If not specified, it will
-     * snapshot all [asset_types]' supported relationships. An unspecified
-     * [asset_types] field means all supported asset_types. See [Introduction to
-     * Cloud Asset
-     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-     * supported asset types and relationship types.
-     * 
- * - * repeated string relationship_types = 6; - * @param value The bytes of the relationshipTypes to add. - * @return This builder for chaining. - */ - public Builder addRelationshipTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRelationshipTypesIsMutable(); - relationshipTypes_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.ExportAssetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.ExportAssetsRequest) - private static final com.google.cloud.asset.v1p7beta1.ExportAssetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.ExportAssetsRequest(); - } - - public static com.google.cloud.asset.v1p7beta1.ExportAssetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportAssetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java deleted file mode 100644 index 068316c46c0b..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsRequestOrBuilder.java +++ /dev/null @@ -1,295 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface ExportAssetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.ExportAssetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * Required. The relative name of the root asset. This can only be an
-   * organization number (such as "organizations/123"), a project ID (such as
-   * "projects/my-project-id"), or a project number (such as "projects/12345"),
-   * or a folder number (such as "folders/123").
-   * 
- * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Timestamp to take an asset snapshot. This can only be set to a timestamp
-   * between the current time and the current time minus 35 days (inclusive).
-   * If not specified, the current time will be used. Due to delays in resource
-   * data collection and indexing, there is a volatile window during which
-   * running the same query may get different results.
-   * 
- * - * .google.protobuf.Timestamp read_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return A list containing the assetTypes. - */ - java.util.List - getAssetTypesList(); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @return The count of assetTypes. - */ - int getAssetTypesCount(); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the element to return. - * @return The assetTypes at the given index. - */ - java.lang.String getAssetTypes(int index); - /** - *
-   * A list of asset types to take a snapshot for. For example:
-   * "compute.googleapis.com/Disk".
-   * Regular expressions are also supported. For example:
-   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
-   * with "compute.googleapis.com".
-   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
-   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
-   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
-   * regular expression syntax. If the regular expression does not match any
-   * supported asset type, an INVALID_ARGUMENT error will be returned.
-   * If specified, only matching assets will be returned, otherwise, it will
-   * snapshot all asset types. See [Introduction to Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
-   * for all supported asset types.
-   * 
- * - * repeated string asset_types = 3; - * @param index The index of the value to return. - * @return The bytes of the assetTypes at the given index. - */ - com.google.protobuf.ByteString - getAssetTypesBytes(int index); - - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @return The enum numeric value on the wire for contentType. - */ - int getContentTypeValue(); - /** - *
-   * Asset content type. If not specified, no content but the asset name will be
-   * returned.
-   * 
- * - * .google.cloud.asset.v1p7beta1.ContentType content_type = 4; - * @return The contentType. - */ - com.google.cloud.asset.v1p7beta1.ContentType getContentType(); - - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return The outputConfig. - */ - com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig(); - /** - *
-   * Required. Output configuration indicating where the results will be output
-   * to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); - - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return A list containing the relationshipTypes. - */ - java.util.List - getRelationshipTypesList(); - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @return The count of relationshipTypes. - */ - int getRelationshipTypesCount(); - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the element to return. - * @return The relationshipTypes at the given index. - */ - java.lang.String getRelationshipTypes(int index); - /** - *
-   * A list of relationship types to export, for example:
-   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
-   * content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]'
-   * specified relationships, or give errors if any relationship_types'
-   * supported types are not in [asset_types]. If not specified, it will
-   * snapshot all [asset_types]' supported relationships. An unspecified
-   * [asset_types] field means all supported asset_types. See [Introduction to
-   * Cloud Asset
-   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
-   * supported asset types and relationship types.
-   * 
- * - * repeated string relationship_types = 6; - * @param index The index of the value to return. - * @return The bytes of the relationshipTypes at the given index. - */ - com.google.protobuf.ByteString - getRelationshipTypesBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java deleted file mode 100644 index 2249e653b628..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponse.java +++ /dev/null @@ -1,1193 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * The export asset response. This message is returned by the
- * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
- * method in the returned
- * [google.longrunning.Operation.response][google.longrunning.Operation.response]
- * field.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsResponse} - */ -public final class ExportAssetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.ExportAssetsResponse) - ExportAssetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ExportAssetsResponse.newBuilder() to construct. - private ExportAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ExportAssetsResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ExportAssetsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ExportAssetsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (readTime_ != null) { - subBuilder = readTime_.toBuilder(); - } - readTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readTime_); - readTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.google.cloud.asset.v1p7beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = input.readMessage(com.google.cloud.asset.v1p7beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.cloud.asset.v1p7beta1.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = input.readMessage(com.google.cloud.asset.v1p7beta1.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.class, com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.Builder.class); - } - - public static final int READ_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp readTime_; - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - @java.lang.Override - public boolean hasReadTime() { - return readTime_ != null; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getReadTime() { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - return getReadTime(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - * @return Whether the outputConfig field is set. - */ - @java.lang.Override - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - * @return The outputConfig. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - public static final int OUTPUT_RESULT_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1p7beta1.OutputResult outputResult_; - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - * @return Whether the outputResult field is set. - */ - @java.lang.Override - public boolean hasOutputResult() { - return outputResult_ != null; - } - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - * @return The outputResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputResult getOutputResult() { - return outputResult_ == null ? com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance() : outputResult_; - } - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder getOutputResultOrBuilder() { - return getOutputResult(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (readTime_ != null) { - output.writeMessage(1, getReadTime()); - } - if (outputConfig_ != null) { - output.writeMessage(2, getOutputConfig()); - } - if (outputResult_ != null) { - output.writeMessage(3, getOutputResult()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (readTime_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getReadTime()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getOutputConfig()); - } - if (outputResult_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getOutputResult()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsResponse)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.ExportAssetsResponse other = (com.google.cloud.asset.v1p7beta1.ExportAssetsResponse) obj; - - if (hasReadTime() != other.hasReadTime()) return false; - if (hasReadTime()) { - if (!getReadTime() - .equals(other.getReadTime())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig() - .equals(other.getOutputConfig())) return false; - } - if (hasOutputResult() != other.hasOutputResult()) return false; - if (hasOutputResult()) { - if (!getOutputResult() - .equals(other.getOutputResult())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasReadTime()) { - hash = (37 * hash) + READ_TIME_FIELD_NUMBER; - hash = (53 * hash) + getReadTime().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - if (hasOutputResult()) { - hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getOutputResult().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.ExportAssetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The export asset response. This message is returned by the
-   * [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation]
-   * method in the returned
-   * [google.longrunning.Operation.response][google.longrunning.Operation.response]
-   * field.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.ExportAssetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.ExportAssetsResponse) - com.google.cloud.asset.v1p7beta1.ExportAssetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.class, com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (readTimeBuilder_ == null) { - readTime_ = null; - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - if (outputResultBuilder_ == null) { - outputResult_ = null; - } else { - outputResult_ = null; - outputResultBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_ExportAssetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse build() { - com.google.cloud.asset.v1p7beta1.ExportAssetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse buildPartial() { - com.google.cloud.asset.v1p7beta1.ExportAssetsResponse result = new com.google.cloud.asset.v1p7beta1.ExportAssetsResponse(this); - if (readTimeBuilder_ == null) { - result.readTime_ = readTime_; - } else { - result.readTime_ = readTimeBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - if (outputResultBuilder_ == null) { - result.outputResult_ = outputResult_; - } else { - result.outputResult_ = outputResultBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.ExportAssetsResponse) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.ExportAssetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.ExportAssetsResponse other) { - if (other == com.google.cloud.asset.v1p7beta1.ExportAssetsResponse.getDefaultInstance()) return this; - if (other.hasReadTime()) { - mergeReadTime(other.getReadTime()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - if (other.hasOutputResult()) { - mergeOutputResult(other.getOutputResult()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.ExportAssetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.ExportAssetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Timestamp readTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> readTimeBuilder_; - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - public boolean hasReadTime() { - return readTimeBuilder_ != null || readTime_ != null; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - public com.google.protobuf.Timestamp getReadTime() { - if (readTimeBuilder_ == null) { - return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } else { - return readTimeBuilder_.getMessage(); - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - readTime_ = value; - onChanged(); - } else { - readTimeBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder setReadTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (readTimeBuilder_ == null) { - readTime_ = builderForValue.build(); - onChanged(); - } else { - readTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder mergeReadTime(com.google.protobuf.Timestamp value) { - if (readTimeBuilder_ == null) { - if (readTime_ != null) { - readTime_ = - com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); - } else { - readTime_ = value; - } - onChanged(); - } else { - readTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public Builder clearReadTime() { - if (readTimeBuilder_ == null) { - readTime_ = null; - onChanged(); - } else { - readTime_ = null; - readTimeBuilder_ = null; - } - - return this; - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { - - onChanged(); - return getReadTimeFieldBuilder().getBuilder(); - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { - if (readTimeBuilder_ != null) { - return readTimeBuilder_.getMessageOrBuilder(); - } else { - return readTime_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; - } - } - /** - *
-     * Time the snapshot was taken.
-     * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> - getReadTimeFieldBuilder() { - if (readTimeBuilder_ == null) { - readTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getReadTime(), - getParentForChildren(), - isClean()); - readTime_ = null; - } - return readTimeBuilder_; - } - - private com.google.cloud.asset.v1p7beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> outputConfigBuilder_; - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - * @return The outputConfig. - */ - public com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null ? com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - public Builder setOutputConfig( - com.google.cloud.asset.v1p7beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - public Builder mergeOutputConfig(com.google.cloud.asset.v1p7beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.asset.v1p7beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1p7beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - public com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null ? - com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance() : outputConfig_; - } - } - /** - *
-     * Output configuration indicating where the results were output to.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputConfig, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder, com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder>( - getOutputConfig(), - getParentForChildren(), - isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - private com.google.cloud.asset.v1p7beta1.OutputResult outputResult_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputResult, com.google.cloud.asset.v1p7beta1.OutputResult.Builder, com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder> outputResultBuilder_; - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - * @return Whether the outputResult field is set. - */ - public boolean hasOutputResult() { - return outputResultBuilder_ != null || outputResult_ != null; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - * @return The outputResult. - */ - public com.google.cloud.asset.v1p7beta1.OutputResult getOutputResult() { - if (outputResultBuilder_ == null) { - return outputResult_ == null ? com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance() : outputResult_; - } else { - return outputResultBuilder_.getMessage(); - } - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - public Builder setOutputResult(com.google.cloud.asset.v1p7beta1.OutputResult value) { - if (outputResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputResult_ = value; - onChanged(); - } else { - outputResultBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - public Builder setOutputResult( - com.google.cloud.asset.v1p7beta1.OutputResult.Builder builderForValue) { - if (outputResultBuilder_ == null) { - outputResult_ = builderForValue.build(); - onChanged(); - } else { - outputResultBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - public Builder mergeOutputResult(com.google.cloud.asset.v1p7beta1.OutputResult value) { - if (outputResultBuilder_ == null) { - if (outputResult_ != null) { - outputResult_ = - com.google.cloud.asset.v1p7beta1.OutputResult.newBuilder(outputResult_).mergeFrom(value).buildPartial(); - } else { - outputResult_ = value; - } - onChanged(); - } else { - outputResultBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - public Builder clearOutputResult() { - if (outputResultBuilder_ == null) { - outputResult_ = null; - onChanged(); - } else { - outputResult_ = null; - outputResultBuilder_ = null; - } - - return this; - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - public com.google.cloud.asset.v1p7beta1.OutputResult.Builder getOutputResultBuilder() { - - onChanged(); - return getOutputResultFieldBuilder().getBuilder(); - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - public com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder getOutputResultOrBuilder() { - if (outputResultBuilder_ != null) { - return outputResultBuilder_.getMessageOrBuilder(); - } else { - return outputResult_ == null ? - com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance() : outputResult_; - } - } - /** - *
-     * Output result indicating where the assets were exported to. For example, a
-     * set of actual Google Cloud Storage object uris where the assets are
-     * exported to. The uris can be different from what [output_config] has
-     * specified, as the service will split the output object into multiple ones
-     * once it exceeds a single Google Cloud Storage object limit.
-     * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputResult, com.google.cloud.asset.v1p7beta1.OutputResult.Builder, com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder> - getOutputResultFieldBuilder() { - if (outputResultBuilder_ == null) { - outputResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.OutputResult, com.google.cloud.asset.v1p7beta1.OutputResult.Builder, com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder>( - getOutputResult(), - getParentForChildren(), - isClean()); - outputResult_ = null; - } - return outputResultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.ExportAssetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.ExportAssetsResponse) - private static final com.google.cloud.asset.v1p7beta1.ExportAssetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.ExportAssetsResponse(); - } - - public static com.google.cloud.asset.v1p7beta1.ExportAssetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportAssetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportAssetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.ExportAssetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java deleted file mode 100644 index 17a006b72eef..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ExportAssetsResponseOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface ExportAssetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.ExportAssetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return Whether the readTime field is set. - */ - boolean hasReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - * @return The readTime. - */ - com.google.protobuf.Timestamp getReadTime(); - /** - *
-   * Time the snapshot was taken.
-   * 
- * - * .google.protobuf.Timestamp read_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); - - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - * @return The outputConfig. - */ - com.google.cloud.asset.v1p7beta1.OutputConfig getOutputConfig(); - /** - *
-   * Output configuration indicating where the results were output to.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputConfig output_config = 2; - */ - com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); - - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - * @return Whether the outputResult field is set. - */ - boolean hasOutputResult(); - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - * @return The outputResult. - */ - com.google.cloud.asset.v1p7beta1.OutputResult getOutputResult(); - /** - *
-   * Output result indicating where the assets were exported to. For example, a
-   * set of actual Google Cloud Storage object uris where the assets are
-   * exported to. The uris can be different from what [output_config] has
-   * specified, as the service will split the output object into multiple ones
-   * once it exceeds a single Google Cloud Storage object limit.
-   * 
- * - * .google.cloud.asset.v1p7beta1.OutputResult output_result = 3; - */ - com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder getOutputResultOrBuilder(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java deleted file mode 100644 index c2432f8da124..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestination.java +++ /dev/null @@ -1,1038 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * A Cloud Storage location.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsDestination} - */ -public final class GcsDestination extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.GcsDestination) - GcsDestinationOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsDestination() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 1; - objectUri_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - objectUriCase_ = 2; - objectUri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.GcsDestination.class, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder.class); - } - - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - public enum ObjectUriCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - URI(1), - URI_PREFIX(2), - OBJECTURI_NOT_SET(0); - private final int value; - private ObjectUriCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ObjectUriCase valueOf(int value) { - return forNumber(value); - } - - public static ObjectUriCase forNumber(int value) { - switch (value) { - case 1: return URI; - case 2: return URI_PREFIX; - case 0: return OBJECTURI_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ObjectUriCase - getObjectUriCase() { - return ObjectUriCase.forNumber( - objectUriCase_); - } - - public static final int URI_FIELD_NUMBER = 1; - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - public boolean hasUri() { - return objectUriCase_ == 1; - } - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 1) { - objectUri_ = s; - } - return s; - } - } - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URI_PREFIX_FIELD_NUMBER = 2; - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return Whether the uriPrefix field is set. - */ - public boolean hasUriPrefix() { - return objectUriCase_ == 2; - } - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The uriPrefix. - */ - public java.lang.String getUriPrefix() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 2) { - objectUri_ = s; - } - return s; - } - } - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The bytes for uriPrefix. - */ - public com.google.protobuf.ByteString - getUriPrefixBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 2) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (objectUriCase_ == 1) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, objectUri_); - } - if (objectUriCase_ == 2) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (objectUriCase_ == 1) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, objectUri_); - } - if (objectUriCase_ == 2) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.GcsDestination other = (com.google.cloud.asset.v1p7beta1.GcsDestination) obj; - - if (!getObjectUriCase().equals(other.getObjectUriCase())) return false; - switch (objectUriCase_) { - case 1: - if (!getUri() - .equals(other.getUri())) return false; - break; - case 2: - if (!getUriPrefix() - .equals(other.getUriPrefix())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (objectUriCase_) { - case 1: - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - break; - case 2: - hash = (37 * hash) + URI_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getUriPrefix().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Cloud Storage location.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsDestination} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.GcsDestination) - com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.GcsDestination.class, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - objectUriCase_ = 0; - objectUri_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestination build() { - com.google.cloud.asset.v1p7beta1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestination buildPartial() { - com.google.cloud.asset.v1p7beta1.GcsDestination result = new com.google.cloud.asset.v1p7beta1.GcsDestination(this); - if (objectUriCase_ == 1) { - result.objectUri_ = objectUri_; - } - if (objectUriCase_ == 2) { - result.objectUri_ = objectUri_; - } - result.objectUriCase_ = objectUriCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.GcsDestination) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.GcsDestination)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.GcsDestination other) { - if (other == com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance()) return this; - switch (other.getObjectUriCase()) { - case URI: { - objectUriCase_ = 1; - objectUri_ = other.objectUri_; - onChanged(); - break; - } - case URI_PREFIX: { - objectUriCase_ = 2; - objectUri_ = other.objectUri_; - onChanged(); - break; - } - case OBJECTURI_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int objectUriCase_ = 0; - private java.lang.Object objectUri_; - public ObjectUriCase - getObjectUriCase() { - return ObjectUriCase.forNumber( - objectUriCase_); - } - - public Builder clearObjectUri() { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - return this; - } - - - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - @java.lang.Override - public boolean hasUri() { - return objectUriCase_ == 1; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 1) { - objectUri_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 1) { - ref = objectUri_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 1) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectUriCase_ = 1; - objectUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @return This builder for chaining. - */ - public Builder clearUri() { - if (objectUriCase_ == 1) { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The uri of the Cloud Storage object. It's the same uri that is used by
-     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-     * Editing Object
-     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-     * for more information.
-     * 
- * - * string uri = 1; - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectUriCase_ = 1; - objectUri_ = value; - onChanged(); - return this; - } - - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return Whether the uriPrefix field is set. - */ - @java.lang.Override - public boolean hasUriPrefix() { - return objectUriCase_ == 2; - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return The uriPrefix. - */ - @java.lang.Override - public java.lang.String getUriPrefix() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (objectUriCase_ == 2) { - objectUri_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return The bytes for uriPrefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUriPrefixBytes() { - java.lang.Object ref = ""; - if (objectUriCase_ == 2) { - ref = objectUri_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (objectUriCase_ == 2) { - objectUri_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @param value The uriPrefix to set. - * @return This builder for chaining. - */ - public Builder setUriPrefix( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectUriCase_ = 2; - objectUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @return This builder for chaining. - */ - public Builder clearUriPrefix() { - if (objectUriCase_ == 2) { - objectUriCase_ = 0; - objectUri_ = null; - onChanged(); - } - return this; - } - /** - *
-     * The uri prefix of all generated Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-     * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-     * contains assets for that type. <shard number> starts from 0. Example:
-     * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-     * the first shard of output objects containing all
-     * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-     * returned if file with the same name "gs://bucket_name/object_name_prefix"
-     * already exists.
-     * 
- * - * string uri_prefix = 2; - * @param value The bytes for uriPrefix to set. - * @return This builder for chaining. - */ - public Builder setUriPrefixBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectUriCase_ = 2; - objectUri_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.GcsDestination) - private static final com.google.cloud.asset.v1p7beta1.GcsDestination DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.GcsDestination(); - } - - public static com.google.cloud.asset.v1p7beta1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java deleted file mode 100644 index f9f91bc6a862..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface GcsDestinationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return Whether the uri field is set. - */ - boolean hasUri(); - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The uri. - */ - java.lang.String getUri(); - /** - *
-   * The uri of the Cloud Storage object. It's the same uri that is used by
-   * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
-   * Editing Object
-   * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
-   * for more information.
-   * 
- * - * string uri = 1; - * @return The bytes for uri. - */ - com.google.protobuf.ByteString - getUriBytes(); - - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return Whether the uriPrefix field is set. - */ - boolean hasUriPrefix(); - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The uriPrefix. - */ - java.lang.String getUriPrefix(); - /** - *
-   * The uri prefix of all generated Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name_prefix". Each object uri is in format:
-   * "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only
-   * contains assets for that type. <shard number> starts from 0. Example:
-   * "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
-   * the first shard of output objects containing all
-   * compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
-   * returned if file with the same name "gs://bucket_name/object_name_prefix"
-   * already exists.
-   * 
- * - * string uri_prefix = 2; - * @return The bytes for uriPrefix. - */ - com.google.protobuf.ByteString - getUriPrefixBytes(); - - public com.google.cloud.asset.v1p7beta1.GcsDestination.ObjectUriCase getObjectUriCase(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java deleted file mode 100644 index d201500b2c0b..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResult.java +++ /dev/null @@ -1,689 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * A Cloud Storage output result.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsOutputResult} - */ -public final class GcsOutputResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.GcsOutputResult) - GcsOutputResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use GcsOutputResult.newBuilder() to construct. - private GcsOutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GcsOutputResult() { - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GcsOutputResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private GcsOutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - uris_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - uris_ = uris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.GcsOutputResult.class, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder.class); - } - - public static final int URIS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList uris_; - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList - getUrisList() { - return uris_; - } - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - public java.lang.String getUris(int index) { - return uris_.get(index); - } - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - public com.google.protobuf.ByteString - getUrisBytes(int index) { - return uris_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < uris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < uris_.size(); i++) { - dataSize += computeStringSizeNoTag(uris_.getRaw(i)); - } - size += dataSize; - size += 1 * getUrisList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.GcsOutputResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.GcsOutputResult other = (com.google.cloud.asset.v1p7beta1.GcsOutputResult) obj; - - if (!getUrisList() - .equals(other.getUrisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getUrisCount() > 0) { - hash = (37 * hash) + URIS_FIELD_NUMBER; - hash = (53 * hash) + getUrisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.GcsOutputResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A Cloud Storage output result.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.GcsOutputResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.GcsOutputResult) - com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.GcsOutputResult.class, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.GcsOutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_GcsOutputResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResult build() { - com.google.cloud.asset.v1p7beta1.GcsOutputResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResult buildPartial() { - com.google.cloud.asset.v1p7beta1.GcsOutputResult result = new com.google.cloud.asset.v1p7beta1.GcsOutputResult(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - uris_ = uris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.uris_ = uris_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.GcsOutputResult) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.GcsOutputResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.GcsOutputResult other) { - if (other == com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance()) return this; - if (!other.uris_.isEmpty()) { - if (uris_.isEmpty()) { - uris_ = other.uris_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureUrisIsMutable(); - uris_.addAll(other.uris_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.GcsOutputResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.GcsOutputResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureUrisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - uris_ = new com.google.protobuf.LazyStringArrayList(uris_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @return A list containing the uris. - */ - public com.google.protobuf.ProtocolStringList - getUrisList() { - return uris_.getUnmodifiableView(); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @return The count of uris. - */ - public int getUrisCount() { - return uris_.size(); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - public java.lang.String getUris(int index) { - return uris_.get(index); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - public com.google.protobuf.ByteString - getUrisBytes(int index) { - return uris_.getByteString(index); - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param index The index to set the value at. - * @param value The uris to set. - * @return This builder for chaining. - */ - public Builder setUris( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrisIsMutable(); - uris_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param value The uris to add. - * @return This builder for chaining. - */ - public Builder addUris( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUrisIsMutable(); - uris_.add(value); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param values The uris to add. - * @return This builder for chaining. - */ - public Builder addAllUris( - java.lang.Iterable values) { - ensureUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, uris_); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @return This builder for chaining. - */ - public Builder clearUris() { - uris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * List of uris of the Cloud Storage objects. Example:
-     * "gs://bucket_name/object_name".
-     * 
- * - * repeated string uris = 1; - * @param value The bytes of the uris to add. - * @return This builder for chaining. - */ - public Builder addUrisBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUrisIsMutable(); - uris_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.GcsOutputResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.GcsOutputResult) - private static final com.google.cloud.asset.v1p7beta1.GcsOutputResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.GcsOutputResult(); - } - - public static com.google.cloud.asset.v1p7beta1.GcsOutputResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsOutputResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsOutputResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java deleted file mode 100644 index c163a99c673d..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/GcsOutputResultOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface GcsOutputResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.GcsOutputResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return A list containing the uris. - */ - java.util.List - getUrisList(); - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @return The count of uris. - */ - int getUrisCount(); - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the element to return. - * @return The uris at the given index. - */ - java.lang.String getUris(int index); - /** - *
-   * List of uris of the Cloud Storage objects. Example:
-   * "gs://bucket_name/object_name".
-   * 
- * - * repeated string uris = 1; - * @param index The index of the value to return. - * @return The bytes of the uris at the given index. - */ - com.google.protobuf.ByteString - getUrisBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java deleted file mode 100644 index 74c5a8dd34ab..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfig.java +++ /dev/null @@ -1,1036 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * Output configuration for export assets destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputConfig} - */ -public final class OutputConfig extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.OutputConfig) - OutputConfigOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputConfig() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1p7beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1p7beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1p7beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1p7beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: { - com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = ((com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage(com.google.cloud.asset.v1p7beta1.BigQueryDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.OutputConfig.class, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - public enum DestinationCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_DESTINATION(1), - BIGQUERY_DESTINATION(2), - DESTINATION_NOT_SET(0); - private final int value; - private DestinationCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: return GCS_DESTINATION; - case 2: return BIGQUERY_DESTINATION; - case 0: return DESTINATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); - } - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); - } - - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * proto as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * proto as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestination getBigqueryDestination() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); - } - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * proto as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - output.writeMessage(2, (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.OutputConfig other = (com.google.cloud.asset.v1p7beta1.OutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination() - .equals(other.getGcsDestination())) return false; - break; - case 2: - if (!getBigqueryDestination() - .equals(other.getBigqueryDestination())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 2: - hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output configuration for export assets destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputConfig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.OutputConfig) - com.google.cloud.asset.v1p7beta1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.OutputConfig.class, com.google.cloud.asset.v1p7beta1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfig build() { - com.google.cloud.asset.v1p7beta1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfig buildPartial() { - com.google.cloud.asset.v1p7beta1.OutputConfig result = new com.google.cloud.asset.v1p7beta1.OutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - if (destinationCase_ == 2) { - if (bigqueryDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = bigqueryDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.OutputConfig) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.OutputConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.OutputConfig other) { - if (other == com.google.cloud.asset.v1p7beta1.OutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case GCS_DESTINATION: { - mergeGcsDestination(other.getGcsDestination()); - break; - } - case BIGQUERY_DESTINATION: { - mergeBigqueryDestination(other.getBigqueryDestination()); - break; - } - case DESTINATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int destinationCase_ = 0; - private java.lang.Object destination_; - public DestinationCase - getDestinationCase() { - return DestinationCase.forNumber( - destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.GcsDestination, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder, com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder> gcsDestinationBuilder_; - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - @java.lang.Override - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.asset.v1p7beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.asset.v1p7beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.asset.v1p7beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 && - destination_ != com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1p7beta1.GcsDestination.newBuilder((com.google.cloud.asset.v1p7beta1.GcsDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - gcsDestinationBuilder_.mergeFrom(value); - } else { - gcsDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 1; - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - gcsDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.asset.v1p7beta1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.GcsDestination, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder, com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.asset.v1p7beta1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.GcsDestination, com.google.cloud.asset.v1p7beta1.GcsDestination.Builder, com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder>( - (com.google.cloud.asset.v1p7beta1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged();; - return gcsDestinationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.BigQueryDestination, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder, com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder> bigqueryDestinationBuilder_; - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - @java.lang.Override - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 2) { - return bigqueryDestinationBuilder_.getMessage(); - } - return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination(com.google.cloud.asset.v1p7beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder mergeBigqueryDestination(com.google.cloud.asset.v1p7beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2 && - destination_ != com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance()) { - destination_ = com.google.cloud.asset.v1p7beta1.BigQueryDestination.newBuilder((com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_) - .mergeFrom(value).buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 2) { - bigqueryDestinationBuilder_.mergeFrom(value); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - } - destinationCase_ = 2; - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - } - bigqueryDestinationBuilder_.clear(); - } - return this; - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder getBigqueryDestinationBuilder() { - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder() { - if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 2) { - return (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_; - } - return com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - *
-     * Destination on BigQuery. The output table stores the fields in asset
-     * proto as columns in BigQuery.
-     * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.BigQueryDestination, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder, com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - if (!(destinationCase_ == 2)) { - destination_ = com.google.cloud.asset.v1p7beta1.BigQueryDestination.getDefaultInstance(); - } - bigqueryDestinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.BigQueryDestination, com.google.cloud.asset.v1p7beta1.BigQueryDestination.Builder, com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder>( - (com.google.cloud.asset.v1p7beta1.BigQueryDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 2; - onChanged();; - return bigqueryDestinationBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.OutputConfig) - private static final com.google.cloud.asset.v1p7beta1.OutputConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.OutputConfig(); - } - - public static com.google.cloud.asset.v1p7beta1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java deleted file mode 100644 index 0e59d14707ee..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface OutputConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - * @return The gcsDestination. - */ - com.google.cloud.asset.v1p7beta1.GcsDestination getGcsDestination(); - /** - *
-   * Destination on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.asset.v1p7beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * proto as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * proto as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - * @return The bigqueryDestination. - */ - com.google.cloud.asset.v1p7beta1.BigQueryDestination getBigqueryDestination(); - /** - *
-   * Destination on BigQuery. The output table stores the fields in asset
-   * proto as columns in BigQuery.
-   * 
- * - * .google.cloud.asset.v1p7beta1.BigQueryDestination bigquery_destination = 2; - */ - com.google.cloud.asset.v1p7beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); - - public com.google.cloud.asset.v1p7beta1.OutputConfig.DestinationCase getDestinationCase(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java deleted file mode 100644 index 12d94870cd68..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResult.java +++ /dev/null @@ -1,761 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * Output result of export assets.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputResult} - */ -public final class OutputResult extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.OutputResult) - OutputResultOrBuilder { -private static final long serialVersionUID = 0L; - // Use OutputResult.newBuilder() to construct. - private OutputResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private OutputResult() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new OutputResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private OutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder subBuilder = null; - if (resultCase_ == 1) { - subBuilder = ((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.cloud.asset.v1p7beta1.GcsOutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 1; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.OutputResult.class, com.google.cloud.asset.v1p7beta1.OutputResult.Builder.class); - } - - private int resultCase_ = 0; - private java.lang.Object result_; - public enum ResultCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - GCS_RESULT(1), - RESULT_NOT_SET(0); - private final int value; - private ResultCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ResultCase valueOf(int value) { - return forNumber(value); - } - - public static ResultCase forNumber(int value) { - switch (value) { - case 1: return GCS_RESULT; - case 0: return RESULT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public static final int GCS_RESULT_FIELD_NUMBER = 1; - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - * @return Whether the gcsResult field is set. - */ - @java.lang.Override - public boolean hasGcsResult() { - return resultCase_ == 1; - } - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - * @return The gcsResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResult getGcsResult() { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); - } - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (resultCase_ == 1) { - output.writeMessage(1, (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (resultCase_ == 1) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.OutputResult)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.OutputResult other = (com.google.cloud.asset.v1p7beta1.OutputResult) obj; - - if (!getResultCase().equals(other.getResultCase())) return false; - switch (resultCase_) { - case 1: - if (!getGcsResult() - .equals(other.getGcsResult())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (resultCase_) { - case 1: - hash = (37 * hash) + GCS_RESULT_FIELD_NUMBER; - hash = (53 * hash) + getGcsResult().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.OutputResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.OutputResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Output result of export assets.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.OutputResult} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.OutputResult) - com.google.cloud.asset.v1p7beta1.OutputResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.OutputResult.class, com.google.cloud.asset.v1p7beta1.OutputResult.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.OutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - resultCase_ = 0; - result_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_OutputResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputResult getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputResult build() { - com.google.cloud.asset.v1p7beta1.OutputResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputResult buildPartial() { - com.google.cloud.asset.v1p7beta1.OutputResult result = new com.google.cloud.asset.v1p7beta1.OutputResult(this); - if (resultCase_ == 1) { - if (gcsResultBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = gcsResultBuilder_.build(); - } - } - result.resultCase_ = resultCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.OutputResult) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.OutputResult)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.OutputResult other) { - if (other == com.google.cloud.asset.v1p7beta1.OutputResult.getDefaultInstance()) return this; - switch (other.getResultCase()) { - case GCS_RESULT: { - mergeGcsResult(other.getGcsResult()); - break; - } - case RESULT_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.OutputResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.OutputResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int resultCase_ = 0; - private java.lang.Object result_; - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public Builder clearResult() { - resultCase_ = 0; - result_ = null; - onChanged(); - return this; - } - - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.GcsOutputResult, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder, com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder> gcsResultBuilder_; - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - * @return Whether the gcsResult field is set. - */ - @java.lang.Override - public boolean hasGcsResult() { - return resultCase_ == 1; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - * @return The gcsResult. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResult getGcsResult() { - if (gcsResultBuilder_ == null) { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); - } else { - if (resultCase_ == 1) { - return gcsResultBuilder_.getMessage(); - } - return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); - } - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - public Builder setGcsResult(com.google.cloud.asset.v1p7beta1.GcsOutputResult value) { - if (gcsResultBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - gcsResultBuilder_.setMessage(value); - } - resultCase_ = 1; - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - public Builder setGcsResult( - com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder builderForValue) { - if (gcsResultBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - gcsResultBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 1; - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - public Builder mergeGcsResult(com.google.cloud.asset.v1p7beta1.GcsOutputResult value) { - if (gcsResultBuilder_ == null) { - if (resultCase_ == 1 && - result_ != com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance()) { - result_ = com.google.cloud.asset.v1p7beta1.GcsOutputResult.newBuilder((com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 1) { - gcsResultBuilder_.mergeFrom(value); - } else { - gcsResultBuilder_.setMessage(value); - } - } - resultCase_ = 1; - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - public Builder clearGcsResult() { - if (gcsResultBuilder_ == null) { - if (resultCase_ == 1) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 1) { - resultCase_ = 0; - result_ = null; - } - gcsResultBuilder_.clear(); - } - return this; - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - public com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder getGcsResultBuilder() { - return getGcsResultFieldBuilder().getBuilder(); - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder getGcsResultOrBuilder() { - if ((resultCase_ == 1) && (gcsResultBuilder_ != null)) { - return gcsResultBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 1) { - return (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_; - } - return com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); - } - } - /** - *
-     * Export result on Cloud Storage.
-     * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.GcsOutputResult, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder, com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder> - getGcsResultFieldBuilder() { - if (gcsResultBuilder_ == null) { - if (!(resultCase_ == 1)) { - result_ = com.google.cloud.asset.v1p7beta1.GcsOutputResult.getDefaultInstance(); - } - gcsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.GcsOutputResult, com.google.cloud.asset.v1p7beta1.GcsOutputResult.Builder, com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder>( - (com.google.cloud.asset.v1p7beta1.GcsOutputResult) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 1; - onChanged();; - return gcsResultBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.OutputResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.OutputResult) - private static final com.google.cloud.asset.v1p7beta1.OutputResult DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.OutputResult(); - } - - public static com.google.cloud.asset.v1p7beta1.OutputResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.OutputResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java deleted file mode 100644 index 84f878583beb..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/OutputResultOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface OutputResultOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.OutputResult) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - * @return Whether the gcsResult field is set. - */ - boolean hasGcsResult(); - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - * @return The gcsResult. - */ - com.google.cloud.asset.v1p7beta1.GcsOutputResult getGcsResult(); - /** - *
-   * Export result on Cloud Storage.
-   * 
- * - * .google.cloud.asset.v1p7beta1.GcsOutputResult gcs_result = 1; - */ - com.google.cloud.asset.v1p7beta1.GcsOutputResultOrBuilder getGcsResultOrBuilder(); - - public com.google.cloud.asset.v1p7beta1.OutputResult.ResultCase getResultCase(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java deleted file mode 100644 index b2b65109c4cd..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpec.java +++ /dev/null @@ -1,716 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * Specifications of BigQuery partitioned table as export destination.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.PartitionSpec} - */ -public final class PartitionSpec extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.PartitionSpec) - PartitionSpecOrBuilder { -private static final long serialVersionUID = 0L; - // Use PartitionSpec.newBuilder() to construct. - private PartitionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PartitionSpec() { - partitionKey_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PartitionSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PartitionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - partitionKey_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.PartitionSpec.class, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder.class); - } - - /** - *
-   * This enum is used to determine the partition key column when exporting
-   * assets to BigQuery partitioned table(s). Note that, if the partition key is
-   * a timestamp column, the actual partition is based on its date value
-   * (expressed in UTC. see details in
-   * https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables).
-   * 
- * - * Protobuf enum {@code google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey} - */ - public enum PartitionKey - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unspecified partition key. If used, it means using non-partitioned table.
-     * 
- * - * PARTITION_KEY_UNSPECIFIED = 0; - */ - PARTITION_KEY_UNSPECIFIED(0), - /** - *
-     * The time when the snapshot is taken. If specified as partition key, the
-     * result table(s) is partitoned by the additional timestamp column,
-     * readTime. If [read_time] in ExportAssetsRequest is specified, the
-     * readTime column's value will be the same as it. Otherwise, its value will
-     * be the current time that is used to take the snapshot.
-     * 
- * - * READ_TIME = 1; - */ - READ_TIME(1), - /** - *
-     * The time when the request is received and started to be processed. If
-     * specified as partition key, the result table(s) is partitoned by the
-     * requestTime column, an additional timestamp column representing when the
-     * request was received.
-     * 
- * - * REQUEST_TIME = 2; - */ - REQUEST_TIME(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unspecified partition key. If used, it means using non-partitioned table.
-     * 
- * - * PARTITION_KEY_UNSPECIFIED = 0; - */ - public static final int PARTITION_KEY_UNSPECIFIED_VALUE = 0; - /** - *
-     * The time when the snapshot is taken. If specified as partition key, the
-     * result table(s) is partitoned by the additional timestamp column,
-     * readTime. If [read_time] in ExportAssetsRequest is specified, the
-     * readTime column's value will be the same as it. Otherwise, its value will
-     * be the current time that is used to take the snapshot.
-     * 
- * - * READ_TIME = 1; - */ - public static final int READ_TIME_VALUE = 1; - /** - *
-     * The time when the request is received and started to be processed. If
-     * specified as partition key, the result table(s) is partitoned by the
-     * requestTime column, an additional timestamp column representing when the
-     * request was received.
-     * 
- * - * REQUEST_TIME = 2; - */ - public static final int REQUEST_TIME_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PartitionKey valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PartitionKey forNumber(int value) { - switch (value) { - case 0: return PARTITION_KEY_UNSPECIFIED; - case 1: return READ_TIME; - case 2: return REQUEST_TIME; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PartitionKey> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PartitionKey findValueByNumber(int number) { - return PartitionKey.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.PartitionSpec.getDescriptor().getEnumTypes().get(0); - } - - private static final PartitionKey[] VALUES = values(); - - public static PartitionKey valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PartitionKey(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey) - } - - public static final int PARTITION_KEY_FIELD_NUMBER = 1; - private int partitionKey_; - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @return The enum numeric value on the wire for partitionKey. - */ - @java.lang.Override public int getPartitionKeyValue() { - return partitionKey_; - } - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @return The partitionKey. - */ - @java.lang.Override public com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey getPartitionKey() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.valueOf(partitionKey_); - return result == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (partitionKey_ != com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { - output.writeEnum(1, partitionKey_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (partitionKey_ != com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.PARTITION_KEY_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, partitionKey_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.PartitionSpec)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.PartitionSpec other = (com.google.cloud.asset.v1p7beta1.PartitionSpec) obj; - - if (partitionKey_ != other.partitionKey_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; - hash = (53 * hash) + partitionKey_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.PartitionSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.PartitionSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * Specifications of BigQuery partitioned table as export destination.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.PartitionSpec} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.PartitionSpec) - com.google.cloud.asset.v1p7beta1.PartitionSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.PartitionSpec.class, com.google.cloud.asset.v1p7beta1.PartitionSpec.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.PartitionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - partitionKey_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetServiceProto.internal_static_google_cloud_asset_v1p7beta1_PartitionSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.PartitionSpec getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.PartitionSpec build() { - com.google.cloud.asset.v1p7beta1.PartitionSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.PartitionSpec buildPartial() { - com.google.cloud.asset.v1p7beta1.PartitionSpec result = new com.google.cloud.asset.v1p7beta1.PartitionSpec(this); - result.partitionKey_ = partitionKey_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.PartitionSpec) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.PartitionSpec)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.PartitionSpec other) { - if (other == com.google.cloud.asset.v1p7beta1.PartitionSpec.getDefaultInstance()) return this; - if (other.partitionKey_ != 0) { - setPartitionKeyValue(other.getPartitionKeyValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.PartitionSpec parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.PartitionSpec) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int partitionKey_ = 0; - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @return The enum numeric value on the wire for partitionKey. - */ - @java.lang.Override public int getPartitionKeyValue() { - return partitionKey_; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @param value The enum numeric value on the wire for partitionKey to set. - * @return This builder for chaining. - */ - public Builder setPartitionKeyValue(int value) { - - partitionKey_ = value; - onChanged(); - return this; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @return The partitionKey. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey getPartitionKey() { - @SuppressWarnings("deprecation") - com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey result = com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.valueOf(partitionKey_); - return result == null ? com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey.UNRECOGNIZED : result; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @param value The partitionKey to set. - * @return This builder for chaining. - */ - public Builder setPartitionKey(com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey value) { - if (value == null) { - throw new NullPointerException(); - } - - partitionKey_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-     * The partition key for BigQuery partitioned table.
-     * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @return This builder for chaining. - */ - public Builder clearPartitionKey() { - - partitionKey_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.PartitionSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.PartitionSpec) - private static final com.google.cloud.asset.v1p7beta1.PartitionSpec DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.PartitionSpec(); - } - - public static com.google.cloud.asset.v1p7beta1.PartitionSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PartitionSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PartitionSpec(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.PartitionSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java deleted file mode 100644 index 0de671bc2e18..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/PartitionSpecOrBuilder.java +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/asset_service.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface PartitionSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.PartitionSpec) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @return The enum numeric value on the wire for partitionKey. - */ - int getPartitionKeyValue(); - /** - *
-   * The partition key for BigQuery partitioned table.
-   * 
- * - * .google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey partition_key = 1; - * @return The partitionKey. - */ - com.google.cloud.asset.v1p7beta1.PartitionSpec.PartitionKey getPartitionKey(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java deleted file mode 100644 index be36b7d7f295..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAsset.java +++ /dev/null @@ -1,1123 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * An asset identify in Google Cloud which contains its name, type and
- * ancestors. An asset can be any resource in the Google Cloud [resource
- * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
- * a resource outside the Google Cloud resource hierarchy (such as Google
- * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
- * See [Supported asset
- * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
- * for more information.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAsset} - */ -public final class RelatedAsset extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.RelatedAsset) - RelatedAssetOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedAsset.newBuilder() to construct. - private RelatedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedAsset() { - asset_ = ""; - assetType_ = ""; - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedAsset(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelatedAsset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - asset_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - assetType_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ancestors_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.RelatedAsset.class, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder.class); - } - - public static final int ASSET_FIELD_NUMBER = 1; - private volatile java.lang.Object asset_; - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The asset. - */ - @java.lang.Override - public java.lang.String getAsset() { - java.lang.Object ref = asset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - asset_ = s; - return s; - } - } - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for asset. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetBytes() { - java.lang.Object ref = asset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - asset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASSET_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object assetType_; - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - @java.lang.Override - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } - } - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANCESTORS_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList ancestors_; - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_; - } - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } - for (int i = 0; i < ancestors_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ancestors_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(asset_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(assetType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); - } - { - int dataSize = 0; - for (int i = 0; i < ancestors_.size(); i++) { - dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); - } - size += dataSize; - size += 1 * getAncestorsList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.RelatedAsset)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.RelatedAsset other = (com.google.cloud.asset.v1p7beta1.RelatedAsset) obj; - - if (!getAsset() - .equals(other.getAsset())) return false; - if (!getAssetType() - .equals(other.getAssetType())) return false; - if (!getAncestorsList() - .equals(other.getAncestorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ASSET_FIELD_NUMBER; - hash = (53 * hash) + getAsset().hashCode(); - hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getAssetType().hashCode(); - if (getAncestorsCount() > 0) { - hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAncestorsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAsset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.RelatedAsset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * An asset identify in Google Cloud which contains its name, type and
-   * ancestors. An asset can be any resource in the Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * a resource outside the Google Cloud resource hierarchy (such as Google
-   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAsset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.RelatedAsset) - com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.RelatedAsset.class, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.RelatedAsset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - asset_ = ""; - - assetType_ = ""; - - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAsset_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAsset getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAsset build() { - com.google.cloud.asset.v1p7beta1.RelatedAsset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAsset buildPartial() { - com.google.cloud.asset.v1p7beta1.RelatedAsset result = new com.google.cloud.asset.v1p7beta1.RelatedAsset(this); - int from_bitField0_ = bitField0_; - result.asset_ = asset_; - result.assetType_ = assetType_; - if (((bitField0_ & 0x00000001) != 0)) { - ancestors_ = ancestors_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.ancestors_ = ancestors_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.RelatedAsset) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.RelatedAsset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelatedAsset other) { - if (other == com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance()) return this; - if (!other.getAsset().isEmpty()) { - asset_ = other.asset_; - onChanged(); - } - if (!other.getAssetType().isEmpty()) { - assetType_ = other.assetType_; - onChanged(); - } - if (!other.ancestors_.isEmpty()) { - if (ancestors_.isEmpty()) { - ancestors_ = other.ancestors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAncestorsIsMutable(); - ancestors_.addAll(other.ancestors_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.RelatedAsset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.RelatedAsset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object asset_ = ""; - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The asset. - */ - public java.lang.String getAsset() { - java.lang.Object ref = asset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - asset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for asset. - */ - public com.google.protobuf.ByteString - getAssetBytes() { - java.lang.Object ref = asset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - asset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @param value The asset to set. - * @return This builder for chaining. - */ - public Builder setAsset( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - asset_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return This builder for chaining. - */ - public Builder clearAsset() { - - asset_ = getDefaultInstance().getAsset(); - onChanged(); - return this; - } - /** - *
-     * The full name of the asset. Example:
-     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-     * See [Resource
-     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @param value The bytes for asset to set. - * @return This builder for chaining. - */ - public Builder setAssetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - asset_ = value; - onChanged(); - return this; - } - - private java.lang.Object assetType_ = ""; - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The assetType. - */ - public java.lang.String getAssetType() { - java.lang.Object ref = assetType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - assetType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - public com.google.protobuf.ByteString - getAssetTypeBytes() { - java.lang.Object ref = assetType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - assetType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - assetType_ = value; - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @return This builder for chaining. - */ - public Builder clearAssetType() { - - assetType_ = getDefaultInstance().getAssetType(); - onChanged(); - return this; - } - /** - *
-     * The type of the asset. Example: `compute.googleapis.com/Disk`
-     * See [Supported asset
-     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-     * for more information.
-     * 
- * - * string asset_type = 2; - * @param value The bytes for assetType to set. - * @return This builder for chaining. - */ - public Builder setAssetTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - assetType_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAncestorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); - bitField0_ |= 0x00000001; - } - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @return A list containing the ancestors. - */ - public com.google.protobuf.ProtocolStringList - getAncestorsList() { - return ancestors_.getUnmodifiableView(); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @return The count of ancestors. - */ - public int getAncestorsCount() { - return ancestors_.size(); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - public java.lang.String getAncestors(int index) { - return ancestors_.get(index); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - public com.google.protobuf.ByteString - getAncestorsBytes(int index) { - return ancestors_.getByteString(index); - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param index The index to set the value at. - * @param value The ancestors to set. - * @return This builder for chaining. - */ - public Builder setAncestors( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.set(index, value); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param value The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestors( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param values The ancestors to add. - * @return This builder for chaining. - */ - public Builder addAllAncestors( - java.lang.Iterable values) { - ensureAncestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ancestors_); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @return This builder for chaining. - */ - public Builder clearAncestors() { - ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-     * The ancestors of an asset in Google Cloud [resource
-     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-     * represented as a list of relative resource names. An ancestry path starts
-     * with the closest ancestor in the hierarchy and ends at root.
-     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-     * 
- * - * repeated string ancestors = 3; - * @param value The bytes of the ancestors to add. - * @return This builder for chaining. - */ - public Builder addAncestorsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAncestorsIsMutable(); - ancestors_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.RelatedAsset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.RelatedAsset) - private static final com.google.cloud.asset.v1p7beta1.RelatedAsset DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.RelatedAsset(); - } - - public static com.google.cloud.asset.v1p7beta1.RelatedAsset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedAsset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAsset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAsset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java deleted file mode 100644 index 584ef775ccf2..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface RelatedAssetOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.RelatedAsset) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The asset. - */ - java.lang.String getAsset(); - /** - *
-   * The full name of the asset. Example:
-   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
-   * See [Resource
-   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * 
- * - * string asset = 1 [(.google.api.resource_reference) = { ... } - * @return The bytes for asset. - */ - com.google.protobuf.ByteString - getAssetBytes(); - - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The assetType. - */ - java.lang.String getAssetType(); - /** - *
-   * The type of the asset. Example: `compute.googleapis.com/Disk`
-   * See [Supported asset
-   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
-   * for more information.
-   * 
- * - * string asset_type = 2; - * @return The bytes for assetType. - */ - com.google.protobuf.ByteString - getAssetTypeBytes(); - - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return A list containing the ancestors. - */ - java.util.List - getAncestorsList(); - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @return The count of ancestors. - */ - int getAncestorsCount(); - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the element to return. - * @return The ancestors at the given index. - */ - java.lang.String getAncestors(int index); - /** - *
-   * The ancestors of an asset in Google Cloud [resource
-   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
-   * represented as a list of relative resource names. An ancestry path starts
-   * with the closest ancestor in the hierarchy and ends at root.
-   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
-   * 
- * - * repeated string ancestors = 3; - * @param index The index of the value to return. - * @return The bytes of the ancestors at the given index. - */ - com.google.protobuf.ByteString - getAncestorsBytes(int index); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java deleted file mode 100644 index f0bc87151ce5..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssets.java +++ /dev/null @@ -1,1108 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * The detailed related assets with the `relationship_type`.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAssets} - */ -public final class RelatedAssets extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.RelatedAssets) - RelatedAssetsOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelatedAssets.newBuilder() to construct. - private RelatedAssets(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelatedAssets() { - assets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelatedAssets(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelatedAssets( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder subBuilder = null; - if (relationshipAttributes_ != null) { - subBuilder = relationshipAttributes_.toBuilder(); - } - relationshipAttributes_ = input.readMessage(com.google.cloud.asset.v1p7beta1.RelationshipAttributes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(relationshipAttributes_); - relationshipAttributes_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - assets_.add( - input.readMessage(com.google.cloud.asset.v1p7beta1.RelatedAsset.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.RelatedAssets.class, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder.class); - } - - public static final int RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER = 1; - private com.google.cloud.asset.v1p7beta1.RelationshipAttributes relationshipAttributes_; - /** - *
-   * The detailed relation attributes.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - * @return Whether the relationshipAttributes field is set. - */ - @java.lang.Override - public boolean hasRelationshipAttributes() { - return relationshipAttributes_ != null; - } - /** - *
-   * The detailed relation attributes.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - * @return The relationshipAttributes. - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getRelationshipAttributes() { - return relationshipAttributes_ == null ? com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; - } - /** - *
-   * The detailed relation attributes.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { - return getRelationshipAttributes(); - } - - public static final int ASSETS_FIELD_NUMBER = 2; - private java.util.List assets_; - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - @java.lang.Override - public java.util.List getAssetsList() { - return assets_; - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - @java.lang.Override - public java.util.List - getAssetsOrBuilderList() { - return assets_; - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - @java.lang.Override - public int getAssetsCount() { - return assets_.size(); - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAsset getAssets(int index) { - return assets_.get(index); - } - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder getAssetsOrBuilder( - int index) { - return assets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (relationshipAttributes_ != null) { - output.writeMessage(1, getRelationshipAttributes()); - } - for (int i = 0; i < assets_.size(); i++) { - output.writeMessage(2, assets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (relationshipAttributes_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getRelationshipAttributes()); - } - for (int i = 0; i < assets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, assets_.get(i)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.RelatedAssets)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.RelatedAssets other = (com.google.cloud.asset.v1p7beta1.RelatedAssets) obj; - - if (hasRelationshipAttributes() != other.hasRelationshipAttributes()) return false; - if (hasRelationshipAttributes()) { - if (!getRelationshipAttributes() - .equals(other.getRelationshipAttributes())) return false; - } - if (!getAssetsList() - .equals(other.getAssetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasRelationshipAttributes()) { - hash = (37 * hash) + RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getRelationshipAttributes().hashCode(); - } - if (getAssetsCount() > 0) { - hash = (37 * hash) + ASSETS_FIELD_NUMBER; - hash = (53 * hash) + getAssetsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelatedAssets parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.RelatedAssets prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The detailed related assets with the `relationship_type`.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.RelatedAssets} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.RelatedAssets) - com.google.cloud.asset.v1p7beta1.RelatedAssetsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.RelatedAssets.class, com.google.cloud.asset.v1p7beta1.RelatedAssets.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.RelatedAssets.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAssetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (relationshipAttributesBuilder_ == null) { - relationshipAttributes_ = null; - } else { - relationshipAttributes_ = null; - relationshipAttributesBuilder_ = null; - } - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - assetsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelatedAssets_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAssets getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAssets build() { - com.google.cloud.asset.v1p7beta1.RelatedAssets result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAssets buildPartial() { - com.google.cloud.asset.v1p7beta1.RelatedAssets result = new com.google.cloud.asset.v1p7beta1.RelatedAssets(this); - int from_bitField0_ = bitField0_; - if (relationshipAttributesBuilder_ == null) { - result.relationshipAttributes_ = relationshipAttributes_; - } else { - result.relationshipAttributes_ = relationshipAttributesBuilder_.build(); - } - if (assetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - assets_ = java.util.Collections.unmodifiableList(assets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.assets_ = assets_; - } else { - result.assets_ = assetsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.RelatedAssets) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.RelatedAssets)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelatedAssets other) { - if (other == com.google.cloud.asset.v1p7beta1.RelatedAssets.getDefaultInstance()) return this; - if (other.hasRelationshipAttributes()) { - mergeRelationshipAttributes(other.getRelationshipAttributes()); - } - if (assetsBuilder_ == null) { - if (!other.assets_.isEmpty()) { - if (assets_.isEmpty()) { - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAssetsIsMutable(); - assets_.addAll(other.assets_); - } - onChanged(); - } - } else { - if (!other.assets_.isEmpty()) { - if (assetsBuilder_.isEmpty()) { - assetsBuilder_.dispose(); - assetsBuilder_ = null; - assets_ = other.assets_; - bitField0_ = (bitField0_ & ~0x00000001); - assetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAssetsFieldBuilder() : null; - } else { - assetsBuilder_.addAllMessages(other.assets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.RelatedAssets parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.RelatedAssets) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.cloud.asset.v1p7beta1.RelationshipAttributes relationshipAttributes_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelationshipAttributes, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder, com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder> relationshipAttributesBuilder_; - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - * @return Whether the relationshipAttributes field is set. - */ - public boolean hasRelationshipAttributes() { - return relationshipAttributesBuilder_ != null || relationshipAttributes_ != null; - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - * @return The relationshipAttributes. - */ - public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getRelationshipAttributes() { - if (relationshipAttributesBuilder_ == null) { - return relationshipAttributes_ == null ? com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; - } else { - return relationshipAttributesBuilder_.getMessage(); - } - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder setRelationshipAttributes(com.google.cloud.asset.v1p7beta1.RelationshipAttributes value) { - if (relationshipAttributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - relationshipAttributes_ = value; - onChanged(); - } else { - relationshipAttributesBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder setRelationshipAttributes( - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder builderForValue) { - if (relationshipAttributesBuilder_ == null) { - relationshipAttributes_ = builderForValue.build(); - onChanged(); - } else { - relationshipAttributesBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder mergeRelationshipAttributes(com.google.cloud.asset.v1p7beta1.RelationshipAttributes value) { - if (relationshipAttributesBuilder_ == null) { - if (relationshipAttributes_ != null) { - relationshipAttributes_ = - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.newBuilder(relationshipAttributes_).mergeFrom(value).buildPartial(); - } else { - relationshipAttributes_ = value; - } - onChanged(); - } else { - relationshipAttributesBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - public Builder clearRelationshipAttributes() { - if (relationshipAttributesBuilder_ == null) { - relationshipAttributes_ = null; - onChanged(); - } else { - relationshipAttributes_ = null; - relationshipAttributesBuilder_ = null; - } - - return this; - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - public com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder getRelationshipAttributesBuilder() { - - onChanged(); - return getRelationshipAttributesFieldBuilder().getBuilder(); - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - public com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder() { - if (relationshipAttributesBuilder_ != null) { - return relationshipAttributesBuilder_.getMessageOrBuilder(); - } else { - return relationshipAttributes_ == null ? - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance() : relationshipAttributes_; - } - } - /** - *
-     * The detailed relation attributes.
-     * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelationshipAttributes, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder, com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder> - getRelationshipAttributesFieldBuilder() { - if (relationshipAttributesBuilder_ == null) { - relationshipAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelationshipAttributes, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder, com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder>( - getRelationshipAttributes(), - getParentForChildren(), - isClean()); - relationshipAttributes_ = null; - } - return relationshipAttributesBuilder_; - } - - private java.util.List assets_ = - java.util.Collections.emptyList(); - private void ensureAssetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - assets_ = new java.util.ArrayList(assets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelatedAsset, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder> assetsBuilder_; - - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public java.util.List getAssetsList() { - if (assetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(assets_); - } else { - return assetsBuilder_.getMessageList(); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public int getAssetsCount() { - if (assetsBuilder_ == null) { - return assets_.size(); - } else { - return assetsBuilder_.getCount(); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1p7beta1.RelatedAsset getAssets(int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); - } else { - return assetsBuilder_.getMessage(index); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1p7beta1.RelatedAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.set(index, value); - onChanged(); - } else { - assetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder setAssets( - int index, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.set(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder addAssets(com.google.cloud.asset.v1p7beta1.RelatedAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(value); - onChanged(); - } else { - assetsBuilder_.addMessage(value); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1p7beta1.RelatedAsset value) { - if (assetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAssetsIsMutable(); - assets_.add(index, value); - onChanged(); - } else { - assetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder addAssets( - com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder addAssets( - int index, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder builderForValue) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.add(index, builderForValue.build()); - onChanged(); - } else { - assetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder addAllAssets( - java.lang.Iterable values) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, assets_); - onChanged(); - } else { - assetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder clearAssets() { - if (assetsBuilder_ == null) { - assets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - assetsBuilder_.clear(); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public Builder removeAssets(int index) { - if (assetsBuilder_ == null) { - ensureAssetsIsMutable(); - assets_.remove(index); - onChanged(); - } else { - assetsBuilder_.remove(index); - } - return this; - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder getAssetsBuilder( - int index) { - return getAssetsFieldBuilder().getBuilder(index); - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder getAssetsOrBuilder( - int index) { - if (assetsBuilder_ == null) { - return assets_.get(index); } else { - return assetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public java.util.List - getAssetsOrBuilderList() { - if (assetsBuilder_ != null) { - return assetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(assets_); - } - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder addAssetsBuilder() { - return getAssetsFieldBuilder().addBuilder( - com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance()); - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder addAssetsBuilder( - int index) { - return getAssetsFieldBuilder().addBuilder( - index, com.google.cloud.asset.v1p7beta1.RelatedAsset.getDefaultInstance()); - } - /** - *
-     * The peer resources of the relationship.
-     * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - public java.util.List - getAssetsBuilderList() { - return getAssetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelatedAsset, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder> - getAssetsFieldBuilder() { - if (assetsBuilder_ == null) { - assetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.asset.v1p7beta1.RelatedAsset, com.google.cloud.asset.v1p7beta1.RelatedAsset.Builder, com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder>( - assets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - assets_ = null; - } - return assetsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.RelatedAssets) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.RelatedAssets) - private static final com.google.cloud.asset.v1p7beta1.RelatedAssets DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.RelatedAssets(); - } - - public static com.google.cloud.asset.v1p7beta1.RelatedAssets getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedAssets parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelatedAssets(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelatedAssets getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java deleted file mode 100644 index 209d5d21f46a..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelatedAssetsOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface RelatedAssetsOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.RelatedAssets) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The detailed relation attributes.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - * @return Whether the relationshipAttributes field is set. - */ - boolean hasRelationshipAttributes(); - /** - *
-   * The detailed relation attributes.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - * @return The relationshipAttributes. - */ - com.google.cloud.asset.v1p7beta1.RelationshipAttributes getRelationshipAttributes(); - /** - *
-   * The detailed relation attributes.
-   * 
- * - * .google.cloud.asset.v1p7beta1.RelationshipAttributes relationship_attributes = 1; - */ - com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder(); - - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - java.util.List - getAssetsList(); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - com.google.cloud.asset.v1p7beta1.RelatedAsset getAssets(int index); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - int getAssetsCount(); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - java.util.List - getAssetsOrBuilderList(); - /** - *
-   * The peer resources of the relationship.
-   * 
- * - * repeated .google.cloud.asset.v1p7beta1.RelatedAsset assets = 2; - */ - com.google.cloud.asset.v1p7beta1.RelatedAssetOrBuilder getAssetsOrBuilder( - int index); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java deleted file mode 100644 index df7f5082cf40..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributes.java +++ /dev/null @@ -1,1102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * The relationship attributes which include  `type`, `source_resource_type`,
- * `target_resource_type` and `action`.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.RelationshipAttributes} - */ -public final class RelationshipAttributes extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.RelationshipAttributes) - RelationshipAttributesOrBuilder { -private static final long serialVersionUID = 0L; - // Use RelationshipAttributes.newBuilder() to construct. - private RelationshipAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RelationshipAttributes() { - type_ = ""; - sourceResourceType_ = ""; - targetResourceType_ = ""; - action_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RelationshipAttributes(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RelationshipAttributes( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceResourceType_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - targetResourceType_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - action_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.class, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object type_; - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The type. - */ - @java.lang.Override - public java.lang.String getType() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } - } - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The bytes for type. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_RESOURCE_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object sourceResourceType_; - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The sourceResourceType. - */ - @java.lang.Override - public java.lang.String getSourceResourceType() { - java.lang.Object ref = sourceResourceType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceResourceType_ = s; - return s; - } - } - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The bytes for sourceResourceType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSourceResourceTypeBytes() { - java.lang.Object ref = sourceResourceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_RESOURCE_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object targetResourceType_; - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The targetResourceType. - */ - @java.lang.Override - public java.lang.String getTargetResourceType() { - java.lang.Object ref = targetResourceType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetResourceType_ = s; - return s; - } - } - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The bytes for targetResourceType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTargetResourceTypeBytes() { - java.lang.Object ref = targetResourceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTION_FIELD_NUMBER = 3; - private volatile java.lang.Object action_; - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The action. - */ - @java.lang.Override - public java.lang.String getAction() { - java.lang.Object ref = action_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - action_ = s; - return s; - } - } - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The bytes for action. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getActionBytes() { - java.lang.Object ref = action_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - action_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceResourceType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetResourceType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetResourceType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, action_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.RelationshipAttributes)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.RelationshipAttributes other = (com.google.cloud.asset.v1p7beta1.RelationshipAttributes) obj; - - if (!getType() - .equals(other.getType())) return false; - if (!getSourceResourceType() - .equals(other.getSourceResourceType())) return false; - if (!getTargetResourceType() - .equals(other.getTargetResourceType())) return false; - if (!getAction() - .equals(other.getAction())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - hash = (37 * hash) + SOURCE_RESOURCE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getSourceResourceType().hashCode(); - hash = (37 * hash) + TARGET_RESOURCE_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getTargetResourceType().hashCode(); - hash = (37 * hash) + ACTION_FIELD_NUMBER; - hash = (53 * hash) + getAction().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.RelationshipAttributes prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * The relationship attributes which include  `type`, `source_resource_type`,
-   * `target_resource_type` and `action`.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.RelationshipAttributes} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.RelationshipAttributes) - com.google.cloud.asset.v1p7beta1.RelationshipAttributesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.RelationshipAttributes.class, com.google.cloud.asset.v1p7beta1.RelationshipAttributes.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.RelationshipAttributes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = ""; - - sourceResourceType_ = ""; - - targetResourceType_ = ""; - - action_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_RelationshipAttributes_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelationshipAttributes build() { - com.google.cloud.asset.v1p7beta1.RelationshipAttributes result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelationshipAttributes buildPartial() { - com.google.cloud.asset.v1p7beta1.RelationshipAttributes result = new com.google.cloud.asset.v1p7beta1.RelationshipAttributes(this); - result.type_ = type_; - result.sourceResourceType_ = sourceResourceType_; - result.targetResourceType_ = targetResourceType_; - result.action_ = action_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.RelationshipAttributes) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.RelationshipAttributes)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.RelationshipAttributes other) { - if (other == com.google.cloud.asset.v1p7beta1.RelationshipAttributes.getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - if (!other.getSourceResourceType().isEmpty()) { - sourceResourceType_ = other.sourceResourceType_; - onChanged(); - } - if (!other.getTargetResourceType().isEmpty()) { - targetResourceType_ = other.targetResourceType_; - onChanged(); - } - if (!other.getAction().isEmpty()) { - action_ = other.action_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.RelationshipAttributes parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.RelationshipAttributes) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object type_ = ""; - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @return The type. - */ - public java.lang.String getType() { - java.lang.Object ref = type_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - type_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @return The bytes for type. - */ - public com.google.protobuf.ByteString - getTypeBytes() { - java.lang.Object ref = type_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - type_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value; - onChanged(); - return this; - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - *
-     * The unique identifier of the relationship type. Example:
-     * `INSTANCE_TO_INSTANCEGROUP`
-     * 
- * - * string type = 4; - * @param value The bytes for type to set. - * @return This builder for chaining. - */ - public Builder setTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - type_ = value; - onChanged(); - return this; - } - - private java.lang.Object sourceResourceType_ = ""; - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @return The sourceResourceType. - */ - public java.lang.String getSourceResourceType() { - java.lang.Object ref = sourceResourceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceResourceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @return The bytes for sourceResourceType. - */ - public com.google.protobuf.ByteString - getSourceResourceTypeBytes() { - java.lang.Object ref = sourceResourceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sourceResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @param value The sourceResourceType to set. - * @return This builder for chaining. - */ - public Builder setSourceResourceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceResourceType_ = value; - onChanged(); - return this; - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @return This builder for chaining. - */ - public Builder clearSourceResourceType() { - - sourceResourceType_ = getDefaultInstance().getSourceResourceType(); - onChanged(); - return this; - } - /** - *
-     * The source asset type. Example: `compute.googleapis.com/Instance`
-     * 
- * - * string source_resource_type = 1; - * @param value The bytes for sourceResourceType to set. - * @return This builder for chaining. - */ - public Builder setSourceResourceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceResourceType_ = value; - onChanged(); - return this; - } - - private java.lang.Object targetResourceType_ = ""; - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @return The targetResourceType. - */ - public java.lang.String getTargetResourceType() { - java.lang.Object ref = targetResourceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetResourceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @return The bytes for targetResourceType. - */ - public com.google.protobuf.ByteString - getTargetResourceTypeBytes() { - java.lang.Object ref = targetResourceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - targetResourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @param value The targetResourceType to set. - * @return This builder for chaining. - */ - public Builder setTargetResourceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetResourceType_ = value; - onChanged(); - return this; - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @return This builder for chaining. - */ - public Builder clearTargetResourceType() { - - targetResourceType_ = getDefaultInstance().getTargetResourceType(); - onChanged(); - return this; - } - /** - *
-     * The target asset type. Example: `compute.googleapis.com/Disk`
-     * 
- * - * string target_resource_type = 2; - * @param value The bytes for targetResourceType to set. - * @return This builder for chaining. - */ - public Builder setTargetResourceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetResourceType_ = value; - onChanged(); - return this; - } - - private java.lang.Object action_ = ""; - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @return The action. - */ - public java.lang.String getAction() { - java.lang.Object ref = action_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - action_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @return The bytes for action. - */ - public com.google.protobuf.ByteString - getActionBytes() { - java.lang.Object ref = action_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - action_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @param value The action to set. - * @return This builder for chaining. - */ - public Builder setAction( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - action_ = value; - onChanged(); - return this; - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @return This builder for chaining. - */ - public Builder clearAction() { - - action_ = getDefaultInstance().getAction(); - onChanged(); - return this; - } - /** - *
-     * The detail of the relationship, e.g. `contains`, `attaches`
-     * 
- * - * string action = 3; - * @param value The bytes for action to set. - * @return This builder for chaining. - */ - public Builder setActionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - action_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.RelationshipAttributes) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.RelationshipAttributes) - private static final com.google.cloud.asset.v1p7beta1.RelationshipAttributes DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.RelationshipAttributes(); - } - - public static com.google.cloud.asset.v1p7beta1.RelationshipAttributes getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelationshipAttributes parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RelationshipAttributes(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.RelationshipAttributes getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java deleted file mode 100644 index 1f2a45eb68e5..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/RelationshipAttributesOrBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface RelationshipAttributesOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.RelationshipAttributes) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The type. - */ - java.lang.String getType(); - /** - *
-   * The unique identifier of the relationship type. Example:
-   * `INSTANCE_TO_INSTANCEGROUP`
-   * 
- * - * string type = 4; - * @return The bytes for type. - */ - com.google.protobuf.ByteString - getTypeBytes(); - - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The sourceResourceType. - */ - java.lang.String getSourceResourceType(); - /** - *
-   * The source asset type. Example: `compute.googleapis.com/Instance`
-   * 
- * - * string source_resource_type = 1; - * @return The bytes for sourceResourceType. - */ - com.google.protobuf.ByteString - getSourceResourceTypeBytes(); - - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The targetResourceType. - */ - java.lang.String getTargetResourceType(); - /** - *
-   * The target asset type. Example: `compute.googleapis.com/Disk`
-   * 
- * - * string target_resource_type = 2; - * @return The bytes for targetResourceType. - */ - com.google.protobuf.ByteString - getTargetResourceTypeBytes(); - - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The action. - */ - java.lang.String getAction(); - /** - *
-   * The detail of the relationship, e.g. `contains`, `attaches`
-   * 
- * - * string action = 3; - * @return The bytes for action. - */ - com.google.protobuf.ByteString - getActionBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java deleted file mode 100644 index 9b784adeaf2a..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/Resource.java +++ /dev/null @@ -1,1813 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -/** - *
- * A representation of a Google Cloud resource.
- * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.Resource} - */ -public final class Resource extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p7beta1.Resource) - ResourceOrBuilder { -private static final long serialVersionUID = 0L; - // Use Resource.newBuilder() to construct. - private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Resource() { - version_ = ""; - discoveryDocumentUri_ = ""; - discoveryName_ = ""; - resourceUrl_ = ""; - parent_ = ""; - location_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Resource(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Resource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - version_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryDocumentUri_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - discoveryName_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - resourceUrl_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 50: { - com.google.protobuf.Struct.Builder subBuilder = null; - if (data_ != null) { - subBuilder = data_.toBuilder(); - } - data_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(data_); - data_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.Resource.class, com.google.cloud.asset.v1p7beta1.Resource.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private volatile java.lang.Object version_; - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The version. - */ - @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } - } - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_DOCUMENT_URI_FIELD_NUMBER = 2; - private volatile java.lang.Object discoveryDocumentUri_; - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - @java.lang.Override - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } - } - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISCOVERY_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object discoveryName_; - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - @java.lang.Override - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } - } - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object resourceUrl_; - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - @java.lang.Override - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } - } - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 6; - private com.google.protobuf.Struct data_; - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - @java.lang.Override - public boolean hasData() { - return data_ != null; - } - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.Struct getData() { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - return getData(); - } - - public static final int LOCATION_FIELD_NUMBER = 8; - private volatile java.lang.Object location_; - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The location. - */ - @java.lang.Override - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } - } - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The bytes for location. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); - } - if (data_ != null) { - output.writeMessage(6, getData()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, location_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryDocumentUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discoveryDocumentUri_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(discoveryName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, discoveryName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceUrl_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUrl_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); - } - if (data_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getData()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, location_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.asset.v1p7beta1.Resource)) { - return super.equals(obj); - } - com.google.cloud.asset.v1p7beta1.Resource other = (com.google.cloud.asset.v1p7beta1.Resource) obj; - - if (!getVersion() - .equals(other.getVersion())) return false; - if (!getDiscoveryDocumentUri() - .equals(other.getDiscoveryDocumentUri())) return false; - if (!getDiscoveryName() - .equals(other.getDiscoveryName())) return false; - if (!getResourceUrl() - .equals(other.getResourceUrl())) return false; - if (!getParent() - .equals(other.getParent())) return false; - if (hasData() != other.hasData()) return false; - if (hasData()) { - if (!getData() - .equals(other.getData())) return false; - } - if (!getLocation() - .equals(other.getLocation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); - hash = (37 * hash) + DISCOVERY_DOCUMENT_URI_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryDocumentUri().hashCode(); - hash = (37 * hash) + DISCOVERY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDiscoveryName().hashCode(); - hash = (37 * hash) + RESOURCE_URL_FIELD_NUMBER; - hash = (53 * hash) + getResourceUrl().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasData()) { - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - } - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.cloud.asset.v1p7beta1.Resource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.cloud.asset.v1p7beta1.Resource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * A representation of a Google Cloud resource.
-   * 
- * - * Protobuf type {@code google.cloud.asset.v1p7beta1.Resource} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p7beta1.Resource) - com.google.cloud.asset.v1p7beta1.ResourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.asset.v1p7beta1.Resource.class, com.google.cloud.asset.v1p7beta1.Resource.Builder.class); - } - - // Construct using com.google.cloud.asset.v1p7beta1.Resource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = ""; - - discoveryDocumentUri_ = ""; - - discoveryName_ = ""; - - resourceUrl_ = ""; - - parent_ = ""; - - if (dataBuilder_ == null) { - data_ = null; - } else { - data_ = null; - dataBuilder_ = null; - } - location_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.cloud.asset.v1p7beta1.AssetProto.internal_static_google_cloud_asset_v1p7beta1_Resource_descriptor; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Resource getDefaultInstanceForType() { - return com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Resource build() { - com.google.cloud.asset.v1p7beta1.Resource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Resource buildPartial() { - com.google.cloud.asset.v1p7beta1.Resource result = new com.google.cloud.asset.v1p7beta1.Resource(this); - result.version_ = version_; - result.discoveryDocumentUri_ = discoveryDocumentUri_; - result.discoveryName_ = discoveryName_; - result.resourceUrl_ = resourceUrl_; - result.parent_ = parent_; - if (dataBuilder_ == null) { - result.data_ = data_; - } else { - result.data_ = dataBuilder_.build(); - } - result.location_ = location_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.asset.v1p7beta1.Resource) { - return mergeFrom((com.google.cloud.asset.v1p7beta1.Resource)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.asset.v1p7beta1.Resource other) { - if (other == com.google.cloud.asset.v1p7beta1.Resource.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; - onChanged(); - } - if (!other.getDiscoveryDocumentUri().isEmpty()) { - discoveryDocumentUri_ = other.discoveryDocumentUri_; - onChanged(); - } - if (!other.getDiscoveryName().isEmpty()) { - discoveryName_ = other.discoveryName_; - onChanged(); - } - if (!other.getResourceUrl().isEmpty()) { - resourceUrl_ = other.resourceUrl_; - onChanged(); - } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasData()) { - mergeData(other.getData()); - } - if (!other.getLocation().isEmpty()) { - location_ = other.location_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.asset.v1p7beta1.Resource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.asset.v1p7beta1.Resource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object version_ = ""; - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @return The version. - */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - version_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @return The bytes for version. - */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - version_ = value; - onChanged(); - return this; - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = getDefaultInstance().getVersion(); - onChanged(); - return this; - } - /** - *
-     * The API version. Example: `v1`
-     * 
- * - * string version = 1; - * @param value The bytes for version to set. - * @return This builder for chaining. - */ - public Builder setVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - version_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryDocumentUri_ = ""; - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - public java.lang.String getDiscoveryDocumentUri() { - java.lang.Object ref = discoveryDocumentUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryDocumentUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - public com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes() { - java.lang.Object ref = discoveryDocumentUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryDocumentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUri( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @return This builder for chaining. - */ - public Builder clearDiscoveryDocumentUri() { - - discoveryDocumentUri_ = getDefaultInstance().getDiscoveryDocumentUri(); - onChanged(); - return this; - } - /** - *
-     * The URL of the discovery document containing the resource's JSON schema.
-     * Example:
-     * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_document_uri = 2; - * @param value The bytes for discoveryDocumentUri to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryDocumentUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryDocumentUri_ = value; - onChanged(); - return this; - } - - private java.lang.Object discoveryName_ = ""; - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - public java.lang.String getDiscoveryName() { - java.lang.Object ref = discoveryName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - discoveryName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - public com.google.protobuf.ByteString - getDiscoveryNameBytes() { - java.lang.Object ref = discoveryName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - discoveryName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @param value The discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - discoveryName_ = value; - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @return This builder for chaining. - */ - public Builder clearDiscoveryName() { - - discoveryName_ = getDefaultInstance().getDiscoveryName(); - onChanged(); - return this; - } - /** - *
-     * The JSON schema name listed in the discovery document. Example:
-     * `Project`
-     * This value is unspecified for resources that do not have an API based on a
-     * discovery document, such as Cloud Bigtable.
-     * 
- * - * string discovery_name = 3; - * @param value The bytes for discoveryName to set. - * @return This builder for chaining. - */ - public Builder setDiscoveryNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - discoveryName_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceUrl_ = ""; - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - public java.lang.String getResourceUrl() { - java.lang.Object ref = resourceUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - public com.google.protobuf.ByteString - getResourceUrlBytes() { - java.lang.Object ref = resourceUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceUrl_ = value; - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @return This builder for chaining. - */ - public Builder clearResourceUrl() { - - resourceUrl_ = getDefaultInstance().getResourceUrl(); - onChanged(); - return this; - } - /** - *
-     * The REST URL for accessing the resource. An HTTP `GET` request using this
-     * URL returns the resource itself. Example:
-     * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-     * This value is unspecified for resources without a REST API.
-     * 
- * - * string resource_url = 4; - * @param value The bytes for resourceUrl to set. - * @return This builder for chaining. - */ - public Builder setResourceUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceUrl_ = value; - onChanged(); - return this; - } - - private java.lang.Object parent_ = ""; - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - *
-     * The full name of the immediate parent of this resource. See
-     * [Resource
-     * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-     * for more information.
-     * For Google Cloud assets, this value is the parent resource defined in the
-     * [Cloud IAM policy
-     * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-     * Example:
-     * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-     * For third-party assets, this field may be set differently.
-     * 
- * - * string parent = 5; - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Struct data_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - public boolean hasData() { - return dataBuilder_ != null || data_ != null; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - public com.google.protobuf.Struct getData() { - if (dataBuilder_ == null) { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } else { - return dataBuilder_.getMessage(); - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - dataBuilder_.setMessage(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder setData( - com.google.protobuf.Struct.Builder builderForValue) { - if (dataBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - dataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder mergeData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (data_ != null) { - data_ = - com.google.protobuf.Struct.newBuilder(data_).mergeFrom(value).buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - dataBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public Builder clearData() { - if (dataBuilder_ == null) { - data_ = null; - onChanged(); - } else { - data_ = null; - dataBuilder_ = null; - } - - return this; - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.Struct.Builder getDataBuilder() { - - onChanged(); - return getDataFieldBuilder().getBuilder(); - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilder(); - } else { - return data_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : data_; - } - } - /** - *
-     * The content of the resource, in which some sensitive fields are removed
-     * and may not be present.
-     * 
- * - * .google.protobuf.Struct data = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getData(), - getParentForChildren(), - isClean()); - data_ = null; - } - return dataBuilder_; - } - - private java.lang.Object location_ = ""; - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @return The location. - */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @return The bytes for location. - */ - public com.google.protobuf.ByteString - getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @param value The location to set. - * @return This builder for chaining. - */ - public Builder setLocation( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - location_ = value; - onChanged(); - return this; - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @return This builder for chaining. - */ - public Builder clearLocation() { - - location_ = getDefaultInstance().getLocation(); - onChanged(); - return this; - } - /** - *
-     * The location of the resource in Google Cloud, such as its zone and region.
-     * For more information, see https://cloud.google.com/about/locations/.
-     * 
- * - * string location = 8; - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - location_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p7beta1.Resource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p7beta1.Resource) - private static final com.google.cloud.asset.v1p7beta1.Resource DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.cloud.asset.v1p7beta1.Resource(); - } - - public static com.google.cloud.asset.v1p7beta1.Resource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Resource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Resource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.asset.v1p7beta1.Resource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java deleted file mode 100644 index 18800a75a5f3..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/java/com/google/cloud/asset/v1p7beta1/ResourceOrBuilder.java +++ /dev/null @@ -1,199 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/asset/v1p7beta1/assets.proto - -package com.google.cloud.asset.v1p7beta1; - -public interface ResourceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p7beta1.Resource) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The version. - */ - java.lang.String getVersion(); - /** - *
-   * The API version. Example: `v1`
-   * 
- * - * string version = 1; - * @return The bytes for version. - */ - com.google.protobuf.ByteString - getVersionBytes(); - - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The discoveryDocumentUri. - */ - java.lang.String getDiscoveryDocumentUri(); - /** - *
-   * The URL of the discovery document containing the resource's JSON schema.
-   * Example:
-   * `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_document_uri = 2; - * @return The bytes for discoveryDocumentUri. - */ - com.google.protobuf.ByteString - getDiscoveryDocumentUriBytes(); - - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The discoveryName. - */ - java.lang.String getDiscoveryName(); - /** - *
-   * The JSON schema name listed in the discovery document. Example:
-   * `Project`
-   * This value is unspecified for resources that do not have an API based on a
-   * discovery document, such as Cloud Bigtable.
-   * 
- * - * string discovery_name = 3; - * @return The bytes for discoveryName. - */ - com.google.protobuf.ByteString - getDiscoveryNameBytes(); - - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The resourceUrl. - */ - java.lang.String getResourceUrl(); - /** - *
-   * The REST URL for accessing the resource. An HTTP `GET` request using this
-   * URL returns the resource itself. Example:
-   * `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
-   * This value is unspecified for resources without a REST API.
-   * 
- * - * string resource_url = 4; - * @return The bytes for resourceUrl. - */ - com.google.protobuf.ByteString - getResourceUrlBytes(); - - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The parent. - */ - java.lang.String getParent(); - /** - *
-   * The full name of the immediate parent of this resource. See
-   * [Resource
-   * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
-   * for more information.
-   * For Google Cloud assets, this value is the parent resource defined in the
-   * [Cloud IAM policy
-   * hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
-   * Example:
-   * `//cloudresourcemanager.googleapis.com/projects/my_project_123`
-   * For third-party assets, this field may be set differently.
-   * 
- * - * string parent = 5; - * @return The bytes for parent. - */ - com.google.protobuf.ByteString - getParentBytes(); - - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return Whether the data field is set. - */ - boolean hasData(); - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - * @return The data. - */ - com.google.protobuf.Struct getData(); - /** - *
-   * The content of the resource, in which some sensitive fields are removed
-   * and may not be present.
-   * 
- * - * .google.protobuf.Struct data = 6; - */ - com.google.protobuf.StructOrBuilder getDataOrBuilder(); - - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The location. - */ - java.lang.String getLocation(); - /** - *
-   * The location of the resource in Google Cloud, such as its zone and region.
-   * For more information, see https://cloud.google.com/about/locations/.
-   * 
- * - * string location = 8; - * @return The bytes for location. - */ - com.google.protobuf.ByteString - getLocationBytes(); -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto deleted file mode 100644 index 18fcff6c4009..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/asset_service.proto +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1p7beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/asset/v1p7beta1/assets.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.Asset.V1P7Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p7beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetServiceProto"; -option java_package = "com.google.cloud.asset.v1p7beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p7beta1"; - -// Asset service definition. -service AssetService { - option (google.api.default_host) = "cloudasset.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // 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.v1p7beta1.Asset][google.cloud.asset.v1p7beta1.Asset] in - // the JSON format; for BigQuery table destinations, the output table stores - // the fields in asset proto 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. - rpc ExportAssets(ExportAssetsRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1p7beta1/{parent=*/*}:exportAssets" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.asset.v1p7beta1.ExportAssetsResponse" - metadata_type: "google.cloud.asset.v1p7beta1.ExportAssetsRequest" - }; - } -} - -// Export asset request. -message ExportAssetsRequest { - // Required. The relative name of the root asset. This can only be an - // organization number (such as "organizations/123"), a project ID (such as - // "projects/my-project-id"), or a project number (such as "projects/12345"), - // or a folder number (such as "folders/123"). - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "cloudasset.googleapis.com/Asset" - } - ]; - - // Timestamp to take an asset snapshot. This can only be set to a timestamp - // between the current time and the current time minus 35 days (inclusive). - // If not specified, the current time will be used. Due to delays in resource - // data collection and indexing, there is a volatile window during which - // running the same query may get different results. - google.protobuf.Timestamp read_time = 2; - - // A list of asset types to take a snapshot for. For example: - // "compute.googleapis.com/Disk". - // - // Regular expressions are also supported. For example: - // - // * "compute.googleapis.com.*" snapshots resources whose asset type starts - // with "compute.googleapis.com". - // * ".*Instance" snapshots resources whose asset type ends with "Instance". - // * ".*Instance.*" snapshots resources whose asset type contains "Instance". - // - // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported - // regular expression syntax. If the regular expression does not match any - // supported asset type, an INVALID_ARGUMENT error will be returned. - // - // If specified, only matching assets will be returned, otherwise, it will - // snapshot all asset types. See [Introduction to Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) - // for all supported asset types. - repeated string asset_types = 3; - - // Asset content type. If not specified, no content but the asset name will be - // returned. - ContentType content_type = 4; - - // Required. Output configuration indicating where the results will be output - // to. - OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; - - // A list of relationship types to export, for example: - // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if - // content_type=RELATIONSHIP. If specified, it will snapshot [asset_types]' - // specified relationships, or give errors if any relationship_types' - // supported types are not in [asset_types]. If not specified, it will - // snapshot all [asset_types]' supported relationships. An unspecified - // [asset_types] field means all supported asset_types. See [Introduction to - // Cloud Asset - // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all - // supported asset types and relationship types. - repeated string relationship_types = 6; -} - -// The export asset response. This message is returned by the -// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] -// method in the returned -// [google.longrunning.Operation.response][google.longrunning.Operation.response] -// field. -message ExportAssetsResponse { - // Time the snapshot was taken. - google.protobuf.Timestamp read_time = 1; - - // Output configuration indicating where the results were output to. - OutputConfig output_config = 2; - - // Output result indicating where the assets were exported to. For example, a - // set of actual Google Cloud Storage object uris where the assets are - // exported to. The uris can be different from what [output_config] has - // specified, as the service will split the output object into multiple ones - // once it exceeds a single Google Cloud Storage object limit. - OutputResult output_result = 3; -} - -// Output configuration for export assets destination. -message OutputConfig { - // Asset export destination. - oneof destination { - // Destination on Cloud Storage. - GcsDestination gcs_destination = 1; - - // Destination on BigQuery. The output table stores the fields in asset - // proto as columns in BigQuery. - BigQueryDestination bigquery_destination = 2; - } -} - -// Output result of export assets. -message OutputResult { - // Asset export result. - oneof result { - // Export result on Cloud Storage. - GcsOutputResult gcs_result = 1; - } -} - -// A Cloud Storage output result. -message GcsOutputResult { - // List of uris of the Cloud Storage objects. Example: - // "gs://bucket_name/object_name". - repeated string uris = 1; -} - -// A Cloud Storage location. -message GcsDestination { - // Required. - oneof object_uri { - // The uri of the Cloud Storage object. It's the same uri that is used by - // gsutil. Example: "gs://bucket_name/object_name". See [Viewing and - // Editing Object - // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) - // for more information. - string uri = 1; - - // The uri prefix of all generated Cloud Storage objects. Example: - // "gs://bucket_name/object_name_prefix". Each object uri is in format: - // "gs://bucket_name/object_name_prefix/{ASSET_TYPE}/{SHARD_NUMBER} and only - // contains assets for that type. starts from 0. Example: - // "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is - // the first shard of output objects containing all - // compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be - // returned if file with the same name "gs://bucket_name/object_name_prefix" - // already exists. - string uri_prefix = 2; - } -} - -// A BigQuery destination for exporting assets to. -message BigQueryDestination { - // Required. The BigQuery dataset in format - // "projects/projectId/datasets/datasetId", to which the snapshot result - // should be exported. If this dataset does not exist, the export call returns - // an INVALID_ARGUMENT error. - string dataset = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The BigQuery table to which the snapshot result should be - // written. If this table does not exist, a new table with the given name - // will be created. - string table = 2 [(google.api.field_behavior) = REQUIRED]; - - // If the destination table already exists and this flag is `TRUE`, the - // table will be overwritten by the contents of assets snapshot. If the flag - // is `FALSE` or unset and the destination table already exists, the export - // call returns an INVALID_ARGUMEMT error. - bool force = 3; - - // [partition_spec] determines whether to export to partitioned table(s) and - // how to partition the data. - // - // If [partition_spec] is unset or [partition_spec.partition_key] is unset or - // `PARTITION_KEY_UNSPECIFIED`, the snapshot results will be exported to - // non-partitioned table(s). [force] will decide whether to overwrite existing - // table(s). - // - // If [partition_spec] is specified. First, the snapshot results will be - // written to partitioned table(s) with two additional timestamp columns, - // readTime and requestTime, one of which will be the partition key. Secondly, - // in the case when any destination table already exists, it will first try to - // update existing table's schema as necessary by appending additional - // columns. Then, if [force] is `TRUE`, the corresponding partition will be - // overwritten by the snapshot results (data in different partitions will - // remain intact); if [force] is unset or `FALSE`, it will append the data. An - // error will be returned if the schema update or data appension fails. - PartitionSpec partition_spec = 4; - - // If this flag is `TRUE`, the snapshot results will be written to one or - // multiple tables, each of which contains results of one asset type. The - // [force] and [partition_spec] fields will apply to each of them. - // - // Field [table] will be concatenated with "_" and the asset type names (see - // https://cloud.google.com/asset-inventory/docs/supported-asset-types for - // supported asset types) to construct per-asset-type table names, in which - // all non-alphanumeric characters like "." and "/" will be substituted by - // "_". Example: if field [table] is "mytable" and snapshot results - // contain "storage.googleapis.com/Bucket" assets, the corresponding table - // name will be "mytable_storage_googleapis_com_Bucket". If any of these - // tables does not exist, a new table with the concatenated name will be - // created. - // - // When [content_type] in the ExportAssetsRequest is `RESOURCE`, the schema of - // each table will include RECORD-type columns mapped to the nested fields in - // the Asset.resource.data field of that asset type (up to the 15 nested level - // BigQuery supports - // (https://cloud.google.com/bigquery/docs/nested-repeated#limitations)). The - // fields in >15 nested levels will be stored in JSON format string as a child - // column of its parent RECORD column. - // - // If error occurs when exporting to any table, the whole export call will - // return an error but the export results that already succeed will persist. - // Example: if exporting to table_type_A succeeds when exporting to - // table_type_B fails during one export call, the results in table_type_A will - // persist and there will not be partial results persisting in a table. - bool separate_tables_per_asset_type = 5; -} - -// Specifications of BigQuery partitioned table as export destination. -message PartitionSpec { - // This enum is used to determine the partition key column when exporting - // assets to BigQuery partitioned table(s). Note that, if the partition key is - // a timestamp column, the actual partition is based on its date value - // (expressed in UTC. see details in - // https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables). - enum PartitionKey { - // Unspecified partition key. If used, it means using non-partitioned table. - PARTITION_KEY_UNSPECIFIED = 0; - - // The time when the snapshot is taken. If specified as partition key, the - // result table(s) is partitoned by the additional timestamp column, - // readTime. If [read_time] in ExportAssetsRequest is specified, the - // readTime column's value will be the same as it. Otherwise, its value will - // be the current time that is used to take the snapshot. - READ_TIME = 1; - - // The time when the request is received and started to be processed. If - // specified as partition key, the result table(s) is partitoned by the - // requestTime column, an additional timestamp column representing when the - // request was received. - REQUEST_TIME = 2; - } - - // The partition key for BigQuery partitioned table. - PartitionKey partition_key = 1; -} - -// Asset content type. -enum ContentType { - // Unspecified content type. - CONTENT_TYPE_UNSPECIFIED = 0; - - // Resource metadata. - RESOURCE = 1; - - // The actual IAM policy set on a resource. - IAM_POLICY = 2; - - // The Cloud Organization Policy set on an asset. - ORG_POLICY = 4; - - // The Cloud Access context manager Policy set on an asset. - ACCESS_POLICY = 5; - - // The related resources. - RELATIONSHIP = 7; -} diff --git a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto b/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto deleted file mode 100644 index 26ac6b2053e6..000000000000 --- a/owl-bot-staging/java-asset/v1p7beta1/proto-google-cloud-asset-v1p7beta1/src/main/proto/google/cloud/asset/v1p7beta1/assets.proto +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.asset.v1p7beta1; - -import "google/api/resource.proto"; -import "google/cloud/orgpolicy/v1/orgpolicy.proto"; -import "google/cloud/osconfig/v1/inventory.proto"; -import "google/iam/v1/policy.proto"; -import "google/identity/accesscontextmanager/v1/access_level.proto"; -import "google/identity/accesscontextmanager/v1/access_policy.proto"; -import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.Asset.V1P7Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p7beta1;asset"; -option java_multiple_files = true; -option java_outer_classname = "AssetProto"; -option java_package = "com.google.cloud.asset.v1p7beta1"; -option php_namespace = "Google\\Cloud\\Asset\\V1p7beta1"; - -// The Cloud Asset API. - -// An asset in Google Cloud. An asset can be any resource in the Google Cloud -// [resource -// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), -// a resource outside the Google Cloud resource hierarchy (such as Google -// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). -// See [Supported asset -// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) -// for more information. -message Asset { - option (google.api.resource) = { - type: "cloudasset.googleapis.com/Asset" - pattern: "*" - }; - - // The last update timestamp of an asset. update_time is updated when - // create/update/delete operation is performed. - google.protobuf.Timestamp update_time = 11; - - // The full name of the asset. Example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` - // - // See [Resource - // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string name = 1; - - // The type of the asset. Example: `compute.googleapis.com/Disk` - // - // See [Supported asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - // for more information. - string asset_type = 2; - - // A representation of the resource. - Resource resource = 3; - - // A representation of the Cloud IAM policy set on a Google Cloud resource. - // There can be a maximum of one Cloud IAM policy set on any given resource. - // In addition, Cloud IAM policies inherit their granted access scope from any - // policies set on parent resources in the resource hierarchy. Therefore, the - // effectively policy is the union of both the policy set on this resource - // and each policy set on all of the resource's ancestry resource levels in - // the hierarchy. See - // [this topic](https://cloud.google.com/iam/docs/policies#inheritance) for - // more information. - google.iam.v1.Policy iam_policy = 4; - - // A representation of an [organization - // policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy). - // There can be more than one organization policy with different constraints - // set on a given resource. - repeated google.cloud.orgpolicy.v1.Policy org_policy = 6; - - // A representation of an [access - // policy](https://cloud.google.com/access-context-manager/docs/overview#access-policies). - oneof access_context_policy { - // Please also refer to the [access policy user - // guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies). - google.identity.accesscontextmanager.v1.AccessPolicy access_policy = 7; - - // Please also refer to the [access level user - // guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels). - google.identity.accesscontextmanager.v1.AccessLevel access_level = 8; - - // Please also refer to the [service perimeter user - // guide](https://cloud.google.com/vpc-service-controls/docs/overview). - google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = - 9; - } - - // The related assets of the asset of one relationship type. - // One asset only represents one type of relationship. - RelatedAssets related_assets = 13; - - // The ancestry path of an asset in Google Cloud [resource - // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - // represented as a list of relative resource names. An ancestry path starts - // with the closest ancestor in the hierarchy and ends at root. If the asset - // is a project, folder, or organization, the ancestry path starts from the - // asset itself. - // - // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` - repeated string ancestors = 10; -} - -// A representation of a Google Cloud resource. -message Resource { - // The API version. Example: `v1` - string version = 1; - - // The URL of the discovery document containing the resource's JSON schema. - // Example: - // `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest` - // - // This value is unspecified for resources that do not have an API based on a - // discovery document, such as Cloud Bigtable. - string discovery_document_uri = 2; - - // The JSON schema name listed in the discovery document. Example: - // `Project` - // - // This value is unspecified for resources that do not have an API based on a - // discovery document, such as Cloud Bigtable. - string discovery_name = 3; - - // The REST URL for accessing the resource. An HTTP `GET` request using this - // URL returns the resource itself. Example: - // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123` - // - // This value is unspecified for resources without a REST API. - string resource_url = 4; - - // The full name of the immediate parent of this resource. See - // [Resource - // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - // - // For Google Cloud assets, this value is the parent resource defined in the - // [Cloud IAM policy - // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy). - // Example: - // `//cloudresourcemanager.googleapis.com/projects/my_project_123` - // - // For third-party assets, this field may be set differently. - string parent = 5; - - // The content of the resource, in which some sensitive fields are removed - // and may not be present. - google.protobuf.Struct data = 6; - - // The location of the resource in Google Cloud, such as its zone and region. - // For more information, see https://cloud.google.com/about/locations/. - string location = 8; -} - -// The detailed related assets with the `relationship_type`. -message RelatedAssets { - // The detailed relation attributes. - RelationshipAttributes relationship_attributes = 1; - - // The peer resources of the relationship. - repeated RelatedAsset assets = 2; -} - -// The relationship attributes which include `type`, `source_resource_type`, -// `target_resource_type` and `action`. -message RelationshipAttributes { - // The unique identifier of the relationship type. Example: - // `INSTANCE_TO_INSTANCEGROUP` - string type = 4; - - // The source asset type. Example: `compute.googleapis.com/Instance` - string source_resource_type = 1; - - // The target asset type. Example: `compute.googleapis.com/Disk` - string target_resource_type = 2; - - // The detail of the relationship, e.g. `contains`, `attaches` - string action = 3; -} - -// An asset identify in Google Cloud which contains its name, type and -// ancestors. An asset can be any resource in the Google Cloud [resource -// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), -// a resource outside the Google Cloud resource hierarchy (such as Google -// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). -// See [Supported asset -// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) -// for more information. -message RelatedAsset { - // The full name of the asset. Example: - // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` - // - // See [Resource - // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // for more information. - string asset = 1 [(google.api.resource_reference) = { - type: "cloudasset.googleapis.com/Asset" - }]; - - // The type of the asset. Example: `compute.googleapis.com/Disk` - // - // See [Supported asset - // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) - // for more information. - string asset_type = 2; - - // The ancestors of an asset in Google Cloud [resource - // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - // represented as a list of relative resource names. An ancestry path starts - // with the closest ancestor in the hierarchy and ends at root. - // - // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` - repeated string ancestors = 3; -}